/** * Returns an instance of the CIE L*a*b* color space using the D50 white point. * @return an instance of the requested CIE L*a*b* color space */ public static synchronized CIELabColorSpace getCIELabColorSpaceD50() { if (cieLabD50 == null) { cieLabD50 = new CIELabColorSpace(CIELabColorSpace.getD50WhitePoint()); } return cieLabD50; }
/** * Returns an instance of the CIE L*a*b* color space using the D65 white point. * @return an instance of the requested CIE L*a*b* color space */ public static synchronized CIELabColorSpace getCIELabColorSpaceD65() { if (cieLabD65 == null) { cieLabD65 = new CIELabColorSpace(CIELabColorSpace.getD65WhitePoint()); } return cieLabD65; }
/** * Returns a Color object that corresponds to the input Paint's * CIE Lab color value. * * @param e the element using the color * @param c the CIE Lab color definition * @param opacity the opacity * @param ctx the bridge context to use */ public static Color convertCIELabColor(Element e, CIELabColor c, float opacity, BridgeContext ctx) { CIELabColorSpace cs = new CIELabColorSpace(c.getWhitePoint()); float[] lab = c.getColorValues(); Color specColor = cs.toColor(lab[0], lab[1], lab[2], opacity); return specColor; }
/** * Returns a Color object that corresponds to the input Paint's * CIE Lab color value. * * @param e the element using the color * @param c the CIE Lab color definition * @param opacity the opacity * @param ctx the bridge context to use */ public static Color convertCIELabColor(Element e, CIELabColor c, float opacity, BridgeContext ctx) { CIELabColorSpace cs = new CIELabColorSpace(c.getWhitePoint()); float[] lab = c.getColorValues(); Color specColor = cs.toColor(lab[0], lab[1], lab[2], opacity); return specColor; }
/** * Returns a Color object that corresponds to the input Paint's * CIE Lab color value. * * @param e the element using the color * @param c the CIE Lab color definition * @param opacity the opacity * @param ctx the bridge context to use */ public static Color convertCIELabColor(Element e, CIELabColor c, float opacity, BridgeContext ctx) { CIELabColorSpace cs = new CIELabColorSpace(c.getWhitePoint()); float[] lab = c.getColorValues(); Color specColor = cs.toColor(lab[0], lab[1], lab[2], opacity); return specColor; }