ToHexString Method
Converts the given color to its hex color value string representation.
Definition
Namespace: Avalonia.Controls.Converters
Assembly: Avalonia.Controls.ColorPicker (in Avalonia.Controls.ColorPicker.dll)
- C#
- VB
- F#
public static string ToHexString(
Color color,
AlphaComponentPosition alphaPosition,
bool includeAlpha = true,
bool includeSymbol = false
)
Public Shared Function ToHexString (
color As Color,
alphaPosition As AlphaComponentPosition,
Optional includeAlpha As Boolean = true,
Optional includeSymbol As Boolean = false
) As String
static member ToHexString :
color : Color *
alphaPosition : AlphaComponentPosition *
?includeAlpha : bool *
?includeSymbol : bool
(* Defaults:
let _includeAlpha = defaultArg includeAlpha true
let _includeSymbol = defaultArg includeSymbol false
*)
-> string
Parameters
- Color
- The color to represent as a hex value string.
- AlphaComponentPosition
- The output position of the alpha component.
- Boolean (Optional)
- Whether the alpha component will be included in the hex string.
- Boolean (Optional)
- Whether the hex symbol '#' will be added.
Return Value
String
The input color converted to its hex value string.
See Also
Reference
ColorToHexConverter Class
Avalonia.Controls.Converters Namespace