public void HSBUpdate()
 {
     this.RGB  = this.HSB;
     this.CMYK = this.HSB;
 }
 public MyColor(Color color)
 {
     this.RGB  = color;
     this.HSB  = color;
     this.CMYK = color;
 }
 public void RGBUpdate()
 {
     this.HSB  = this.RGB;
     this.CMYK = this.RGB;
 }
예제 #4
0
        public static CMYK ToCMYK(Color color)
        {
            CMYK cmyk = new CMYK();
            double low = 1.0;

            cmyk.Cyan = (double)(255 - color.R) / 255;
            if (low > cmyk.Cyan)
                low = cmyk.Cyan;

            cmyk.Magenta = (double)(255 - color.G) / 255;
            if (low > cmyk.Magenta)
                low = cmyk.Magenta;

            cmyk.Yellow = (double)(255 - color.B) / 255;
            if (low > cmyk.Yellow)
                low = cmyk.Yellow;

            if (low > 0.0)
            {
                cmyk.Key = low;
            }

            return cmyk;
        }
예제 #5
0
 public void RGBUpdate()
 {
     this.HSB = this.RGB;
     this.CMYK = this.RGB;
 }
예제 #6
0
 public void HSBUpdate()
 {
     this.RGB = this.HSB;
     this.CMYK = this.HSB;
 }
예제 #7
0
 public MyColor(Color color)
 {
     this.RGB = color;
     this.HSB = color;
     this.CMYK = color;
 }
예제 #8
0
        public static Color ToColor(CMYK cmyk)
        {
            int red = Helpers.Round(255 - (255 * cmyk.Cyan));
            int green = Helpers.Round(255 - (255 * cmyk.Magenta));
            int blue = Helpers.Round(255 - (255 * cmyk.Yellow));

            return Color.FromArgb(red, green, blue);
        }