Vcl.Graphics.IdentToColor

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IdentToColor(const Ident: string; var Color: Longint): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall IdentToColor(const System::UnicodeString Ident, int &Color);

Properties

Type Visibility Source Unit Parent
function public
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics Vcl.Graphics

Description

Translates the name of a color constant to the corresponding TColor value.

Call IdentToColor to reverse the translation performed by ColorToIdent. This method is useful for converting the strings generated by GetColorValues into useable TColor values. IdentToColor returns true if the Ident parameter is successfully converted into a color that is returned by the Color parameter. IdentToColor returns false if the Ident parameter is not the name of one of the TColor constants.

Note: If the string identifier for a color may represent either a hex value or a color constant, use the StringToColor function instead.

See Also