double l = 116 * f(xyz[1]) - 16; double a = 500 * (f(xyz[0]) - f(xyz[1])); double b = 200 * (f(xyz[0]) - f(xyz[2])); return new Color(l/100, (500+a)/1000, (200+b)/400);
double l = 116.0 * f(xyz[1]) - 16; double a = 500.0 * (f(100*xyz[0]/X_REF) - f(xyz[1])); double b = 200.0 * (f(xyz[1]) - f(100*xyz[2]/Z_REF)); if (l > 100.0) l = 100.0; else if (l < 0.0) l = 0.0; if (a > 120.0) a = 120.0; else if (a < -120.0) a = -120.0; if (b > 120.0) b = 120.0; else if (b < -120.0) b = -120.0; return new Color(l/100.0, (120+a)/240.0, (120+b)/240.0);
	public Color fromRgb(int[] rgb) {		double xyz[] = super.fromRgb(rgb).getComponents();		double l = 116 * f(xyz[1]) - 16;		double a = 500 * (f(xyz[0]) - f(xyz[1]));		double b = 200 * (f(xyz[0]) - f(xyz[2]));		return new Color(l/100, (500+a)/1000, (200+b)/400);	}