文档章节

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
15 款代码语法高亮工具,美化你的代码

语法高亮是文本编辑器用来显示文本的,特别是源代码,根据不同的类别来用不同的颜色和字体显示。这个功能有助于编写结构化的语言,比如编程语言,标记语言,这些语言的语法错误显示是有区别的...

oschina
2014/03/13
23.2K
11
创建交互式地项目甘特图​以及日程安排图的控件GTP.NET

GTP.NET是一个综合全面的基于.NET的甘特图控件,可以帮助软件开发人员可视化和熟练地操作基于时间的信息,控件包含了一系列界面控件以便操作时间块。使用该控件可以创建交互式地项目甘特图以及...

netkongjian
2014/06/10
0
0
集成开发环境--Delphi

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

匿名
2009/03/11
21K
1

没有更多内容

加载失败,请刷新页面

加载更多

【挑战剑指offer】系列03:逆序打印单链表

本系列的算法原题来自于“牛客网-剑指offer”,写这个板块,不仅仅是解决算法问题本身,更是手动提高难度、自行变式,思考更多的解决方案,以带给自己一些启发。 1. 【逆序打印单链表】原始题...

LinkedBear
20分钟前
1
0
Linux内存布局

今天这篇文章主要是我之前看Linux内核相关知识和博客Gustavo Duarte中。我主要是看了这篇博客,并且结合之前的知识,对内存管理的的理解又上升了一个档次。所以想通过这篇文章总结下。 我们先...

linuxprobe16
39分钟前
1
0
day94-20180921-英语流利阅读-待学习

记录死亡还是消费死者?自杀报道的媒体偏见 雪梨 2018-09-21 1.今日导读 自杀事件报道一直是新闻报道的重要部分,具有骇人听闻、吸引眼球的特点。可是在报道这些事件的时候,除了客观陈述事实...

飞鱼说编程
45分钟前
3
0
如何通过 J2Cache 实现分布式 session 存储

做 Java Web 开发的人多数都会需要使用到 session (会话),我们使用 session 来保存一些需要在两个不同的请求之间共享数据。一般 Java 的 Web 容器像 Tomcat、Resin、Jetty 等等,它们会在...

红薯
今天
3
0
C++ std::thread

C++11提供了std::thread类来表示一个多线程对象。 1,首先介绍一下std::this_thread命名空间: (1)std::this_thread::get_id():返回当前线程id (2)std::this_thread::yield():用户接口...

yepanl
今天
3
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部