Skip to content

Commit

Permalink
added missing x11 colors
Browse files Browse the repository at this point in the history
  • Loading branch information
fmhun committed Feb 9, 2012
1 parent ad2a980 commit b5baa1e
Showing 1 changed file with 139 additions and 81 deletions.
220 changes: 139 additions & 81 deletions lib/colorist/color.rb
Expand Up @@ -23,87 +23,145 @@ class Color
"silver" => 0xc0c0c0,
"gray" => 0x808080 }

X11_COLOR_NAMES = { "alice_blue" => 0xF0F8FF,
"anthique_white" => 0xFAEBD7,
"aqua" => 0x00FFFF,
"auquamarine" => 0x7FFFD4,
"azure" => 0xF0FFFF,
"beige" => 0xF5F5DC,
"bisque" => 0xFFE4C4,
"black" => 0x000000,
"blanched_almond" => 0xFFEBCD,
"blue" => 0x0000FF,
"blue_violet" => 0x8A2BE2,
"brown" => 0xA52A2A,
"burly_wood" => 0xDEB887,
"cadet blue" => 0x5F9EA0,
"chartreuse" => 0x7FFF00,
"chocolate" => 0xD2691E,
"coral" => 0xFF7F50,
"cornflower" => 0x6495ED,
"cornslik" => 0xFFF8DC,
"crimson" => 0xDC143C,
"cyan" => 0x00FFFF,
"dark_blue" => 0x00008B,
"dark_cyan" => 0x008B8B,
"dark_goldenrod" => 0xB8860B,
"dark_gray" => 0xA9A9A9,
"dark_green" => 0x006400,
"dark_khaki" => 0xBDB76B,
"dark_magenta" => 0x8B008B,
"dark_olive_green" => 0x556B2F,
"dark_orange" => 0xFF8C00,
"dark_orchid" => 0x9932CC,
"dark_red" => 0x8B0000,
"dark_salmon" => 0xE9967A,
"dark_sea_green" => 0x8FBC8F,
"dark_slate_blue" => 0x483D8B,
"dark_slate_gray" => 0x2F4F4F,
"dark_turquoise" => 0x00CED1,
"dark_violet" => 0x9400D3,
"deep_pink" => 0xFF1493,
"deep_sky_blue" => 0x00BFFF,
"dim_gray" => 0x696969,
"dodger_blue" => 0x1E90FF,
"firebrick" => 0xB22222,
"floral_white" => 0xFFFAF0,
"forest_green" => 0x228B22,
"fuchsia" => 0xFF00FF,
"gainsboro" => 0xDCDCDC,
"ghost_white" => 0xF8F8FF,
"gold" => 0xFFD700,
"goldenrod" => 0xDAA520,
"gray" => 0xBEBEBE,
"green" => 0x008000,
"green_yellow" => 0xADFF2F,
"honeydew" => 0xF0FFF0,
"hot_pink" => 0xFF69B4,
"indian_red" => 0xCD5C5C,
"indigo" => 0x4B0082,
"ivory" => 0xFFFFF0,
"khaki" => 0xF0E68C,
"lavender" => 0xE6E6FA,
"lavender_blush" => 0xFFF0F5,
"lawn_green" => 0x7CFC00,
"lemon_chiffon" => 0xFFFACD,
"light_blue" => 0xADD8E6,
"light_coral" => 0xF08080,
"light_cyan" => 0xE0FFFF,
"light_goldenrod" => 0xFAFAD2,
"light_gray" => 0xD3D3D3,
"light_green" => 0x90EE90,
"" => 0x,
"" => 0x,
"" => 0x,
"" => 0x,
"" => 0x,
"" => 0x,
"" => 0x,
"" => 0x,
"" => 0x,
"" => 0x,
}

X11_COLOR_NAMES = { "alice_blue" => 0xf0f8ff,
"anthique_white" => 0xfaebd7,
"aqua" => 0x00ffff,
"auquamarine" => 0x7fffd4,
"azure" => 0xf0ffff,
"beige" => 0xf5f5dc,
"bisque" => 0xffe4c4,
"black" => 0x000000,
"blanched_almond" => 0xffebcd,
"blue" => 0x0000ff,
"blue_violet" => 0x8a2be2,
"brown" => 0xa52a2a,
"burly_wood" => 0xdeb887,
"cadet blue" => 0x5f9ea0,
"chartreuse" => 0x7fff00,
"chocolate" => 0xd2691e,
"coral" => 0xff7f50,
"cornflower" => 0x6495ed,
"cornslik" => 0xfff8dc,
"crimson" => 0xdc143c,
"cyan" => 0x00ffff,
"dark_blue" => 0x00008b,
"dark_cyan" => 0x008b8b,
"dark_goldenrod" => 0xb8860b,
"dark_gray" => 0xa9a9a9,
"dark_green" => 0x006400,
"dark_khaki" => 0xbdb76b,
"dark_magenta" => 0x8b008b,
"dark_olive_green" => 0x556b2f,
"dark_orange" => 0xff8c00,
"dark_orchid" => 0x9932cc,
"dark_red" => 0x8b0000,
"dark_salmon" => 0xe9967a,
"dark_sea_green" => 0x8fbc8f,
"dark_slate_blue" => 0x483d8b,
"dark_slate_gray" => 0x2f4f4f,
"dark_turquoise" => 0x00ced1,
"dark_violet" => 0x9400d3,
"deep_pink" => 0xff1493,
"deep_sky_blue" => 0x00bfff,
"dim_gray" => 0x696969,
"dodger_blue" => 0x1e90ff,
"firebrick" => 0xb22222,
"floral_white" => 0xfffaf0,
"forest_green" => 0x228b22,
"fuchsia" => 0xff00ff,
"gainsboro" => 0xdcdcdc,
"ghost_white" => 0xf8f8ff,
"gold" => 0xffd700,
"goldenrod" => 0xdaa520,
"gray" => 0xbebebe,
"green" => 0x008000,
"green_yellow" => 0xadff2f,
"honeydew" => 0xf0fff0,
"hot_pink" => 0xff69b4,
"indian_red" => 0xcd5c5c,
"indigo" => 0x4b0082,
"ivory" => 0xfffff0,
"khaki" => 0xf0e68c,
"lavender" => 0xe6e6fa,
"lavender_blush" => 0xfff0f5,
"lawn_green" => 0x7cfc00,
"lemon_chiffon" => 0xfffacd,
"light_blue" => 0xadd8e6,
"light_coral" => 0xf08080,
"light_cyan" => 0xe0ffff,
"light_goldenrod" => 0xfafad2,
"light_gray" => 0xd3d3d3,
"light_green" => 0x90ee90,
"light_pink" => 0xffb6c1,
"light_salmon" => 0xffa07a,
"light_sea_green" => 0x20b2aa,
"light_sky_blue" => 0x87cefa,
"light_slate_gray" => 0x778899,
"light_steel_blue" => 0xb0c4de,
"light_yellow" => 0xffffe0,
"lime" => 0x00ff00,
"lime_green" => 0x32cd32,
"linen" => 0xfaf0e6,
"magenta" => 0xff00ff,
"maroon" => 0xb03060,
"medium_aquamarine" => 0x66cdaa,
"medium_blue" => 0x0000cd,
"medium_orchid" => 0xba55d3,
"medium_purple" => 0x9370db,
"medium_sea_green" => 0x3cb371,
"medium_slate_blue" => 0x7b68ee,
"medium_spring_green" => 0x00fa9a,
"medium_turquoise" => 0x48d1cc,
"medium_violet_red" => 0xc71585,
"midnight_blue" => 0x191970,
"mint_cream" => 0xf5fffa,
"misty_rose" => 0xffe4e1,
"moccasin" => 0xffe4b5,
"navajo_white" => 0xffdead,
"navy" => 0x000080,
"old_lace" => 0xfdf5e6,
"olive" => 0x808000,
"olive_drab" => 0x6b8e23,
"orange" => 0xffa500,
"orange_red" => 0xff4500,
"orchid" => 0xda70d6,
"pale_goldenrod" => 0xeee8aa,
"pale_green" => 0x98fb98,
"pale_turquoise" => 0xafeeee,
"pale_violet_red" => 0xdb7093,
"papaya_whip" => 0xffefd5,
"peach_puff" => 0xffdab9,
"peru" => 0xcd853f,
"pink" => 0xffc0cb,
"plum" => 0xdda0dd,
"powder_blue" => 0xb0e0e6,
"purple" => 0xa020f0,
"red" => 0xff0000,
"rosy_brown" => 0xbc8f8f,
"royal_blue" => 0x4169e1,
"saddle_brown" => 0x8b4513,
"salmon" => 0xfa8072,
"sandy_brown" => 0xf4a460,
"sea_green" => 0x2e8b57,
"seashell" => 0xfff5ee,
"sienna" => 0xa0522d,
"sky_blue" => 0x87ceeb,
"slate_blue" => 0x6a5acd,
"slate_gray" => 0x708090,
"snow" => 0xfffafa,
"spring_green" => 0x00ff7f,
"steel_blue" => 0x4682b4,
"tan" => 0xd2b48c,
"teal" => 0x008080,
"thistle" => 0xd8bfd8,
"tomato" => 0xff6347,
"turquoise" => 0x40e0d0,
"violet" => 0xee82ee,
"wheat" => 0xf5deb3,
"white" => 0xffffff,
"white_smoke" => 0xf5f5f5,
"yellow" => 0xffff00 }

# Creates a new color with the hex color provided as a number (i.e. 0x112233)
def initialize(color=0x000000)
string = "%.6x" % color
Expand Down

0 comments on commit b5baa1e

Please sign in to comment.