Extended Library for WPF and Silverlight | ComponentOne
C1.WPF.Extended Namespace / WebColor Class / ToColor Method / ToColor(String,Byte) Method
A hex string: "FFFFFF", "#000000"
Represents the alpha channel of the color.

In This Topic
    ToColor(String,Byte) Method
    In This Topic
    Convert a hex string to a .NET Color object.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Function ToColor( _
       ByVal hexColor As String, _
       ByVal alpha As Byte _
    ) As Color
    public static Color ToColor( 
       string hexColor,
       byte alpha
    )

    Parameters

    hexColor
    A hex string: "FFFFFF", "#000000"
    alpha
    Represents the alpha channel of the color.
    See Also