Share via


ColorConverters.FromHex(String) Method

Definition

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.

Applies to