예제 #1
0
        static Chroma()
        {
            s_black = new Chroma();
            s_black.SetColor(Color.Black);

            s_white = new Chroma();
            s_white.SetColor(Color.White);
        }
예제 #2
0
        static RGBColor Interpolate(Chroma color1, Chroma color2, double f)
        {
            RGBColor rgb1   = color1._rgb;
            RGBColor rgb2   = color2._rgb;
            RGBColor result = new RGBColor(
                rgb1.R + f * (rgb2.R - rgb1.R),
                rgb1.G + f * (rgb2.G - rgb1.G),
                rgb1.B + f * (rgb2.B - rgb1.B)
                );

            return(result);
        }