文档章节

Delphi 中的颜色

涂孟超
 涂孟超
发布于 2014/09/26 15:35
字数 740
阅读 4
收藏 0
//全以红色举例:

//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 }

本文转载自:http://www.cnblogs.com/del/archive/2007/12/08/987652.html

共有 人打赏支持
涂孟超
粉丝 12
博文 2011
码字总数 14107
作品 0
深圳
程序员
私信 提问
支持Delphi/C++Builder的文字处理控件TRichView

TRichView 是一套支持Delphi/C++Builder的控件,有和Word相似的功能,主要用于编辑、显示和打印超文本文档。该控件支持各种各样不同的属性(字体、下标和上标,自定义下拉列表,文本背景颜色...

yidongkaifa
2014/04/22
0
0
cxStyleRepository的使用方法

在Delphi中使用cxGrid或cxTreeList时,对原生的控件配色不满意,需要定制更友好的颜色,这时候cxStyleRepository就派上用场了。 工具:向窗体添加一个cxGrid,并设置好几列: 修改cxGridDBT...

reherin
2016/01/11
23
0
集成开发环境--Delphi

Delphi,是美国Borland(宝兰)公司於1995年开发在Windows平台下的快速应用程式开发工具(Rapid Application Development,简称RAD),它的前身是在DOS下的产品Borland Turbo Pascal。(非开源...

匿名
2009/03/11
21K
1
Delphi惹谁了?

Delphi惹谁了? 最早的时候就有C++程序员做Win23的产品没有Delphi程序员快,不服气地说Delphi的不好,理由是Delphi只能拖拉控件,不能OOP。几年以前,当Java刚刚火起来的时候,Java程序员说D...

vga
2016/08/09
35
6
Delphi的网友评论

Delphi,是美国Borland(宝兰)公司於1995年开发在Windows平台下的快速应用程式开发工具(Rapid Application Development,简称RAD),它的前身是在DOS下的产品Borland Turbo Pascal。(非开源...

红薯
2009/12/11
541
7

没有更多内容

加载失败,请刷新页面

加载更多

Java 动态代理的实现

在Java中可以实现动态代理的方式有很多种:JDK方式、ASM字节码操控框架、开源的分析、编辑和创建Java字节码的类库Javassist、基于ASM框架实现的CGLIB JDK方式:通过Java反射的方式生成动态代...

我爱春天的毛毛雨
16分钟前
1
0
css 总结2

1、背景有关 (1)background-origin:border-box、padding-box、content-box //默认是padding-box(2)background-image: url(img_flwr.gif), url(paper.gif);(3)background-posi......

tianyawhl
17分钟前
1
0
java 每秒钟只允许十个线程同时并发

package com.qimh.thread.concurrent;import java.util.Date;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;import java.util.concurren......

qimh
32分钟前
4
0
学习Hadoop大数据基础框架

什么是大数据?进入本世纪以来,尤其是2010年之后,随着互联网特别是移动互联网的发展,数据的增长呈爆炸趋势,已经很难估计全世界的电子设备中存储的数据到底有多少,描述数据系统的数据量的...

本宫没空2
34分钟前
2
0
redis

1,安装 sudo apt-get install redis-server 2,登录本地的 redis-cli 3,修改 .bashrc文件,连接其他线下数据库 vi .bashrc在最后增加alias redisa="redis-cli -h 10.15.100.134 -p 666...

鹏灬
39分钟前
1
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部