Example #1
0
    public HSV(CMYK cmyk)
    {
        HSV hsv = cmyk.ToHSV();

        H = hsv.H;
        S = hsv.S;
        V = hsv.V;
    }
Example #2
0
    public void CMYK_ToHSV()
    {
        var cmyk   = new CMYK(46.4, 25.6, 0, 50.98);
        var actual = cmyk.ToHSV();

        Assert.Equal(213.1, actual.H, 2);
        Assert.Equal(46.4, actual.S, 2);
        Assert.Equal(49.02, actual.V, 2);
    }
Example #3
0
 public override void UpdateColorPickerValues()
 {
     if (_updating == false && ColorPicker != null)
     {
         _updating = true;
         CMYK cmyk = new CMYK(Cyan, Magenta, Yellow, BlackKey);
         HSV  hsv  = cmyk.ToHSV();
         ColorPicker.Value1 = hsv.H;
         ColorPicker.Value2 = hsv.S;
         ColorPicker.Value3 = hsv.V;
         _updating          = false;
     }
 }