ClassColorUtilities
Static helper class related to color.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.WinControls.RadDiagram.dll
Syntax:
public static class ColorUtilities
Inheritance: objectColorUtilities
Fields
NamedColors
Know color names taken over from .Net.
Declaration
public static readonly IList<string> NamedColors
Field Value
IList<string>
NamedColorsRgb
The ARGB values corresponding to the NamedColors.
Declaration
public static readonly IList<string> NamedColorsRgb
Field Value
IList<string>
Properties
RandomBlues
Gets a random shade of blue.
Declaration
public static Color RandomBlues { get; }
Property Value
The random blue color.
RandomBrush
Gets the random brush where the color is picked from the known Color.
Declaration
public static Brush RandomBrush { get; }
Property Value
The random brush.
Methods
ByteArrayToHexString(byte[])
Converts the given byte array to a color in the format #AARRGGBB.
ColorFromString(string)
Colors from string.
ColorToString(Color)
Converts the specified color to a format #AARRGGBB. Use the ColorToString(Color) to convert a string back to a color.
FromAngle(double)
Creates a color from an angle.
FromArgb(byte, byte, byte, byte)
Returns brush from ARGB values.
FromHsl(double, double, double)
Returns a color based on its HSL value.
HexStringToByteArray(string)
Converts the #AARRGGBB string color to a byte array.
Multiply(Color, double)
Multiplies/scales the specified color.
Parse(int)
Parses the specified value and converts it to a color.
Parse(string)
Parses the specified color string (e.g. '#FF4B4578').
ParseToBrush(string)
Parses to brush.
Declaration
public static SolidBrush ParseToBrush(string hexValue)
Parameters
hexValue
The hex string.
Returns
RgbToHsl(Color)
Given a Color (RGB Struct) in range of 0-255 Return H,S,L in the range [0,1].
StringToColor(string)
Converts the specified string value to Color.
Sum(Color, Color)
Adds the two given Color.
ToValue(Color)
Returns the unsigned integer value of the color.