Description


TColor is used to specify the color of a component.



You can use hexadecimal numbers to specify an arbitrary color.
example: 


Form1.Color := $00DDEEFF;

where FF - red, EE - green, DD - blue.



If you are more accustomed to ordinary numbers, you can use the RGB function, where each color is specified by a number from 0 to 255.

example:


Form1.Color := RGB(255, 238, 221);




In addition, you can use text color constants

example: 


Form1.Color := clWindowText;
Form1.Color := clRed;




The following table lists the color constants:


 Value

 Meaning

 clBlack

 Black

 clMaroon

 Maroon

 clGreen

 Green

 clOlive

 Olive Green

 clNavy

 Navy Blue

 clPurple

 Purple

 clTeal

 Teal

 clGray

 Gray

 clSilver

 Silver

 clRed

 Red

 clLime

 Lime Green

 clYellow

 Yellow

 clBlue

 Blue

 clFuchsia

 Fuchsia

 clAqua

 Aqua

 clWhite

 White




The following table lists the colors that are defined in the Windows Control panel:


 Value

 Meaning

 clActiveBorder

 Current border color of the active window.

 clActiveCaption

 Current color of the active window's title bar.

 clAppWorkSpace

 Current color of the application workspace.

 clBackground

 Current background color of the Windows desktop.

 clBtnFace

 Current color of a button face.

 clBtnHighlight

 Current color of the highlighting on a button.

 clBtnShadow

 Current color of a shadow cast by a button.

 clBtnText

 Current color of text on a button.

 clCaptionText

 Current color of the text on the active window's title bar.

 clGradientActiveCaption

 Windows 98 or Windows 2000: Right-side color in the color gradient of an active window's title bar. clActiveCaption specifies the left side color.

 clGradientInactiveCaption

 Windows 98 or Windows 2000: Right-side color in the color gradient of an inactive window's title bar. clInactiveCaption specifies the left side color.

 clGrayText

 Current color of dimmed text.

 clHighlight

 Current background color of selected text.

 clHighlightText

 Current color of selected text.

 clHotLight

 

 clInactiveBorder

 Current border color of inactive windows.

 clInactiveCaption

 Current color of inactive windows' title bar.

 clInactiveCaptionText

 Current color of the text on an inactive window's title bar.

 clInfoBk

 Windows 95 or NT 4.0 only: Background color for tool tip controls.

 clInfoText

 Windows 95 or NT 4.0 only: Text color for tool tip controls.

 clMenu

 Current background color of menus.

 clMenuBar

 Current color of the menu bar.

 clMenuHighlight

 Current color of the highlighting on a menu.

 clMenuText

 Current color of text on menus.

 clScrollBar

 Current color of the scroll bar track.

 cl3DDkShadow

 Windows 95 or NT 4.0 only: Dark shadow for three-dimensional display elements.

 cl3DLight

 Windows 95 or NT 4.0 only: Light color for three-dimensional display elements (for edges facing the light source).

 clWindow

 Current background color of windows.

 clWindowFrame

 Current color of window frames.

 clWindowText

 Current color of text in windows.