Esempio n. 1
0
 public CMYK ToCMYK()
 {
     return(ColorHelpers.ColorToCMYK(this));
 }
Esempio n. 2
0
        public override string ToString()
        {
            return(String.Format(
                       @"RGBA (Red, Green, Blue, Alpha) = {0}, {1}, {2}, {3}
HSB (Hue, Saturation, Brightness) = {4:0.0}°, {5:0.0}%, {6:0.0}%
CMYK (Cyan, Magenta, Yellow, Key) = {7:0.0}%, {8:0.0}%, {9:0.0}%, {10:0.0}%
Hex (RGB, RGBA, ARGB) = #{11}, #{12}, #{13}
Decimal (RGB, RGBA, ARGB) = {14}, {15}, {16}",
                       RGBA.Red, RGBA.Green, RGBA.Blue, RGBA.Alpha,
                       HSB.Hue360, HSB.Saturation100, HSB.Brightness100,
                       CMYK.Cyan100, CMYK.Magenta100, CMYK.Yellow100, CMYK.Key100,
                       ColorHelpers.ColorToHex(this), ColorHelpers.ColorToHex(this, ColorFormat.RGBA), ColorHelpers.ColorToHex(this, ColorFormat.ARGB),
                       ColorHelpers.ColorToDecimal(this), ColorHelpers.ColorToDecimal(this, ColorFormat.RGBA), ColorHelpers.ColorToDecimal(this, ColorFormat.ARGB)));
        }
Esempio n. 3
0
 public int ToDecimal(ColorFormat format = ColorFormat.RGB)
 {
     return(ColorHelpers.ColorToDecimal(this, format));
 }
Esempio n. 4
0
 public HSB ToHSB()
 {
     return(ColorHelpers.ColorToHSB(this));
 }
Esempio n. 5
0
 public string ToHex(ColorFormat format = ColorFormat.RGB)
 {
     return(ColorHelpers.ColorToHex(this, format));
 }
Esempio n. 6
0
 public Color ToColor()
 {
     return(ColorHelpers.CMYKToColor(this));
 }
Esempio n. 7
0
 public CMYK(Color color)
 {
     this = ColorHelpers.ColorToCMYK(color);
 }
Esempio n. 8
0
 public Color ToColor()
 {
     return(ColorHelpers.HSBToColor(this));
 }
Esempio n. 9
0
 public HSB(Color color)
 {
     this = ColorHelpers.ColorToHSB(color);
 }