Color.ToString Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a string representation of the color by using the sRGB
channels.
Overloads
ToString() |
Creates a string representation of the color using the |
ToString(IFormatProvider) |
Creates a string representation of the color by using the |
ToString()
Creates a string representation of the color using the sRGB
channels.
public:
override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
Returns
The string representation of the color. The default implementation represents the Byte values in hex form, prefixes with the #
character, and starts with the alpha channel. For example, the ToString() value for AliceBlue is #FFF0F8FF
.
Applies to
ToString(IFormatProvider)
Creates a string representation of the color by using the sRGB
channels and the specified format provider.
public:
System::String ^ ToString(IFormatProvider ^ provider);
public string ToString (IFormatProvider provider);
override this.ToString : IFormatProvider -> string
Public Function ToString (provider As IFormatProvider) As String
Parameters
- provider
- IFormatProvider
Culture-specific formatting information.
Returns
The string representation of the color.