2007年10月26日 星期五

BCB color type


TColor is used to specify the color of an object.


Unit


Graphics


enum TColor {clMin=-0x7fffffff-1, clMax=0x7fffffff};


Description


TColor is used to specify the color of an object. It is used by the Color property of many components and by a number of other properties that specify color values.


The 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 Graphics unit, the low three bytes represent RGB color intensities for blue, green, and red, respectively. The value 0x00FF0000 represents full-intensity, pure blue, 0x0000FF00 is pure green, and 0x000000FF is pure red. 0x00000000 is black and 0x00FFFFFF is white.


If the highest-order byte is zero (0x00), the color obtained is the closest matching color in the system palette. If the highest-order byte is one (0x01), the color obtained is the closest matching color in the currently realized palette. If the highest-order byte is two (0x02), the value is matched with the nearest color in the logical palette of the current device context.


The following tables lists the color constants from the Graphics unit. The first two columns list the colors that map to the closest matching color in the system palette, while the last two columns list the colors that are defined in the Windows Control panel.


Value Meaning Value Meaning


clNone White on Windows 9x, Black on NT. clScrollBar Current color for the of scroll bar track.


clAqua Aqua clBackground Current background color of the Windows desktop


clBlack Black clActiveCaption Current color of the title bar of the active window


clBlue Blue clInactiveCaption Current color of the title bar of inactive windows


clCream Cream clMenu Current background color of menus


clDkGray Dark Gray clWindow Current background color of windows


clFuchsia Fuchsia clWindowFrame Current color of window frames


clGray Gray clMenuText Current color of text on menus


clGreen Green clWindowText Current color of text in windows


clLime Lime green clCaptionText Current color of the text on the title bar of the active window


clLtGray Light Gray clActiveBorder Current border color of the active window


clMaroon Maroon clInactiveBorder Current border color of inactive windows


clMedGray Medium Gray clAppWorkSpace Current color of the application workspace


clMoneyGreen Mint green clHighlight Current background color of selected text


clNavy Navy blue clHightlightText Current color of selected text


clOlive Olive green clBtnFace Current color of a button face


clPurple Purple clBtnShadow Current color of a shadow cast by a button


clRed Red clGrayText Current color of text that is dimmed


clSilver Silver clBtnText Current color of text on a button


clSkyBlue Sky blue clInactiveCaptionText Current color of the text on the title bar of an inactive window


clTeal Teal clBtnHighlight Current color of the highlighting on a button


clWhite White cl3DDkShadow Windows 95 or NT 4.0 only: Dark shadow for three-dimensional display elements


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


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


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


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.


clDefault The default color for the control to which the color is assigned.


linked from BCB6 help.

沒有留言: