http://outofmemory.cn/code-snippet/1960/php-color-define-table

 <?
////////////////////////////////////////////////////////
//
// colors.php - 这个程序只是定义了一些颜色的名字。
//
// Author: Claus Radloff
//
// 描述:定义了一个颜色名字的联合数组。每个实体是由一个颜
// 色的名字和其RGB的参数所组成。函数GetColor 用颜色名做
// 参数,并且返回一个由RGB颜色所组成的联合数组。
//
// 4/14/2000 Mouse Chen( litmouse@km169.net ) Translate it to Chinese $Colors = array( // HTML 3.规范中所定义的颜色
"black"=>array( "red"=>0x00, "green"=>0x00, "blue"=>0x00),
"maroon"=>array( "red"=>0x80, "green"=>0x00, "blue"=>0x00),
"green"=>array( "red"=>0x00, "green"=>0x80, "blue"=>0x00),
"olive"=>array( "red"=>0x80, "green"=>0x80, "blue"=>0x00),
"navy"=>array( "red"=>0x00, "green"=>0x00, "blue"=>0x80),
"purple"=>array( "red"=>0x80, "green"=>0x00, "blue"=>0x80),
"teal"=>array( "red"=>0x00, "green"=>0x80, "blue"=>0x80),
"gray"=>array( "red"=>0x80, "green"=>0x80, "blue"=>0x80),
"silver"=>array( "red"=>0xC0, "green"=>0xC0, "blue"=>0xC0),
"red"=>array( "red"=>0xFF, "green"=>0x00, "blue"=>0x00),
"lime"=>array( "red"=>0x00, "green"=>0xFF, "blue"=>0x00),
"yellow"=>array( "red"=>0xFF, "green"=>0xFF, "blue"=>0x00),
"blue"=>array( "red"=>0x00, "green"=>0x00, "blue"=>0xFF),
"fuchsia"=>array( "red"=>0xFF, "green"=>0x00, "blue"=>0xFF),
"aqua"=>array( "red"=>0x00, "green"=>0xFF, "blue"=>0xFF),
"white"=>array( "red"=>0xFF, "green"=>0xFF, "blue"=>0xFF), // Netscape and IE所附加定义的颜色
"aliceblue"=>array( "red"=>0xF0, "green"=>0xF8, "blue"=>0xFF),
"antiquewhite"=>array( "red"=>0xFA, "green"=>0xEB, "blue"=>0xD7),
"aquamarine"=>array( "red"=>0x7F, "green"=>0xFF, "blue"=>0xD4),
"azure"=>array( "red"=>0xF0, "green"=>0xFF, "blue"=>0xFF),
"beige"=>array( "red"=>0xF5, "green"=>0xF5, "blue"=>0xDC),
"blueviolet"=>array( "red"=>0x8A, "green"=>0x2B, "blue"=>0xE2),
"brown"=>array( "red"=>0xA5, "green"=>0x2A, "blue"=>0x2A),
"burlywood"=>array( "red"=>0xDE, "green"=>0xB8, "blue"=>0x87),
"cadetblue"=>array( "red"=>0x5F, "green"=>0x9E, "blue"=>0xA0),
"chartreuse"=>array( "red"=>0x7F, "green"=>0xFF, "blue"=>0x00),
"chocolate"=>array( "red"=>0xD2, "green"=>0x69, "blue"=>0x1E),
"coral"=>array( "red"=>0xFF, "green"=>0x7F, "blue"=>0x50),
"cornflowerblue"=>array( "red"=>0x64, "green"=>0x95, "blue"=>0xED),
"cornsilk"=>array( "red"=>0xFF, "green"=>0xF8, "blue"=>0xDC),
"crimson"=>array( "red"=>0xDC, "green"=>0x14, "blue"=>0x3C),
"darkblue"=>array( "red"=>0x00, "green"=>0x00, "blue"=>0x8B),
"darkcyan"=>array( "red"=>0x00, "green"=>0x8B, "blue"=>0x8B),
"darkgoldenrod"=>array( "red"=>0xB8, "green"=>0x86, "blue"=>0x0B),
"darkgray"=>array( "red"=>0xA9, "green"=>0xA9, "blue"=>0xA9),
"darkgreen"=>array( "red"=>0x00, "green"=>0x64, "blue"=>0x00),
"darkkhaki"=>array( "red"=>0xBD, "green"=>0xB7, "blue"=>0x6B),
"darkmagenta"=>array( "red"=>0x8B, "green"=>0x00, "blue"=>0x8B),
"darkolivegreen"=>array( "red"=>0x55, "green"=>0x6B, "blue"=>0x2F),
"darkorange"=>array( "red"=>0xFF, "green"=>0x8C, "blue"=>0x00),
"darkorchid"=>array( "red"=>0x99, "green"=>0x32, "blue"=>0xCC),
"darkred"=>array( "red"=>0x8B, "green"=>0x00, "blue"=>0x00),
"darksalmon"=>array( "red"=>0xE9, "green"=>0x96, "blue"=>0x7A),
"darkseagreen"=>array( "red"=>0x8F, "green"=>0xBC, "blue"=>0x8F),
"darkslateblue"=>array( "red"=>0x48, "green"=>0x3D, "blue"=>0x8B),
"darkslategray"=>array( "red"=>0x2F, "green"=>0x4F, "blue"=>0x4F),
"darkturquoise"=>array( "red"=>0x00, "green"=>0xCE, "blue"=>0xD1),
"darkviolet"=>array( "red"=>0x94, "green"=>0x00, "blue"=>0xD3),
"deeppink"=>array( "red"=>0xFF, "green"=>0x14, "blue"=>0x93),
"deepskyblue"=>array( "red"=>0x00, "green"=>0xBF, "blue"=>0xFF),
"dimgray"=>array( "red"=>0x69, "green"=>0x69, "blue"=>0x69),
"dodgerblue"=>array( "red"=>0x1E, "green"=>0x90, "blue"=>0xFF),
"firebrick"=>array( "red"=>0xB2, "green"=>0x22, "blue"=>0x22),
"floralwhite"=>array( "red"=>0xFF, "green"=>0xFA, "blue"=>0xF0),
"forestgreen"=>array( "red"=>0x22, "green"=>0x8B, "blue"=>0x22),
"gainsboro"=>array( "red"=>0xDC, "green"=>0xDC, "blue"=>0xDC),
"ghostwhite"=>array( "red"=>0xF8, "green"=>0xF8, "blue"=>0xFF),
"gold"=>array( "red"=>0xFF, "green"=>0xD7, "blue"=>0x00),
"goldenrod"=>array( "red"=>0xDA, "green"=>0xA5, "blue"=>0x20),
"greenyellow"=>array( "red"=>0xAD, "green"=>0xFF, "blue"=>0x2F),
"honeydew"=>array( "red"=>0xF0, "green"=>0xFF, "blue"=>0xF0),
"hotpink"=>array( "red"=>0xFF, "green"=>0x69, "blue"=>0xB4),
"indianred"=>array( "red"=>0xCD, "green"=>0x5C, "blue"=>0x5C),
"indigo"=>array( "red"=>0x4B, "green"=>0x00, "blue"=>0x82),
"ivory"=>array( "red"=>0xFF, "green"=>0xFF, "blue"=>0xF0),
"khaki"=>array( "red"=>0xF0, "green"=>0xE6, "blue"=>0x8C),
"lavender"=>array( "red"=>0xE6, "green"=>0xE6, "blue"=>0xFA),
"lavenderblush"=>array( "red"=>0xFF, "green"=>0xF0, "blue"=>0xF5),
"lawngreen"=>array( "red"=>0x7C, "green"=>0xFC, "blue"=>0x00),
"lemonchiffon"=>array( "red"=>0xFF, "green"=>0xFA, "blue"=>0xCD),
"lightblue"=>array( "red"=>0xAD, "green"=>0xD8, "blue"=>0xE6),
"lightcoral"=>array( "red"=>0xF0, "green"=>0x80, "blue"=>0x80),
"lightcyan"=>array( "red"=>0xE0, "green"=>0xFF, "blue"=>0xFF),
"lightgoldenrodyellow"=>array( "red"=>0xFA, "green"=>0xFA, "blue"=>0xD2),
"lightgreen"=>array( "red"=>0x90, "green"=>0xEE, "blue"=>0x90),
"lightgrey"=>array( "red"=>0xD3, "green"=>0xD3, "blue"=>0xD3),
"lightpink"=>array( "red"=>0xFF, "green"=>0xB6, "blue"=>0xC1),
"lightsalmon"=>array( "red"=>0xFF, "green"=>0xA0, "blue"=>0x7A),
"lightseagreen"=>array( "red"=>0x20, "green"=>0xB2, "blue"=>0xAA),
"lightskyblue"=>array( "red"=>0x87, "green"=>0xCE, "blue"=>0xFA),
"lightslategray"=>array( "red"=>0x77, "green"=>0x88, "blue"=>0x99),
"lightsteelblue"=>array( "red"=>0xB0, "green"=>0xC4, "blue"=>0xDE),
"lightyellow"=>array( "red"=>0xFF, "green"=>0xFF, "blue"=>0xE0),
"limegreen"=>array( "red"=>0x32, "green"=>0xCD, "blue"=>0x32),
"linen"=>array( "red"=>0xFA, "green"=>0xF0, "blue"=>0xE6),
"mediumaquamarine"=>array( "red"=>0x66, "green"=>0xCD, "blue"=>0xAA),
"mediumblue"=>array( "red"=>0x00, "green"=>0x00, "blue"=>0xCD),
"mediumorchid"=>array( "red"=>0xBA, "green"=>0x55, "blue"=>0xD3),
"mediumpurple"=>array( "red"=>0x93, "green"=>0x70, "blue"=>0xD0),
"mediumseagreen"=>array( "red"=>0x3C, "green"=>0xB3, "blue"=>0x71),
"mediumslateblue"=>array( "red"=>0x7B, "green"=>0x68, "blue"=>0xEE),
"mediumspringgreen"=>array( "red"=>0x00, "green"=>0xFA, "blue"=>0x9A),
"mediumturquoise"=>array( "red"=>0x48, "green"=>0xD1, "blue"=>0xCC),
"mediumvioletred"=>array( "red"=>0xC7, "green"=>0x15, "blue"=>0x85),
"midnightblue"=>array( "red"=>0x19, "green"=>0x19, "blue"=>0x70),
"mintcream"=>array( "red"=>0xF5, "green"=>0xFF, "blue"=>0xFA),
"mistyrose"=>array( "red"=>0xFF, "green"=>0xE4, "blue"=>0xE1),
"moccasin"=>array( "red"=>0xFF, "green"=>0xE4, "blue"=>0xB5),
"navajowhite"=>array( "red"=>0xFF, "green"=>0xDE, "blue"=>0xAD),
"oldlace"=>array( "red"=>0xFD, "green"=>0xF5, "blue"=>0xE6),
"olivedrab"=>array( "red"=>0x6B, "green"=>0x8E, "blue"=>0x23),
"orange"=>array( "red"=>0xFF, "green"=>0xA5, "blue"=>0x00),
"orangered"=>array( "red"=>0xFF, "green"=>0x45, "blue"=>0x00),
"orchid"=>array( "red"=>0xDA, "green"=>0x70, "blue"=>0xD6),
"palegoldenrod"=>array( "red"=>0xEE, "green"=>0xE8, "blue"=>0xAA),
"palegreen"=>array( "red"=>0x98, "green"=>0xFB, "blue"=>0x98),
"paleturquoise"=>array( "red"=>0xAF, "green"=>0xEE, "blue"=>0xEE),
"palevioletred"=>array( "red"=>0xDB, "green"=>0x70, "blue"=>0x93),
"papayawhip"=>array( "red"=>0xFF, "green"=>0xEF, "blue"=>0xD5),
"peachpuff"=>array( "red"=>0xFF, "green"=>0xDA, "blue"=>0xB9),
"peru"=>array( "red"=>0xCD, "green"=>0x85, "blue"=>0x3F),
"pink"=>array( "red"=>0xFF, "green"=>0xC0, "blue"=>0xCB),
"plum"=>array( "red"=>0xDD, "green"=>0xA0, "blue"=>0xDD),
"powderblue"=>array( "red"=>0xB0, "green"=>0xE0, "blue"=>0xE6),
"rosybrown"=>array( "red"=>0xBC, "green"=>0x8F, "blue"=>0x8F),
"royalblue"=>array( "red"=>0x41, "green"=>0x69, "blue"=>0xE1),
"saddlebrown"=>array( "red"=>0x8B, "green"=>0x45, "blue"=>0x13),
"salmon"=>array( "red"=>0xFA, "green"=>0x80, "blue"=>0x72),
"sandybrown"=>array( "red"=>0xF4, "green"=>0xA4, "blue"=>0x60),
"seagreen"=>array( "red"=>0x2E, "green"=>0x8B, "blue"=>0x57),
"seashell"=>array( "red"=>0xFF, "green"=>0xF5, "blue"=>0xEE),
"sienna"=>array( "red"=>0xA0, "green"=>0x52, "blue"=>0x2D),
"skyblue"=>array( "red"=>0x87, "green"=>0xCE, "blue"=>0xEB),
"slateblue"=>array( "red"=>0x6A, "green"=>0x5A, "blue"=>0xCD),
"slategray"=>array( "red"=>0x70, "green"=>0x80, "blue"=>0x90),
"snow"=>array( "red"=>0xFF, "green"=>0xFA, "blue"=>0xFA),
"springgreen"=>array( "red"=>0x00, "green"=>0xFF, "blue"=>0x7F),
"steelblue"=>array( "red"=>0x46, "green"=>0x82, "blue"=>0xB4),
"tan"=>array( "red"=>0xD2, "green"=>0xB4, "blue"=>0x8C),
"thistle"=>array( "red"=>0xD8, "green"=>0xBF, "blue"=>0xD8),
"tomato"=>array( "red"=>0xFF, "green"=>0x63, "blue"=>0x47),
"turquoise"=>array( "red"=>0x40, "green"=>0xE0, "blue"=>0xD0),
"violet"=>array( "red"=>0xEE, "green"=>0x82, "blue"=>0xEE),
"wheat"=>array( "red"=>0xF5, "green"=>0xDE, "blue"=>0xB3),
"whitesmoke"=>array( "red"=>0xF5, "green"=>0xF5, "blue"=>0xF5),
"yellowgreen"=>array( "red"=>0x9A, "green"=>0xCD, "blue"=>0x32)); // GetColor函数返回一个有关RGB三原色的联合数组
function GetColor($Colorname)
{
global $Colors;
return $Colors[$Colorname];
}
?>

php的颜色定义表的更多相关文章

  1. HTML RGB 颜色表 16进制表 颜色对应表

    HTML RGB 颜色表 16进制表 颜色对应表  16 常用颜色表(颜色 + RGB + 名字): Color Value Name   Color Value Name   #00FFFF aqu ...

  2. SQL 用户定义表类型,在存储过程里使用表类型,表参数作参数

    .定义表类型SUTDENTTYPE,包含三个字段,分别对应学生表的NAME,SEX和PHONE.之所以如此创建,我是准备在插入新学生数据的存储过程中,以它为参数.   GO CREATE TYPE S ...

  3. python 颜色定义

    1.颜色定义说明格式:\033[显示方式;前景色;背景色m前景色 背景色 颜色---------------------------------------30 40 黑色31 41 红色32 42 ...

  4. oracle在线重定义表

    在一个高可用系统中,如果需要改变一个表的定义是一件比较棘手的问题,尤其是对于7×24系统.Oracle提供的基本语法基本可以满足一般性修改,但是对于把普通堆表改为分区表,把索引组织表修改为堆表等操作就 ...

  5. Sql server 浅谈用户定义表类型

    1.1 简介 SQL Server 中,用户定义表类型是指用户所定义的表示表结构定义的类型.您可以使用用户定义表类型为存储过程或函数声明表值参数,或者声明您要在批处理中或在存储过程或函数的主体中使用的 ...

  6. android 中 ColorDrawable dw = new ColorDrawable(0x3ccccccc),关于颜色定义的总结

    android 中  ColorDrawable dw = new ColorDrawable(0x3ccccccc),关于颜色定义的总结 0x3ccccccc 拆分开来 0x-3c-cccccc   ...

  7. 基于 dbms_redefinition 在线重定义表

    Oracle 支持在线重定义表,也就是说我们可以在修改表结构(DDL)的同时进行相关的DQL.DML操作,使得前端的DML根本感觉不到表结构实际上已经发生了变化,对于用户而言是完全透明的.当然在线重定 ...

  8. dbms_redefinition在线重定义表结构 可以在表分区的时候使用

    dbms_redefinition在线重定义表结构 (2013-08-29 22:52:58) 转载▼ 标签: dbms_redefinition 非分区表转换成分区表 王显伟 在线重定义表结构 在线 ...

  9. dbms_redefinition在线重定义表结构

    dbms_redefinition在线重定义表结构 (2013-08-29 22:52:58) 转载▼ 标签: dbms_redefinition 非分区表转换成分区表 王显伟 在线重定义表结构 在线 ...

随机推荐

  1. NGUI自适应屏幕分辨率

    unity官方承诺的新ui系统一直没有推出来,我们的UI使用的是原生的OnGUI系统,刚好UI需要改版,索性就想迁到NGUI上面来,于是看了一下NGUI源码,发现NGUI可以大大的降低DrawCall ...

  2. Kafka的架构设计(目前翻译最好的一稿)

    转自:http://www.oschina.net/translate/kafka-design 参与翻译(4人):fbm, 飞翔的猴子, Khiyuan, nesteaa 感谢这些同志们的辛勤工作, ...

  3. C#接收xmlrpc接口返回哈希表格式

    C#在调用xmlrpc接口时返回的是int值就可以直接获取,最近在调用一个接口是获取一个账号记录的详细信息,xmlrpc接口返回的是一个哈希值. 所以直接用int或者Hashtable 来获取返回值执 ...

  4. 用sencha touch的Cmd创建的MVC工程需要注意的问题

    用ST的cmd创建的js文件都是ANSI编码格式的,所以导致无法正常显示中文.例如传输的参数为中文时就为乱码,导致各种问题... 解决办法:将js文件用记事本打开,另存为,选择编码为UTF-8,覆盖原 ...

  5. DNS域名解析服务

    一.DNS的体系结构: DNS:域名解析系统 DNS由根域.顶级域和子域构成.根域主要负责管理顶级域,顶级域主要负责管理其下面子域. .代表DNS的根域. .com..edu等代表顶级域. shou. ...

  6. AutoCAD .NET二次开发(二)

    今天专门讲一个--CommandMethod.我们都在知道CAD操作要快,必须要熟悉掌握各种命令.在Lisp开发中,在函数后C:即可添加一个命令,非常方法,在.NET API也可以非常方便的设置命令, ...

  7. liunx系统安装tomcat的方法

    安装tomcat前需要先安装jdk,安装jdk的方法参考我的上一篇文章:liunx系统安装jdk的方法 1.下载tomcat 下载地址:http://tomcat.apache.org/downloa ...

  8. GetCursorPos

      获取桌面坐标 using System; using System.Collections.Generic; using System.ComponentModel; using System.D ...

  9. PagerAdapter刷新问题

    一.PagerAdapter介绍 PagerAdapter简介 ListView 大家应该都很熟悉吧!ListView 一般都需要一个 Adapter 来填充数据,如 ArrayAdapter.Sim ...

  10. nginx做正向代理(Centos7,支持http和https)

    默认的情况下,使用nginx做正向代理可以解析http请求, 对于诸如baidu.com这样的https请求,nginx默认并不支持,不过我们可以借助第三方模块来实现. 1.先说默认情况下的代理配置 ...