RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Graphics.ColorToString Function

Returns a string that represents the name of a TColor value.

Pascal
function ColorToString(Color: TColor): string;
C++
AnsiString ColorToString(TColor Color);

Call ColorToString to obtain a string that represents a TColor value. If there is a symbolic constant defined for the color (such as clBlack or clHighlightText), ColorToString returns the name of the constant. Otherwise, ColorToString returns the hex value of the color, formatted as a string such as "$02FF8800" (Delphi) or "0x02FF8800" (C++). 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!