Version

ColorFromString(String,Color) Method

Returns a Color value from the specified text.
Syntax
'Declaration
 
Public Overloads Shared Function ColorFromString( _
   ByVal text As String, _
   ByVal original As Color _
) As Color
public static Color ColorFromString( 
   string text,
   Color original
)

Parameters

text
String to convert
original
Default value in case of failure

Return Value

A Color based on the specified text, or the original color if the string cannot be parsed.
Remarks

In the case where an empty string is specified in the 'text' parameter, Color.Empty is returned.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also