0% found this document useful (0 votes)
167 views

Colors in The VCL

The document discusses color constants in the Vcl.Graphics unit that map to system colors. It explains that the RGB values of TColor represent intensities of blue, green, and red. It provides tables listing normal colors and their hex values, as well as system colors and web colors defined by "cl" constants.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
167 views

Colors in The VCL

The document discusses color constants in the Vcl.Graphics unit that map to system colors. It explains that the RGB values of TColor represent intensities of blue, green, and red. It provides tables listing normal colors and their hex values, as well as system colors and web colors defined by "cl" constants.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Colors in the VCL

Go Up to Using the Properties of the Canvas Object

The Vcl.Graphics unit contains definitions of useful constants for TColor. These constants


map either directly to the closest matching color in the system palette (for
example, clBlue maps to blue) or to the corresponding system screen element color
defined in the Color section of the Windows Control panel (for example, clBtnFace maps to
the system color for button faces.)
If you specify TColor as a specific 4-byte hexadecimal number instead of using the
constants defined in the Vcl.Graphics unit, the low three bytes represent RGB color
intensities for blue, green, and red, respectively. The value $00FF0000 (Delphi) or
0x00FF0000 (C++) represents full-intensity, pure blue, $0000FF00 (Delphi) or 0x0000FF00
(C++) is pure green, and $000000FF (Delphi) or 0x000000FF (C++) is pure red.
$00000000 (Delphi) or 0x00000000 (C++) is black and $00FFFFFF (Delphi) or
0x00FFFFFF (C++) is white.
If the highest-order byte is zero, the color obtained is the closest matching color in the
system palette. If the highest-order byte is one ($01 or 0x01), the color obtained is the
closest matching color in the currently realized palette. If the highest-order byte is two ($02
or 0x02), the value is matched with the nearest color in the logical palette of the current
device context.

Contents
 [hide] 

 1Normal Colors
 2System Colors
 3Web Colors
 4See Also

Normal Colors
The following table lists the colors that map to the closest matching color in the system
palette. These color constants are listed in Graphics unit (section Constants).

Value Meaning Hex Value  Color

clBlack Black $000000


clMaroon Maroon $000080
clGreen Green $008000
clOlive Olive Green $008080
clNavy Navy Blue $800000
clPurple Purple $800080
clTeal Teal $808000
clGray Gray $808080
clSilver Silver $C0C0C0
clRed Red $0000FF
clLime Lime Green $00FF00
clYellow Yellow $00FFFF
clBlue Blue $FF0000
clFuchsia Fuchsia $FF00FF
clAqua Aqua $FFFF00
clWhite White $FFFFFF
clMoneyGreen Mint Green $C0DCC0
clSkyBlue Sky Blue $F0CAA6
clCream Cream $F0FBFF
clMedGray Medium Gray $A4A0A0
clNone Represents no colors (black) $1FFFFFFF

System Colors
The following table lists the colors that are defined in the Windows Control panel.

Value Meaning Color

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
The default color for the control to which the color is
clDefault
assigned
Windows 98 or Windows 2000: Right-side color in the color
clGradientActiveCaption gradient of an active window's title bar. clActiveCaption
specifies the left side color.
Windows 98 or Windows 2000: Right-side color in the color
clGradientInactiveCaption 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
Windows 95 or NT 4.0 only: Dark shadow for three-
cl3DDkShadow
dimensional display elements
Windows 95 or NT 4.0 only: Light color for three-
cl3DLight 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

Web Colors
The following table contains the "cl" values from the Web Named Color palette. The values
are stored in the Windows COLORREF byte-order $00BBGGRR (Delphi) or 0x00BBGGRR
(C++).

Value Hex Value  Color

clWebSnow $FAFAFF
clWebFloralWhite $F0FAFF
clWebLavenderBlush $F5F0FF
clWebOldLace $E6F5FD
clWebIvory $F0FFFF
clWebCornSilk $DCF8FF
clWebBeige $DCF5F5
clWebAntiqueWhite $D7EBFA
clWebWheat $B3DEF5
clWebAliceBlue $FFF8F0
clWebGhostWhite $FFF8F8
clWebLavender $FAE6E6
clWebSeashell $EEF5FF
clWebLightYellow $E0FFFF
clWebPapayaWhip $D5EFFF
clWebNavajoWhite $ADDEFF
clWebMoccasin $B5E4FF
clWebBurlywood $87B8DE
clWebAzure $FFFFF0
clWebMintcream $FAFFF5
clWebHoneydew $F0FFF0
clWebLinen $E6F0FA
clWebLemonChiffon $CDFAFF
clWebBlanchedAlmond $CDEBFF
clWebBisque $C4E4FF
clWebPeachPuff $B9DAFF
clWebTan $8CB4D2
clWebYellow $00FFFF
clWebDarkOrange $008CFF
clWebRed $0000FF
clWebDarkRed $00008B
clWebMaroon $000080
clWebIndianRed $5C5CCD
clWebSalmon $7280FA
clWebCoral $507FFF
clWebGold $00D7FF
clWebTomato $4763FF
clWebCrimson $3C14DC
clWebBrown $2A2AA5
clWebChocolate $1E69D2
clWebSandyBrown $60A4F4
clWebLightSalmon $7AA0FF
clWebLightCoral $8080F0
clWebOrange $00A5FF
clWebOrangeRed $0045FF
clWebFirebrick $2222B2
clWebSaddleBrown $13458B
clWebSienna $2D52A0
clWebPeru $3F85CD
clWebDarkSalmon $7A96E9
clWebRosyBrown $8F8FBC
clWebPaleGoldenrod $AAE8EE
clWebLightGoldenrodYellow $D2FAFA
clWebOlive $008080
clWebForestGreen $228B22
clWebGreenYellow $2FFFAD
clWebChartreuse $00FF7F
clWebLightGreen $90EE90
clWebAquamarine $D4FF7F
clWebSeaGreen $578B2E
clWebGoldenRod $20A5DA
clWebKhaki $8CE6F0
clWebOliveDrab $238E6B
clWebGreen $008000
clWebYellowGreen $32CD9A
clWebLawnGreen $00FC7C
clWebPaleGreen $98FB98
clWebMediumAquamarine $AACD66
clWebMediumSeaGreen $71B33C
clWebDarkGoldenRod $0B86B8
clWebDarkKhaki $6BB7BD
clWebDarkOliveGreen $2F6B55
clWebDarkgreen $006400
clWebLimeGreen $32CD32
clWebLime $00FF00
clWebSpringGreen $7FFF00
clWebMediumSpringGreen $9AFA00
clWebDarkSeaGreen $8FBC8F
clWebLightSeaGreen $AAB220
clWebPaleTurquoise $EEEEAF
clWebLightCyan $FFFFE0
clWebLightBlue $E6D8AD
clWebLightSkyBlue $FACE87
clWebCornFlowerBlue $ED9564
clWebDarkBlue $8B0000
clWebIndigo $82004B
clWebMediumTurquoise $CCD148
clWebTurquoise $D0E040
clWebCyan $FFFF00
clWebPowderBlue $E6E0B0
clWebSkyBlue $EBCE87
clWebRoyalBlue $E16941
clWebMediumBlue $CD0000
clWebMidnightBlue $701919
clWebDarkTurquoise $D1CE00
clWebCadetBlue $A09E5F
clWebDarkCyan $8B8B00
clWebTeal $808000
clWebDeepskyBlue $FFBF00
clWebDodgerBlue $FF901E
clWebBlue $FF0000
clWebNavy $800000
clWebDarkViolet $D30094
clWebDarkOrchid $CC3299
clWebMagenta $FF00FF
clWebDarkMagenta $8B008B
clWebMediumVioletRed $8515C7
clWebPaleVioletRed $9370DB
clWebBlueViolet $E22B8A
clWebMediumOrchid $D355BA
clWebMediumPurple $DB7093
clWebPurple $800080
clWebDeepPink $9314FF
clWebLightPink $C1B6FF
clWebViolet $EE82EE
clWebOrchid $D670DA
clWebPlum $DDA0DD
clWebThistle $D8BFD8
clWebHotPink $B469FF
clWebPink $CBC0FF
clWebLightSteelBlue $DEC4B0
clWebMediumSlateBlue $EE687B
clWebLightSlateGray $998877
clWebWhite $FFFFFF
clWebLightgrey $D3D3D3
clWebGray $808080
clWebSteelBlue $B48246
clWebSlateBlue $CD5A6A
clWebSlateGray $908070
clWebWhiteSmoke $F5F5F5
clWebSilver $C0C0C0
clWebDimGray $696969
clWebMistyRose $E1E4FF
clWebDarkSlateBlue $8B3D48
clWebDarkSlategray $4F4F2F
clWebGainsboro $DCDCDC
clWebDarkGray $A9A9A9
clWebBlack $000000

See Also
 Color Constants
 Vcl.Graphics.TColor
 Colors in FireMonkey:
 System.UITypes.TColor
 System.UITypes.TColorRec

You might also like