Esempio n. 1
0
        public static void ColorToCMY(UniColor Color, ref CMYDATA cmy)
        {
            //
            byte r;
            byte g;
            byte b;

            int x;

            GetRGB(Color, out r, out g, out b);

            x = Max(r, g, b);

            r = (byte)Math.Abs(1 - r);
            g = (byte)Math.Abs(1 - g);
            b = (byte)Math.Abs(1 - b);

            cmy.Magenta = r;
            cmy.Yellow  = g;
            cmy.Cyan    = b;
        }
Esempio n. 2
0
        public static UniColor CMYToColor(CMYDATA cmy)
        {
            UniColor CMYToColorRet = default;
            //
            int c;
            int m;
            int y;

            byte r;
            byte g;
            byte b;

            c = cmy.Cyan;
            m = cmy.Magenta;
            y = cmy.Yellow;

            r = (byte)Math.Abs(1 - m);
            g = (byte)Math.Abs(1 - y);
            b = (byte)Math.Abs(1 - c);

            return(new UniColor(255, r, g, b));
        }