示例#1
0
 private void Color_model_Load(object sender, EventArgs e)
 {
     this.updating = true;
     UpdateHSL(ColorSpaceHelper.RGBtoHSL((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
     UpdateHSB(ColorSpaceHelper.RGBtoHSB((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
     UpdateCMYK(ColorSpaceHelper.RGBtoCMYK((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
     UpdateYUV(ColorSpaceHelper.RGBtoYUV((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
     this.updating = false;
 }
示例#2
0
 private void HSBValueChanged(object sender, System.EventArgs e)
 {
     if (!this.updating)
     {
         this.updating = true;
         UpdateRGB(ColorSpaceHelper.HSBtoRGB((double)this.hUD.Value, (double)this.sUD.Value / 100.0, (double)this.bUD.Value / 100.0));
         UpdateHSL(ColorSpaceHelper.RGBtoHSL((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
         UpdateCMYK(ColorSpaceHelper.RGBtoCMYK((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
         UpdateYUV(ColorSpaceHelper.RGBtoYUV((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
         this.updating = false;
     }
 }
示例#3
0
 private void YUVValueChanged(object sender, System.EventArgs e)
 {
     if (!this.updating)
     {
         this.updating = true;
         UpdateRGB(ColorSpaceHelper.YUVtoRGB((double)this.yUD.Value / 100.0, (-0.436 + ((double)this.uUD.Value / 100.0)), (-0.615 + ((double)this.vUD.Value / 100.0))));
         UpdateCMYK(ColorSpaceHelper.RGBtoCMYK((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
         UpdateHSL(ColorSpaceHelper.RGBtoHSL((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
         UpdateHSB(ColorSpaceHelper.RGBtoHSB((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
         this.updating = false;
     }
 }
示例#4
0
        private void RGBValueChanged(object sender, System.EventArgs e)
        {
            if (!this.updating)
            {
                this.preview.BackColor = Color.FromArgb((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value);

                this.updating = true;
                UpdateHSL(ColorSpaceHelper.RGBtoHSL((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
                UpdateHSB(ColorSpaceHelper.RGBtoHSB((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
                UpdateCMYK(ColorSpaceHelper.RGBtoCMYK((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
                UpdateYUV(ColorSpaceHelper.RGBtoYUV((int)redUD.Value, (int)greenUD.Value, (int)blueUD.Value));
                this.updating = false;
            }
        }