Sunteți pe pagina 1din 6

Colors in VCL - RAD Studio XE3

1 of 6

http://docwiki.embarcadero.com/RADStudio/XE3/en/Colors_in_VCL

Show: Delphi
C++
Display Preferences

Colors in VCL
From RAD Studio XE3
Go Up to Using the RTL Index
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
1 Normal Colors
2 System Colors
3 Web Colors
4 See 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
clNone
clAqua
clBlack
clBlue
clCream
clDkGray
clFuchsia

Meaning
Hex Value Color
Represents no colors (black) $1FFFFFFF
Aqua
$FFFF00
Black
$000000
Blue
$FF0000
Cream
$F0FBFF
Dark Grey
$808080
Fuchsia
$FF00FF

26.10.2012 09:47

Colors in VCL - RAD Studio XE3

2 of 6

http://docwiki.embarcadero.com/RADStudio/XE3/en/Colors_in_VCL

clGray
Gray
clGreen
Green
clLime
Lime Green
clLtGray
Light Gray
clMaroon
Maroon
clMedGray
Medium Gray
clMoneyGreen Mint Green
clNavy
Navy Blue
clOlive
Olive Green
clPurple
Purple
clRed
Red
clSilver
Silver
clSkyBlue
Sky Blue
clTeal
Teal
clWhite
White
clYellow
Yellow

$808080
$008000
$00FF00
$C0C0C0
$000080
$A4A0A0
$C0DCC0
$800000
$008080
$800080
$0000FF
$C0C0C0
$F0CAA6
$808000
$FFFFFF
$00FFFF

System Colors
The following table lists the colors that are defined in the Windows Control panel.
Value
clScrollBar
clBackground
clActiveCaption
clInactiveCaption
clMenu
clWindow
clWindowFrame
clMenuText
clWindowText
clCaptionText
clActiveBorder
clInactiveBorder
clAppWorkSpace
clHighlight
clHighlightText
clBtnFace
clBtnShadow
clGrayText
clBtnText
clInactiveCaptionText
clBtnHighlight
cl3DDkShadow
cl3DLight
clInfoText

Meaning
Current color of the scroll bar track
Current background color of the Windows desktop
Current color of the active window's title bar
Current color of inactive windows' title bar
Current background color of menus
Current background color of windows
Current color of window frames
Current color of text on menus
Current color of text in windows
Current color of the text on the active window's title bar
Current border color of the active window
Current border color of inactive windows
Current color of the application workspace
Current background color of selected text
Current color of selected text
Current color of a button face
Current color of a shadow cast by a button
Current color of dimmed text
Current color of text on a button
Current color of the text on an inactive window's title bar
Current color of the highlighting on a button
Windows 95 or NT 4.0 only: Dark shadow for three-dimensional display elements
Windows 95 or NT 4.0 only: Light color for three-dimensional display elements
(for edges facing the light source)
Windows 95 or NT 4.0 only: Text color for tool tip controls

26.10.2012 09:47

Colors in VCL - RAD Studio XE3

3 of 6

http://docwiki.embarcadero.com/RADStudio/XE3/en/Colors_in_VCL

clInfoBk

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


Windows 98 or Windows 2000: Right-side color in the color gradient of an active
clGradientActiveCaption
window's title bar. clActiveCaption specifies the left side color.
Windows 98 or Windows 2000: Right-side color in the color gradient of an
clGradientInactiveCaption
inactive window's title bar. clInactiveCaption specifies the left side color.
clDefault
The default color for the control to which the color is assigned
clMenuHighlight
Current color of the highlighting on a menu
clMenuBar
Current color of the menu bar

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
clWebSnow
clWebFloralWhite
clWebLavenderBlush
clWebOldLace
clWebIvory
clWebCornSilk
clWebBeige
clWebAntiqueWhite
clWebWheat
clWebAliceBlue
clWebGhostWhite
clWebLavender
clWebSeashell
clWebLightYellow
clWebPapayaWhip
clWebNavajoWhite
clWebMoccasin
clWebBurlywood
clWebAzure
clWebMintcream
clWebHoneydew
clWebLinen
clWebLemonChiffon
clWebBlanchedAlmond
clWebBisque
clWebPeachPuff
clWebTan
clWebYellow
clWebDarkOrange
clWebRed
clWebDarkRed
clWebMaroon

Hex Value Color


$FAFAFF
$F0FAFF
$F5F0FF
$E6F5FD
$F0FFFF
$DCF8FF
$DCF5F5
$D7EBFA
$B3DEF5
$FFF8F0
$FFF8F8
$FAE6E6
$EEF5FF
$E0FFFF
$D5EFFF
$ADDEFF
$B5E4FF
$87B8DE
$FFFFF0
$FAFFF5
$F0FFF0
$E6F0FA
$CDFAFF
$CDEBFF
$C4E4FF
$B9DAFF
$8CB4D2
$00FFFF
$008CFF
$0000FF
$00008B
$000080

26.10.2012 09:47

Colors in VCL - RAD Studio XE3

4 of 6

http://docwiki.embarcadero.com/RADStudio/XE3/en/Colors_in_VCL

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

26.10.2012 09:47

Colors in VCL - RAD Studio XE3

5 of 6

clWebPaleTurquoise
clWebLightCyan
clWebLightBlue
clWebLightSkyBlue
clWebCornFlowerBlue
clWebDarkBlue
clWebIndigo
clWebMediumTurquoise
clWebTurquoise
clWebCyan
clWebAqua
clWebPowderBlue
clWebSkyBlue
clWebRoyalBlue
clWebMediumBlue
clWebMidnightBlue
clWebDarkTurquoise
clWebCadetBlue
clWebDarkCyan
clWebTeal
clWebDeepskyBlue
clWebDodgerBlue
clWebBlue
clWebNavy
clWebDarkViolet
clWebDarkOrchid
clWebMagenta
clWebFuchsia
clWebDarkMagenta
clWebMediumVioletRed
clWebPaleVioletRed
clWebBlueViolet
clWebMediumOrchid
clWebMediumPurple
clWebPurple
clWebDeepPink
clWebLightPink
clWebViolet
clWebOrchid
clWebPlum
clWebThistle
clWebHotPink
clWebPink
clWebLightSteelBlue
clWebMediumSlateBlue
clWebLightSlateGray
clWebWhite

http://docwiki.embarcadero.com/RADStudio/XE3/en/Colors_in_VCL

$EEEEAF
$FFFFE0
$E6D8AD
$FACE87
$ED9564
$8B0000
$82004B
$CCD148
$D0E040
$FFFF00
$FFFF00
$E6E0B0
$EBCE87
$E16941
$CD0000
$701919
$D1CE00
$A09E5F
$8B8B00
$808000
$FFBF00
$FF901E
$FF0000
$800000
$D30094
$CC3299
$FF00FF
$FF00FF
$8B008B
$8515C7
$9370DB
$E22B8A
$D355BA
$DB7093
$800080
$9314FF
$C1B6FF
$EE82EE
$D670DA
$DDA0DD
$D8BFD8
$B469FF
$CBC0FF
$DEC4B0
$EE687B
$998877
$FFFFFF

26.10.2012 09:47

Colors in VCL - RAD Studio XE3

6 of 6

clWebLightgrey
clWebGray
clWebSteelBlue
clWebSlateBlue
clWebSlateGray
clWebWhiteSmoke
clWebSilver
clWebDimGray
clWebMistyRose
clWebDarkSlateBlue
clWebDarkSlategray
clWebGainsboro
clWebDarkGray
clWebBlack

http://docwiki.embarcadero.com/RADStudio/XE3/en/Colors_in_VCL

$D3D3D3
$808080
$B48246
$CD5A6A
$908070
$F5F5F5
$C0C0C0
$696969
$E1E4FF
$8B3D48
$4F4F2F
$DCDCDC
$A9A9A9
$000000

See Also
Color Constants
Vcl.Graphics.TColor
System.UITypes.TColor
Retrieved from "http://docwiki.embarcadero.com/RADStudio/XE3/e/index.php?title=Colors_in_VCL&
oldid=185546"
Categories: Win32 Developer's Guide Delphi C++
This page was last modified on 23 September 2012, at 21:13.
Help Feedback

26.10.2012 09:47

S-ar putea să vă placă și