Example #1
0
 public ColorCmyk(double c, double m, double y, double k)
 {
     ColorCmyk.check_cmyk(c, m, y, k);
     this._alpha = 1.0;
     this._c     = c;
     this._m     = m;
     this._y     = y;
     this._k     = k;
 }
Example #2
0
        public ColorRgb(ColorCmyk cmyk)
        {
            double CMY_C = cmyk.C * (1 - cmyk.K) + cmyk.K;
            double CMY_M = cmyk.M * (1 - cmyk.K) + cmyk.K;
            double CMY_Y = cmyk.Y * (1 - cmyk.K) + cmyk.K;

            this._alpha = cmyk.Alpha;
            this._r     = 1 - CMY_C;
            this._g     = 1 - CMY_M;
            this._b     = 1 - CMY_Y;
        }