Class ColorConverter
A class that converts all the available color schemas (RGB, HLS, HSV, HEX and CMYK) between each other.
Inheritance
Namespace: Telerik.Windows.Controls.ColorEditor
Assembly: Telerik.Windows.Controls.dll
Syntax
public class ColorConverter : Object
Constructors
ColorConverter()
Properties
Instance
Gets the ColorConverter instance.
Declaration
public static ColorConverter Instance { get; }
Property Value
ColorConverter
|
KnownColors
Provides a dictionary with known colors and their hex representation.
Declaration
public static KnownColors KnownColors { get; }
Property Value
KnownColors
|
Methods
CmykaToHex(CmykaColor)
Converts a CmykaColor to a HexColor.
Declaration
public virtual HexColor CmykaToHex(CmykaColor color)
Parameters
CmykaColor
color
The CmykaColor color. |
Returns
HexColor |
CmykaToHlsa(CmykaColor)
Converts a CmykaColor to a HlsaColor.
Declaration
public virtual HlsaColor CmykaToHlsa(CmykaColor color)
Parameters
CmykaColor
color
The CmykaColor color. |
Returns
HlsaColor |
CmykaToHsva(CmykaColor)
Converts a CmykaColor to a HsvaColor.
Declaration
public virtual HsvaColor CmykaToHsva(CmykaColor color)
Parameters
CmykaColor
color
The CmykaColor color. |
Returns
HsvaColor |
CmykaToRgba(CmykaColor)
Converts a CmykaColor to a RgbaColor.
Declaration
public virtual RgbaColor CmykaToRgba(CmykaColor color)
Parameters
CmykaColor
color
The CmykaColor color. |
Returns
RgbaColor |
ColorFromString(String)
Creates the color from string.
Declaration
public static Color ColorFromString(string value)
Parameters
System.String
value
The value. |
Returns
System.Windows.Media.Color
|
HexToCmyka(HexColor)
Converts a HexColor to a CmykaColor.
Declaration
public virtual CmykaColor HexToCmyka(HexColor color)
Parameters
HexColor
color
The HexColor color. |
Returns
CmykaColor |
HexToHlsa(HexColor)
Declaration
public virtual HlsaColor HexToHlsa(HexColor color)
Parameters
HexColor
color
The HexColor color. |
Returns
HlsaColor |
HexToHsva(HexColor)
Declaration
public virtual HsvaColor HexToHsva(HexColor color)
Parameters
HexColor
color
The HexColor color. |
Returns
HsvaColor |
HexToRgba(HexColor)
Declaration
public virtual RgbaColor HexToRgba(HexColor color)
Parameters
HexColor
color
The HexColor color. |
Returns
RgbaColor |
HlsaToCmyka(HlsaColor)
Converts a HlsaColor to a CmykaColor.
Declaration
public virtual CmykaColor HlsaToCmyka(HlsaColor color)
Parameters
HlsaColor
color
The HlsaColor color. |
Returns
CmykaColor |
HlsaToHex(HlsaColor)
Declaration
public virtual HexColor HlsaToHex(HlsaColor color)
Parameters
HlsaColor
color
The HlsaColor color. |
Returns
HexColor |
HlsaToHsva(HlsaColor)
Declaration
public virtual HsvaColor HlsaToHsva(HlsaColor color)
Parameters
HlsaColor
color
The HlsaColor color. |
Returns
HsvaColor |
HlsaToRgba(HlsaColor)
Declaration
public virtual RgbaColor HlsaToRgba(HlsaColor color)
Parameters
HlsaColor
color
The HlsaColor color. |
Returns
RgbaColor |
HsvaToCmyka(HsvaColor)
Converts a HsvaColor to a CmykaColor.
Declaration
public virtual CmykaColor HsvaToCmyka(HsvaColor color)
Parameters
HsvaColor
color
The HsvaColor color. |
Returns
CmykaColor |
HsvaToHex(HsvaColor)
Declaration
public virtual HexColor HsvaToHex(HsvaColor color)
Parameters
HsvaColor
color
The HsvaColor color. |
Returns
HexColor |
HsvaToHlsa(HsvaColor)
Declaration
public virtual HlsaColor HsvaToHlsa(HsvaColor color)
Parameters
HsvaColor
color
The HsvaColor color. |
Returns
HlsaColor |
HsvaToRgba(HsvaColor)
Declaration
public virtual RgbaColor HsvaToRgba(HsvaColor color)
Parameters
HsvaColor
color
The HsvaColor color. |
Returns
RgbaColor |
RgbaToCmyka(RgbaColor)
Converts a RgbaColor to a CmykaColor.
Declaration
public virtual CmykaColor RgbaToCmyka(RgbaColor color)
Parameters
RgbaColor
color
The RgbaColor color. |
Returns
CmykaColor |
RgbaToHex(RgbaColor)
Declaration
public virtual HexColor RgbaToHex(RgbaColor color)
Parameters
RgbaColor
color
The RgbaColor color. |
Returns
HexColor |
RgbaToHlsa(RgbaColor)
Declaration
public virtual HlsaColor RgbaToHlsa(RgbaColor color)
Parameters
RgbaColor
color
The RgbaColor color. |
Returns
HlsaColor |
RgbaToHsva(RgbaColor)
Declaration
public virtual HsvaColor RgbaToHsva(RgbaColor color)
Parameters
RgbaColor
color
The RgbaColor color. |
Returns
HsvaColor |