/** * Returns the sRGB value obtained by forcing the * conversion method to the intent passed to the * constructor. * @param values the color values in the local color space * @return the sRGB values */ public float[] intendedToRGB(float[] values) { switch(intent) { case ABSOLUTE_COLORIMETRIC: return absoluteColorimetricToRGB(values); case PERCEPTUAL: case AUTO: return perceptualToRGB(values); case RELATIVE_COLORIMETRIC: return relativeColorimetricToRGB(values); case SATURATION: return saturationToRGB(values); default: throw new RuntimeException("invalid intent:" + intent); } }