ColorConverters.FromHex(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new Color from a Hex string.
public static System.Drawing.Color FromHex (string hex);
Parameters
- hex
- System.String
A string value similar to the syntax used in HTML, eg "00FF00". Alpha can optionally be specified as the first pair of the characters ("CC00FF00").
Returns
System.Drawing.Color
A color from the Hex string.