OSDN Git Service

colors.RGBToNames dictionary: comment where the first 16 came from, and also add...
authorMichael Curran <mick@kulgan.net>
Wed, 15 Sep 2010 06:58:28 +0000 (16:58 +1000)
committerMichael Curran <mick@kulgan.net>
Wed, 15 Sep 2010 06:58:28 +0000 (16:58 +1000)
source/colors.py

index 0d87477..242af37 100644 (file)
@@ -10,6 +10,7 @@ import math
 RGB=namedtuple('RGB',('red','green','blue'))\r
 \r
 RGBToNames={\r
+       #Standard 16 HTML 4 colors\r
        RGB(0x00,0x00,0x00):_('black'),\r
        RGB(0x00,0x80,0x00):_('green'),\r
        RGB(0xc0,0xc0,0xc0):_('light grey'),\r
@@ -26,6 +27,8 @@ RGBToNames={
        RGB(0x00,0x80,0x80):_('teal'),\r
        RGB(0xff,0x00,0xff):_('fuchsia'),\r
        RGB(0x00,0xff,0xff):_('aqua'),\r
+       #Extra CSS 2.1 color\r
+       RGB(0xff,0xa5,0x00):_('orange'),\r
 }\r
 \r
 def findColorName(rgb):\r