Esempio n. 1
0
 public Gamut(ProbedColor red, ProbedColor green, ProbedColor blue, ProbedColor white)
 {
     RedPrimary   = red;
     GreenPrimary = green;
     BluePrimary  = blue;
     WhitePrimary = white;
 }
Esempio n. 2
0
        public ProbedColor ToGamut(ProbedColor c)
        {
            Triangle t = new Triangle(
                new Point(RedPrimary.xyY.x, RedPrimary.xyY.y),
                new Point(GreenPrimary.xyY.x, GreenPrimary.xyY.y),
                new Point(BluePrimary.xyY.x, BluePrimary.xyY.y)
                );

            Point p = t.Inside(new Point(WhitePrimary.xyY.x, WhitePrimary.xyY.y), new Point(c.xyY.x, c.xyY.y));

            return(new ProbedColorxyY(p.X, p.Y, c.xyY.Y));
        }