public static ColorXYZFull ToXYZ(ColorxyYFull xyy) { if (Math.Abs(xyy.y) < Epsilon) { return new ColorXYZFull(0, 0, 0); } double Yy = xyy.Y / xyy.y; double X = xyy.x * Yy; double Z = (1 - xyy.x - xyy.y) * Yy; return new ColorXYZFull(X, xyy.Y, Z); }
public static ColorxyYFull Clamp(ColorxyYFull xyy) { var x = Clamp(xyy.x); var y = Clamp(xyy.y); var Y = Clamp(xyy.Y); return new ColorxyYFull(x, y, Y); }