Example #1
0
 public CMYK(Color color)
 {
     this = ColorHelpers.ColorToCMYK(color);
 }
Example #2
0
 public Color ToColor()
 {
     return(ColorHelpers.CMYKToColor(this));
 }
Example #3
0
File: RGBA.cs Project: ywscr/ShareX
 public HSB ToHSB()
 {
     return(ColorHelpers.ColorToHSB(this));
 }
Example #4
0
File: RGBA.cs Project: ywscr/ShareX
 public CMYK ToCMYK()
 {
     return(ColorHelpers.ColorToCMYK(this));
 }
Example #5
0
File: RGBA.cs Project: ywscr/ShareX
 public string ToHex(ColorFormat format = ColorFormat.RGB)
 {
     return(ColorHelpers.ColorToHex(this, format));
 }
Example #6
0
File: RGBA.cs Project: ywscr/ShareX
 public int ToDecimal(ColorFormat format = ColorFormat.RGB)
 {
     return(ColorHelpers.ColorToDecimal(this, format));
 }
Example #7
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)));
        }
Example #8
0
        private void tsmiCopyDecimal_Click(object sender, EventArgs e)
        {
            int dec = ColorHelpers.ColorToDecimal(colorPicker.SelectedColor, ColorFormat.RGB);

            ClipboardHelpers.CopyText(dec.ToString());
        }
Example #9
0
        private void tsmiCopyHexadecimal_Click(object sender, EventArgs e)
        {
            string hex = ColorHelpers.ColorToHex(colorPicker.SelectedColor, ColorFormat.RGB);

            ClipboardHelpers.CopyText("#" + hex);
        }
Example #10
0
File: HSB.cs Project: McoreD/ShareX
 public Color ToColor()
 {
     return(ColorHelpers.HSBToColor(this));
 }
Example #11
0
File: HSB.cs Project: McoreD/ShareX
 public HSB(Color color)
 {
     this = ColorHelpers.ColorToHSB(color);
 }