ColorConverters.FromHex(String) Method

Definition

Creates a new Color from a Hex string.

public static System.Drawing.Color FromHex (string hex);

Parameters

hex
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

A color from the Hex string.

Remarks

Applies to