Class DrawingExtensions
Provides extension methods for converting between integer, HTML color string representations and Color.
public static class DrawingExtensions
- Inheritance
-
DrawingExtensions
- Inherited Members
Methods
ToColor(int)
Creates a Color from the specified ARGB integer.
public static Color ToColor(this int argb)
Parameters
argb
intAn integer representing the ARGB value.
Returns
ToColor(string)
Converts an HTML color representation to a Color.
public static Color ToColor(this string htmlColor)
Parameters
htmlColor
stringA string representing the HTML color. Accepts formats such as "#RRGGBB", "#RGB" or the special case "LightGrey".
Returns
ToHtml(Color)
Converts a Color to its HTML representation.
public static string ToHtml(this Color color)
Parameters
Returns
- string
A string representing the HTML color value. Returns an empty string if the color is empty.