ColorToString Method (String, IFormatProvider)

Gets a string representation of this color on the specified format.
public string ToString(
	string format,
	IFormatProvider formatProvider
)

Parameters

formatSystemString
Color string format.
formatProviderSystemIFormatProvider
Format provider used to convert integers to strings.

Return Value

String

Implements

IFormattableToString(String, IFormatProvider)

Remarks

The format string can contain the following placeholders that will be replaced. All other characters will be left intact.

PlaceholderExampleRemarks
R127Decimal value of the red component.
G241Decimal value of the green component.
R87Decimal value of the blue component.
A12Decimal alpha value.
RR7FUppercase hexadecimal representation of the red component.
GGF1Uppercase hexadecimal representation of the green component.
BB57Uppercase hexadecimal representation of the blue component.
AA0CUppercase hexadecimal representation of the alpha value.
rr7fLowercase hexadecimal representation of the red component.
ggf1Lowercase hexadecimal representation of the green component.
bb57Lowercase hexadecimal representation of the blue component.
aa0cLowercase hexadecimal representation of the alpha value.

See Also

Reference