本文整理自网络,侵删。
Delphi 中的颜色
//全以红色举例:
//1. RGB 模式:
Self.Color := $0000ff;
//不过和HTML中的 #ff0000 是反的,应该叫 BGR。
--------------------------------------------------------------------------------
//2. RGB 分值,譬如:
Self.Color := RGB(255,0,0);
--------------------------------------------------------------------------------
//3. Delphi 中的标准模式:
Self.Color := $000000ff;
//其中低3位字节代表RGB(BGR)相应的颜色;
//如果最高位字节是$00,则表示用系统调色板中最相近的颜色;
//最高位字节是$01,则表示用当前调色板中最相近的颜色匹配;
//最高位字节是$02,则用当前设备描述表中逻辑调色板的次相近颜色匹配。
--------------------------------------------------------------------------------
//4. 整数:
Self.Color := 255;
//十六进制转换来的整数。
--------------------------------------------------------------------------------
//5. 颜色常量:
Self.Color := clRed;
//Delphi 预定义的常量有:
clSystemColor = $FF000000;
clScrollBar = TColor(clSystemColor or COLOR_SCROLLBAR);
clBackground = TColor(clSystemColor or COLOR_BACKGROUND);
clActiveCaption = TColor(clSystemColor or COLOR_ACTIVECAPTION);
clInactiveCaption = TColor(clSystemColor or COLOR_INACTIVECAPTION);
clMenu = TColor(clSystemColor or COLOR_MENU);
clWindow = TColor(clSystemColor or COLOR_WINDOW);
clWindowFrame = TColor(clSystemColor or COLOR_WINDOWFRAME);
clMenuText = TColor(clSystemColor or COLOR_MENUTEXT);
clWindowText = TColor(clSystemColor or COLOR_WINDOWTEXT);
clCaptionText = TColor(clSystemColor or COLOR_CAPTIONTEXT);
clActiveBorder = TColor(clSystemColor or COLOR_ACTIVEBORDER);
clInactiveBorder = TColor(clSystemColor or COLOR_INACTIVEBORDER);
clAppWorkSpace = TColor(clSystemColor or COLOR_APPWORKSPACE);
clHighlight = TColor(clSystemColor or COLOR_HIGHLIGHT);
clHighlightText = TColor(clSystemColor or COLOR_HIGHLIGHTTEXT);
clBtnFace = TColor(clSystemColor or COLOR_BTNFACE);
clBtnShadow = TColor(clSystemColor or COLOR_BTNSHADOW);
clGrayText = TColor(clSystemColor or COLOR_GRAYTEXT);
clBtnText = TColor(clSystemColor or COLOR_BTNTEXT);
clInactiveCaptionText = TColor(clSystemColor or COLOR_INACTIVECAPTIONTEXT);
clBtnHighlight = TColor(clSystemColor or COLOR_BTNHIGHLIGHT);
cl3DDkShadow = TColor(clSystemColor or COLOR_3DDKSHADOW);
cl3DLight = TColor(clSystemColor or COLOR_3DLIGHT);
clInfoText = TColor(clSystemColor or COLOR_INFOTEXT);
clInfoBk = TColor(clSystemColor or COLOR_INFOBK);
clHotLight = TColor(clSystemColor or COLOR_HOTLIGHT);
clGradientActiveCaption = TColor(clSystemColor or COLOR_GRADIENTACTIVECAPTION);
clGradientInactiveCaption = TColor(clSystemColor or COLOR_GRADIENTINACTIVECAPTION);
clMenuHighlight = TColor(clSystemColor or COLOR_MENUHILIGHT);
clMenuBar = TColor(clSystemColor or COLOR_MENUBAR);
clBlack = TColor($000000);
clMaroon = TColor($000080);
clGreen = TColor($008000);
clOlive = TColor($008080);
clNavy = TColor($800000);
clPurple = TColor($800080);
clTeal = TColor($808000);
clGray = TColor($808080);
clSilver = TColor($C0C0C0);
clRed = TColor($0000FF);
clLime = TColor($00FF00);
clYellow = TColor($00FFFF);
clBlue = TColor($FF0000);
clFuchsia = TColor($FF00FF);
clAqua = TColor($FFFF00);
clLtGray = TColor($C0C0C0);
clDkGray = TColor($808080);
clWhite = TColor($FFFFFF);
StandardColorsCount = 16;
clMoneyGreen = TColor($C0DCC0);
clSkyBlue = TColor($F0CAA6);
clCream = TColor($F0FBFF);
clMedGray = TColor($A4A0A0);
ExtendedColorsCount = 4;
clNone = TColor($1FFFFFFF);
clDefault = TColor($20000000);
{ The following "cl" values come from the Web Named Color palette and
are stored in the Windows COLORREF byte order x00bbggrr }
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;
// yellows/reds yellow -> rosybrown
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;
// greens palegoldenrod -> darkseagreen
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;
// greens/blues lightseagreen -> navy
clWebLightSeaGreen = $AAB220;
clWebPaleTurquoise = $EEEEAF;
clWebLightCyan = $FFFFE0;
clWebLightBlue = $E6D8AD;
clWebLightSkyBlue = $FACE87;
clWebCornFlowerBlue = $ED9564;
clWebDarkBlue = $8B0000;
clWebIndigo = $82004B;
clWebMediumTurquoise = $CCD148;
clWebTurquoise = $D0E040;
clWebCyan = $FFFF00; // clWebAqua
clWebAqua = $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;
// violets/pinks darkviolet -> pink
clWebDarkViolet = $D30094;
clWebDarkOrchid = $CC3299;
clWebMagenta = $FF00FF; // clWebFuchsia
clWebFuchsia = $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;
// blue/gray/black lightsteelblue -> black
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;
WebColorsCount = 140; { Two of which are duplicates Aqua/Cyan Fuchsia/Magenta }
相关阅读 >>
Delphi xe5 android平台 调用 webservice
更多相关阅读请进入《Delphi》频道 >>