CodeCarvings.Piczard
ColorToString Method
See Also  Send Feedback
CodeCarvings.Piczard.Helpers Namespace > StringConversionHelper Class : ColorToString Method

color
The value to be converted to string.
addAlpha
if true the method serializes also the Alpha component of the Color.
Converts a Color value to a string.

Syntax

Visual Basic (Declaration)  
Public Shared Function ColorToString( _
   ByVal color As Color, _
   ByVal addAlpha As Boolean _
) As String
C#  
public static string ColorToString( 
   Color color,
   bool addAlpha
)

Parameters

color
The value to be converted to string.
addAlpha
if true the method serializes also the Alpha component of the Color.

Return Value

A string that represents the specified value.

Remarks

  • If addAlpha is true then the Alpha component is serialized as the first 2 hexadecimal digits of the string (e.g. "AARRGGBB").
  • If addAlpha is false then the Alpha component is not serialized (e.g. "RRGGBB").

Requirements

Platforms: Windows 8, Windows 7, Windows Vista, Windows XP Professional, Windows 2000 - Windows Server family: 2012, 2008.R2, 2008, 2003, 2000

See Also

©2013 Sergio Turolla. All Rights Reserved.