timocratic-color 1.4.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,118 @@
1
+ #--
2
+ # Color
3
+ # Colour management with Ruby
4
+ # http://rubyforge.org/projects/color
5
+ # Version 1.4.0
6
+ #
7
+ # Licensed under a MIT-style licence. See Licence.txt in the main
8
+ # distribution for full licensing information.
9
+ #
10
+ # Copyright (c) 2005 - 2007 Austin Ziegler and Matt Lyon
11
+ #
12
+ # $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
13
+ #++
14
+
15
+ require 'color/palette'
16
+
17
+ # A class that can read a GIMP (GNU Image Manipulation Program) palette file
18
+ # and provide a Hash-like interface to the contents. GIMP colour palettes
19
+ # are RGB values only.
20
+ #
21
+ # Because two or more entries in a GIMP palette may have the same name, all
22
+ # named entries are returned as an array.
23
+ #
24
+ # pal = Color::Palette::Gimp.from_file(my_gimp_palette)
25
+ # pal[0] => Color::RGB<...>
26
+ # pal["white"] => [ Color::RGB<...> ]
27
+ # pal["unknown"] => [ Color::RGB<...>, Color::RGB<...>, ... ]
28
+ #
29
+ # GIMP Palettes are always indexable by insertion order (an integer key).
30
+ class Color::Palette::Gimp
31
+ include Enumerable
32
+
33
+ class << self
34
+ # Create a GIMP palette object from the named file.
35
+ def from_file(filename)
36
+ File.open(filename, "rb") { |io| Color::Palette::Gimp.from_io(io) }
37
+ end
38
+
39
+ # Create a GIMP palette object from the provided IO.
40
+ def from_io(io)
41
+ Color::Palette::Gimp.new(io.read)
42
+ end
43
+ end
44
+
45
+ # Create a new GIMP palette from the palette file as a string.
46
+ def initialize(palette)
47
+ @colors = []
48
+ @names = {}
49
+ @valid = false
50
+ @name = "(unnamed)"
51
+
52
+ palette.split($/).each do |line|
53
+ line.chomp!
54
+ line.gsub!(/\s*#.*\Z/, '')
55
+
56
+ next if line.empty?
57
+
58
+ if line =~ /\AGIMP Palette\Z/
59
+ @valid = true
60
+ next
61
+ end
62
+
63
+ info = /(\w+):\s(.*$)/.match(line)
64
+ if info
65
+ @name = info.captures[1] if info.captures[0] =~ /name/i
66
+ next
67
+ end
68
+
69
+ line.gsub!(/^\s+/, '')
70
+ data = line.split(/\s+/, 4)
71
+ name = data.pop.strip
72
+ data.map! { |el| el.to_i }
73
+
74
+ color = Color::RGB.new(*data)
75
+
76
+ @colors << color
77
+ @names[name] ||= []
78
+ @names[name] << color
79
+ end
80
+ end
81
+
82
+ # Provides the colour or colours at the provided selectors.
83
+ def values_at(*selectors)
84
+ @colors.values_at(*selectors)
85
+ end
86
+
87
+ # If a Numeric +key+ is provided, the single colour value at that position
88
+ # will be returned. If a String +key+ is provided, the colour set (an
89
+ # array) for that colour name will be returned.
90
+ def [](key)
91
+ if key.kind_of?(Numeric)
92
+ @colors[key]
93
+ else
94
+ @names[key]
95
+ end
96
+ end
97
+
98
+ # Loops through each colour.
99
+ def each
100
+ @colors.each { |el| yield el }
101
+ end
102
+
103
+ # Loops through each named colour set.
104
+ def each_name #:yields color_name, color_set:#
105
+ @names.each { |color_name, color_set| yield color_name, color_set }
106
+ end
107
+
108
+ # Returns true if this is believed to be a valid GIMP palette.
109
+ def valid?
110
+ @valid
111
+ end
112
+
113
+ def size
114
+ @colors.size
115
+ end
116
+
117
+ attr_reader :name
118
+ end
@@ -0,0 +1,182 @@
1
+ #--
2
+ # Color
3
+ # Colour management with Ruby
4
+ # http://rubyforge.org/projects/color
5
+ # Version 1.4.0
6
+ #
7
+ # Licensed under a MIT-style licence. See Licence.txt in the main
8
+ # distribution for full licensing information.
9
+ #
10
+ # Copyright (c) 2005 - 2007 Austin Ziegler and Matt Lyon
11
+ #
12
+ # $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
13
+ #++
14
+
15
+ require 'color/palette'
16
+
17
+ # Generates a monochromatic constrasting colour palette for background and
18
+ # foreground. What does this mean?
19
+ #
20
+ # Monochromatic: A single colour is used to generate the base palette, and
21
+ # this colour is lightened five times and darkened five times to provide
22
+ # eleven distinct colours.
23
+ #
24
+ # Contrasting: The foreground is also generated as a monochromatic colour
25
+ # palette; however, all generated colours are tested to see that they are
26
+ # appropriately contrasting to ensure maximum readability of the foreground
27
+ # against the background.
28
+ class Color::Palette::MonoContrast
29
+ # Hash of CSS background colour values.
30
+ #
31
+ # This is always 11 values:
32
+ #
33
+ # 0:: The starting colour.
34
+ # +1..+5:: Lighter colours.
35
+ # -1..-5:: Darker colours.
36
+ attr_reader :background
37
+ # Hash of CSS foreground colour values.
38
+ #
39
+ # This is always 11 values:
40
+ #
41
+ # 0:: The starting colour.
42
+ # +1..+5:: Lighter colours.
43
+ # -1..-5:: Darker colours.
44
+ attr_reader :foreground
45
+
46
+ DEFAULT_MINIMUM_BRIGHTNESS_DIFF = (125.0 / 255.0)
47
+
48
+ # The minimum brightness difference between the background and the
49
+ # foreground, and must be between 0..1. Setting this value will regenerate
50
+ # the palette based on the base colours. The default value for this is 125
51
+ # / 255.0. If this value is set to +nil+, it will be restored to the
52
+ # default.
53
+ attr_accessor :minimum_brightness_diff
54
+ remove_method :minimum_brightness_diff= ;
55
+ def minimum_brightness_diff=(bd) #:nodoc:
56
+ if bd.nil?
57
+ @minimum_brightness_diff = DEFAULT_MINIMUM_BRIGHTNESS_DIFF
58
+ elsif bd > 1.0
59
+ @minimum_brightness_diff = 1.0
60
+ elsif bd < 0.0
61
+ @minimum_brightness_diff = 0.0
62
+ else
63
+ @minimum_brightness_diff = bd
64
+ end
65
+
66
+ regenerate(@background[0], @foreground[0])
67
+ end
68
+
69
+ DEFAULT_MINIMUM_COLOR_DIFF = (500.0 / 255.0)
70
+
71
+ # The minimum colour difference between the background and the foreground,
72
+ # and must be between 0..3. Setting this value will regenerate the palette
73
+ # based on the base colours. The default value for this is 500 / 255.0.
74
+ attr_accessor :minimum_color_diff
75
+ remove_method :minimum_color_diff= ;
76
+ def minimum_color_diff=(cd) #:noco:
77
+ if cd.nil?
78
+ @minimum_color_diff = DEFAULT_MINIMUM_COLOR_DIFF
79
+ elsif cd > 3.0
80
+ @minimum_color_diff = 3.0
81
+ elsif cd < 0.0
82
+ @minimum_color_diff = 0.0
83
+ else
84
+ @minimum_color_diff = cd
85
+ end
86
+ regenerate(@background[0], @foreground[0])
87
+ end
88
+
89
+ # Generate the initial palette.
90
+ def initialize(background, foreground = nil)
91
+ @minimum_brightness_diff = DEFAULT_MINIMUM_BRIGHTNESS_DIFF
92
+ @minimum_color_diff = DEFAULT_MINIMUM_COLOR_DIFF
93
+
94
+ regenerate(background, foreground)
95
+ end
96
+
97
+ # Generate the colour palettes.
98
+ def regenerate(background, foreground = nil)
99
+ foreground ||= background
100
+ background = background.to_rgb
101
+ foreground = foreground.to_rgb
102
+
103
+ @background = {}
104
+ @foreground = {}
105
+
106
+ @background[-5] = background.darken_by(10)
107
+ @background[-4] = background.darken_by(25)
108
+ @background[-3] = background.darken_by(50)
109
+ @background[-2] = background.darken_by(75)
110
+ @background[-1] = background.darken_by(85)
111
+ @background[ 0] = background
112
+ @background[+1] = background.lighten_by(85)
113
+ @background[+2] = background.lighten_by(75)
114
+ @background[+3] = background.lighten_by(50)
115
+ @background[+4] = background.lighten_by(25)
116
+ @background[+5] = background.lighten_by(10)
117
+
118
+ @foreground[-5] = calculate_foreground(@background[-5], foreground)
119
+ @foreground[-4] = calculate_foreground(@background[-4], foreground)
120
+ @foreground[-3] = calculate_foreground(@background[-3], foreground)
121
+ @foreground[-2] = calculate_foreground(@background[-2], foreground)
122
+ @foreground[-1] = calculate_foreground(@background[-1], foreground)
123
+ @foreground[ 0] = calculate_foreground(@background[ 0], foreground)
124
+ @foreground[+1] = calculate_foreground(@background[+1], foreground)
125
+ @foreground[+2] = calculate_foreground(@background[+2], foreground)
126
+ @foreground[+3] = calculate_foreground(@background[+3], foreground)
127
+ @foreground[+4] = calculate_foreground(@background[+4], foreground)
128
+ @foreground[+5] = calculate_foreground(@background[+5], foreground)
129
+ end
130
+
131
+ # Given a background colour and a foreground colour, modifies the
132
+ # foreground colour so that it will have enough contrast to be seen
133
+ # against the background colour.
134
+ #
135
+ # Uses #mininum_brightness_diff and #minimum_color_diff.
136
+ def calculate_foreground(background, foreground)
137
+ nfg = nil
138
+ # Loop through brighter and darker versions of the foreground color. The
139
+ # numbers here represent the amount of foreground color to mix with
140
+ # black and white.
141
+ [100, 75, 50, 25, 0].each do |percent|
142
+ dfg = foreground.darken_by(percent)
143
+ lfg = foreground.lighten_by(percent)
144
+
145
+ dbd = brightness_diff(background, dfg)
146
+ lbd = brightness_diff(background, lfg)
147
+
148
+ if lbd > dbd
149
+ nfg = lfg
150
+ nbd = lbd
151
+ else
152
+ nfg = dfg
153
+ nbd = dbd
154
+ end
155
+
156
+ ncd = color_diff(background, nfg)
157
+
158
+ break if nbd >= @minimum_brightness_diff and ncd >= @minimum_color_diff
159
+ end
160
+ nfg
161
+ end
162
+
163
+ # Returns the absolute difference between the brightness levels of two
164
+ # colours. This will be a decimal value between 0 and 1. W3C accessibility
165
+ # guidelines for colour contrast[http://www.w3.org/TR/AERT#color-contrast]
166
+ # suggest that this value be at least approximately 0.49 (125 / 255.0) for
167
+ # proper contrast.
168
+ def brightness_diff(c1, c2)
169
+ (c1.brightness - c2.brightness).abs
170
+ end
171
+
172
+ # Returns the contrast between to colours, a decimal value between 0 and
173
+ # 3. W3C accessibility guidelines for colour
174
+ # contrast[http://www.w3.org/TR/AERT#color-contrast] suggest that this
175
+ # value be at least approximately 1.96 (500 / 255.0) for proper contrast.
176
+ def color_diff(c1, c2)
177
+ r = (c1.r - c2.r).abs
178
+ g = (c1.g - c2.g).abs
179
+ b = (c1.b - c2.b).abs
180
+ r + g + b
181
+ end
182
+ end
@@ -0,0 +1,357 @@
1
+ #--
2
+ # Color
3
+ # Colour management with Ruby
4
+ # http://rubyforge.org/projects/color
5
+ # Version 1.4.0
6
+ #
7
+ # Licensed under a MIT-style licence. See Licence.txt in the main
8
+ # distribution for full licensing information.
9
+ #
10
+ # Copyright (c) 2005 - 2007 Austin Ziegler and Matt Lyon
11
+ #
12
+ # $Id: test_all.rb 55 2007-02-03 23:29:34Z austin $
13
+ #++
14
+
15
+ class Color::RGB
16
+ AliceBlue = Color::RGB.new(0xf0, 0xf8, 0xff)
17
+ AntiqueWhite = Color::RGB.new(0xfa, 0xeb, 0xd7)
18
+ Aqua = Color::RGB.new(0x00, 0xff, 0xff)
19
+ Aquamarine = Color::RGB.new(0x7f, 0xff, 0xd4)
20
+ Azure = Color::RGB.new(0xf0, 0xff, 0xff)
21
+ Beige = Color::RGB.new(0xf5, 0xf5, 0xdc)
22
+ Bisque = Color::RGB.new(0xff, 0xe4, 0xc4)
23
+ Black = Color::RGB.new(0, 0, 0)
24
+ BlanchedAlmond = Color::RGB.new(0xff, 0xeb, 0xcd)
25
+ Blue = Color::RGB.new(0x00, 0x00, 0xff)
26
+ BlueViolet = Color::RGB.new(0x8a, 0x2b, 0xe2)
27
+ Brown = Color::RGB.new(0xa5, 0x2a, 0x2a)
28
+ BurlyWood = Color::RGB.new(0xde, 0xb8, 0x87)
29
+ Burlywood = BurlyWood
30
+ CadetBlue = Color::RGB.new(0x5f, 0x9e, 0xa0)
31
+ Carnation = Color::RGB.new(0xff, 0x5e, 0xd0)
32
+ Cayenne = Color::RGB.new(0x8d, 0x00, 0x00)
33
+ Chartreuse = Color::RGB.new(0x7f, 0xff, 0x00)
34
+ Chocolate = Color::RGB.new(0xd2, 0x69, 0x1e)
35
+ Coral = Color::RGB.new(0xff, 0x7f, 0x50)
36
+ CornflowerBlue = Color::RGB.new(0x64, 0x95, 0xed)
37
+ Cornsilk = Color::RGB.new(0xff, 0xf8, 0xdc)
38
+ Crimson = Color::RGB.new(0xdc, 0x14, 0x3c)
39
+ Cyan = Color::RGB.new(0x00, 0xff, 0xff)
40
+ DarkBlue = Color::RGB.new(0x00, 0x00, 0x8b)
41
+ DarkCyan = Color::RGB.new(0x00, 0x8b, 0x8b)
42
+ DarkGoldenRod = Color::RGB.new(0xb8, 0x86, 0x0b)
43
+ DarkGoldenrod = DarkGoldenRod
44
+ DarkGray = Color::RGB.new(0xa9, 0xa9, 0xa9)
45
+ DarkGreen = Color::RGB.new(0x00, 0x64, 0x00)
46
+ DarkGrey = DarkGray
47
+ DarkKhaki = Color::RGB.new(0xbd, 0xb7, 0x6b)
48
+ DarkMagenta = Color::RGB.new(0x8b, 0x00, 0x8b)
49
+ DarkOliveGreen = Color::RGB.new(0x55, 0x6b, 0x2f)
50
+ DarkOrange = Color::RGB.new(0xff, 0x8c, 0x00)
51
+ DarkOrchid = Color::RGB.new(0x99, 0x32, 0xcc)
52
+ DarkRed = Color::RGB.new(0x8b, 0x00, 0x00)
53
+ DarkSalmon = Color::RGB.new(0xe9, 0x96, 0x7a)
54
+ DarkSeaGreen = Color::RGB.new(0x8f, 0xbc, 0x8f)
55
+ DarkSlateBlue = Color::RGB.new(0x48, 0x3d, 0x8b)
56
+ DarkSlateGray = Color::RGB.new(0x2f, 0x4f, 0x4f)
57
+ DarkSlateGrey = DarkSlateGray
58
+ DarkTurquoise = Color::RGB.new(0x00, 0xce, 0xd1)
59
+ DarkViolet = Color::RGB.new(0x94, 0x00, 0xd3)
60
+ DarkoliveGreen = DarkOliveGreen
61
+ Darkorange = Color::RGB.new(0xff, 0x8c, 0x00)
62
+ Darksalmon = DarkSalmon
63
+ DeepPink = Color::RGB.new(0xff, 0x14, 0x93)
64
+ DeepSkyBlue = Color::RGB.new(0x00, 0xbf, 0xbf)
65
+ DimGray = Color::RGB.new(0x69, 0x69, 0x69)
66
+ DimGrey = DimGray
67
+ DodgerBlue = Color::RGB.new(0x1e, 0x90, 0xff)
68
+ Feldspar = Color::RGB.new(0xd1, 0x92, 0x75)
69
+ FireBrick = Color::RGB.new(0xb2, 0x22, 0x22)
70
+ Firebrick = FireBrick
71
+ FloralWhite = Color::RGB.new(0xff, 0xfa, 0xf0)
72
+ ForestGreen = Color::RGB.new(0x22, 0x8b, 0x22)
73
+ Fuchsia = Color::RGB.new(0xff, 0x00, 0xff)
74
+ Gainsboro = Color::RGB.new(0xdc, 0xdc, 0xdc)
75
+ GhostWhite = Color::RGB.new(0xf8, 0xf8, 0xff)
76
+ Gold = Color::RGB.new(0xff, 0xd7, 0x00)
77
+ GoldenRod = Color::RGB.new(0xda, 0xa5, 0x20)
78
+ Goldenrod = GoldenRod
79
+ Gray = Color::RGB.new(0x80, 0x80, 0x80)
80
+ Gray10 = Color::RGB.from_percentage(10, 10, 10)
81
+ Gray20 = Color::RGB.from_percentage(20, 20, 20)
82
+ Gray30 = Color::RGB.from_percentage(30, 30, 30)
83
+ Gray40 = Color::RGB.from_percentage(40, 40, 40)
84
+ Gray50 = Color::RGB.from_percentage(50, 50, 50)
85
+ Gray60 = Color::RGB.from_percentage(60, 60, 60)
86
+ Gray70 = Color::RGB.from_percentage(70, 70, 70)
87
+ Gray80 = Color::RGB.from_percentage(80, 80, 80)
88
+ Gray90 = Color::RGB.from_percentage(90, 90, 90)
89
+ Green = Color::RGB.new(0x00, 0x80, 0x00)
90
+ GreenYellow = Color::RGB.new(0xad, 0xff, 0x2f)
91
+ Grey = Gray
92
+ Grey10 = Gray10
93
+ Grey20 = Gray20
94
+ Grey30 = Gray30
95
+ Grey40 = Gray40
96
+ Grey50 = Gray50
97
+ Grey60 = Gray60
98
+ Grey70 = Gray70
99
+ Grey80 = Gray80
100
+ Grey90 = Gray90
101
+ HoneyDew = Color::RGB.new(0xf0, 0xff, 0xf0)
102
+ Honeydew = HoneyDew
103
+ HotPink = Color::RGB.new(0xff, 0x69, 0xb4)
104
+ IndianRed = Color::RGB.new(0xcd, 0x5c, 0x5c)
105
+ Indigo = Color::RGB.new(0x4b, 0x00, 0x82)
106
+ Ivory = Color::RGB.new(0xff, 0xff, 0xf0)
107
+ Khaki = Color::RGB.new(0xf0, 0xe6, 0x8c)
108
+ Lavender = Color::RGB.new(0xe6, 0xe6, 0xfa)
109
+ LavenderBlush = Color::RGB.new(0xff, 0xf0, 0xf5)
110
+ LawnGreen = Color::RGB.new(0x7c, 0xfc, 0x00)
111
+ LemonChiffon = Color::RGB.new(0xff, 0xfa, 0xcd)
112
+ LightBlue = Color::RGB.new(0xad, 0xd8, 0xe6)
113
+ LightCoral = Color::RGB.new(0xf0, 0x80, 0x80)
114
+ LightCyan = Color::RGB.new(0xe0, 0xff, 0xff)
115
+ LightGoldenRodYellow = Color::RGB.new(0xfa, 0xfa, 0xd2)
116
+ LightGoldenrodYellow = LightGoldenRodYellow
117
+ LightGray = Color::RGB.new(0xd3, 0xd3, 0xd3)
118
+ LightGreen = Color::RGB.new(0x90, 0xee, 0x90)
119
+ LightGrey = LightGray
120
+ LightPink = Color::RGB.new(0xff, 0xb6, 0xc1)
121
+ LightSalmon = Color::RGB.new(0xff, 0xa0, 0x7a)
122
+ LightSeaGreen = Color::RGB.new(0x20, 0xb2, 0xaa)
123
+ LightSkyBlue = Color::RGB.new(0x87, 0xce, 0xfa)
124
+ LightSlateBlue = Color::RGB.new(0x84, 0x70, 0xff)
125
+ LightSlateGray = Color::RGB.new(0x77, 0x88, 0x99)
126
+ LightSlateGrey = LightSlateGray
127
+ LightSteelBlue = Color::RGB.new(0xb0, 0xc4, 0xde)
128
+ LightYellow = Color::RGB.new(0xff, 0xff, 0xe0)
129
+ Lightsalmon = LightSalmon
130
+ LightsteelBlue = LightSteelBlue
131
+ Lime = Color::RGB.new(0x00, 0xff, 0x00)
132
+ LimeGreen = Color::RGB.new(0x32, 0xcd, 0x32)
133
+ Linen = Color::RGB.new(0xfa, 0xf0, 0xe6)
134
+ Magenta = Color::RGB.new(0xff, 0x00, 0xff)
135
+ Maroon = Color::RGB.new(0x80, 0x00, 0x00)
136
+ MediumAquaMarine = Color::RGB.new(0x66, 0xcd, 0xaa)
137
+ MediumAquamarine = MediumAquaMarine
138
+ MediumBlue = Color::RGB.new(0x00, 0x00, 0xcd)
139
+ MediumOrchid = Color::RGB.new(0xba, 0x55, 0xd3)
140
+ MediumPurple = Color::RGB.new(0x93, 0x70, 0xdb)
141
+ MediumSeaGreen = Color::RGB.new(0x3c, 0xb3, 0x71)
142
+ MediumSlateBlue = Color::RGB.new(0x7b, 0x68, 0xee)
143
+ MediumSpringGreen = Color::RGB.new(0x00, 0xfa, 0x9a)
144
+ MediumTurquoise = Color::RGB.new(0x48, 0xd1, 0xcc)
145
+ MediumVioletRed = Color::RGB.new(0xc7, 0x15, 0x85)
146
+ MidnightBlue = Color::RGB.new(0x19, 0x19, 0x70)
147
+ MintCream = Color::RGB.new(0xf5, 0xff, 0xfa)
148
+ MistyRose = Color::RGB.new(0xff, 0xe4, 0xe1)
149
+ Moccasin = Color::RGB.new(0xff, 0xe4, 0xb5)
150
+ NavajoWhite = Color::RGB.new(0xff, 0xde, 0xad)
151
+ Navy = Color::RGB.new(0x00, 0x00, 0x80)
152
+ OldLace = Color::RGB.new(0xfd, 0xf5, 0xe6)
153
+ Olive = Color::RGB.new(0x80, 0x80, 0x00)
154
+ OliveDrab = Color::RGB.new(0x6b, 0x8e, 0x23)
155
+ Olivedrab = OliveDrab
156
+ Orange = Color::RGB.new(0xff, 0xa5, 0x00)
157
+ OrangeRed = Color::RGB.new(0xff, 0x45, 0x00)
158
+ Orchid = Color::RGB.new(0xda, 0x70, 0xd6)
159
+ PaleGoldenRod = Color::RGB.new(0xee, 0xe8, 0xaa)
160
+ PaleGoldenrod = PaleGoldenRod
161
+ PaleGreen = Color::RGB.new(0x98, 0xfb, 0x98)
162
+ PaleTurquoise = Color::RGB.new(0xaf, 0xee, 0xee)
163
+ PaleVioletRed = Color::RGB.new(0xdb, 0x70, 0x93)
164
+ PapayaWhip = Color::RGB.new(0xff, 0xef, 0xd5)
165
+ PeachPuff = Color::RGB.new(0xff, 0xda, 0xb9)
166
+ Peachpuff = PeachPuff
167
+ Peru = Color::RGB.new(0xcd, 0x85, 0x3f)
168
+ Pink = Color::RGB.new(0xff, 0xc0, 0xcb)
169
+ Plum = Color::RGB.new(0xdd, 0xa0, 0xdd)
170
+ PowderBlue = Color::RGB.new(0xb0, 0xe0, 0xe6)
171
+ Purple = Color::RGB.new(0x80, 0x00, 0x80)
172
+ Red = Color::RGB.new(0xff, 0x00, 0x00)
173
+ RosyBrown = Color::RGB.new(0xbc, 0x8f, 0x8f)
174
+ RoyalBlue = Color::RGB.new(0x41, 0x69, 0xe1)
175
+ SaddleBrown = Color::RGB.new(0x8b, 0x45, 0x13)
176
+ Salmon = Color::RGB.new(0xfa, 0x80, 0x72)
177
+ SandyBrown = Color::RGB.new(0xf4, 0xa4, 0x60)
178
+ SeaGreen = Color::RGB.new(0x2e, 0x8b, 0x57)
179
+ SeaShell = Color::RGB.new(0xff, 0xf5, 0xee)
180
+ Seashell = SeaShell
181
+ Sienna = Color::RGB.new(0xa0, 0x52, 0x2d)
182
+ Silver = Color::RGB.new(0xc0, 0xc0, 0xc0)
183
+ SkyBlue = Color::RGB.new(0x87, 0xce, 0xeb)
184
+ SlateBlue = Color::RGB.new(0x6a, 0x5a, 0xcd)
185
+ SlateGray = Color::RGB.new(0x70, 0x80, 0x90)
186
+ SlateGrey = SlateGray
187
+ Snow = Color::RGB.new(0xff, 0xfa, 0xfa)
188
+ SpringGreen = Color::RGB.new(0x00, 0xff, 0x7f)
189
+ SteelBlue = Color::RGB.new(0x46, 0x82, 0xb4)
190
+ Tan = Color::RGB.new(0xd2, 0xb4, 0x8c)
191
+ Teal = Color::RGB.new(0x00, 0x80, 0x80)
192
+ Thistle = Color::RGB.new(0xd8, 0xbf, 0xd8)
193
+ Tomato = Color::RGB.new(0xff, 0x63, 0x47)
194
+ Turquoise = Color::RGB.new(0x40, 0xe0, 0xd0)
195
+ Violet = Color::RGB.new(0xee, 0x82, 0xee)
196
+ VioletRed = Color::RGB.new(0xd0, 0x20, 0x90)
197
+ Wheat = Color::RGB.new(0xf5, 0xde, 0xb3)
198
+ White = Color::RGB.new(0xff, 0xff, 0xff)
199
+ WhiteSmoke = Color::RGB.new(0xf5, 0xf5, 0xf5)
200
+ Yellow = Color::RGB.new(0xff, 0xff, 0x00)
201
+ YellowGreen = Color::RGB.new(0x9a, 0xcd, 0x32)
202
+
203
+ AliceBlue.freeze
204
+ AntiqueWhite.freeze
205
+ Aqua.freeze
206
+ Aquamarine.freeze
207
+ Azure.freeze
208
+ Beige.freeze
209
+ Bisque.freeze
210
+ Black.freeze
211
+ BlanchedAlmond.freeze
212
+ Blue.freeze
213
+ BlueViolet.freeze
214
+ Brown.freeze
215
+ Burlywood.freeze
216
+ CadetBlue.freeze
217
+ Cayenne.freeze
218
+ Carnation.freeze
219
+ Chartreuse.freeze
220
+ Chocolate.freeze
221
+ Coral.freeze
222
+ CornflowerBlue.freeze
223
+ Cornsilk.freeze
224
+ Crimson.freeze
225
+ Cyan.freeze
226
+ DarkBlue.freeze
227
+ DarkCyan.freeze
228
+ DarkGoldenrod.freeze
229
+ DarkGray.freeze
230
+ DarkGreen.freeze
231
+ DarkKhaki.freeze
232
+ DarkMagenta.freeze
233
+ DarkoliveGreen.freeze
234
+ Darkorange.freeze
235
+ DarkOrchid.freeze
236
+ DarkRed.freeze
237
+ Darksalmon.freeze
238
+ DarkSeaGreen.freeze
239
+ DarkSlateBlue.freeze
240
+ DarkSlateGray.freeze
241
+ DarkTurquoise.freeze
242
+ DarkViolet.freeze
243
+ DeepPink.freeze
244
+ DeepSkyBlue.freeze
245
+ DimGray.freeze
246
+ DodgerBlue.freeze
247
+ Feldspar.freeze
248
+ Firebrick.freeze
249
+ FloralWhite.freeze
250
+ ForestGreen.freeze
251
+ Fuchsia.freeze
252
+ Gainsboro.freeze
253
+ GhostWhite.freeze
254
+ Gold.freeze
255
+ Goldenrod.freeze
256
+ Gray.freeze
257
+ Green.freeze
258
+ GreenYellow.freeze
259
+ Honeydew.freeze
260
+ HotPink.freeze
261
+ IndianRed.freeze
262
+ Indigo.freeze
263
+ Ivory.freeze
264
+ Khaki.freeze
265
+ Lavender.freeze
266
+ LavenderBlush.freeze
267
+ LawnGreen.freeze
268
+ LemonChiffon.freeze
269
+ LightBlue.freeze
270
+ LightCoral.freeze
271
+ LightCyan.freeze
272
+ LightGoldenrodYellow.freeze
273
+ LightGray.freeze
274
+ LightGreen.freeze
275
+ LightPink.freeze
276
+ Lightsalmon.freeze
277
+ LightSeaGreen.freeze
278
+ LightSkyBlue.freeze
279
+ LightSlateBlue.freeze
280
+ LightSlateGray.freeze
281
+ LightsteelBlue.freeze
282
+ LightYellow.freeze
283
+ Lime.freeze
284
+ LimeGreen.freeze
285
+ Linen.freeze
286
+ Magenta.freeze
287
+ Maroon.freeze
288
+ MediumAquamarine.freeze
289
+ MediumBlue.freeze
290
+ MediumOrchid.freeze
291
+ MediumPurple.freeze
292
+ MediumSeaGreen.freeze
293
+ MediumSlateBlue.freeze
294
+ MediumSpringGreen.freeze
295
+ MediumTurquoise.freeze
296
+ MediumVioletRed.freeze
297
+ MidnightBlue.freeze
298
+ MintCream.freeze
299
+ MistyRose.freeze
300
+ Moccasin.freeze
301
+ NavajoWhite.freeze
302
+ Navy.freeze
303
+ OldLace.freeze
304
+ Olive.freeze
305
+ Olivedrab.freeze
306
+ Orange.freeze
307
+ OrangeRed.freeze
308
+ Orchid.freeze
309
+ PaleGoldenrod.freeze
310
+ PaleGreen.freeze
311
+ PaleTurquoise.freeze
312
+ PaleVioletRed.freeze
313
+ PapayaWhip.freeze
314
+ Peachpuff.freeze
315
+ Peru.freeze
316
+ Pink.freeze
317
+ Plum.freeze
318
+ PowderBlue.freeze
319
+ Purple.freeze
320
+ Red.freeze
321
+ RosyBrown.freeze
322
+ RoyalBlue.freeze
323
+ SaddleBrown.freeze
324
+ Salmon.freeze
325
+ SandyBrown.freeze
326
+ SeaGreen.freeze
327
+ Seashell.freeze
328
+ Sienna.freeze
329
+ Silver.freeze
330
+ SkyBlue.freeze
331
+ SlateBlue.freeze
332
+ SlateGray.freeze
333
+ Snow.freeze
334
+ SpringGreen.freeze
335
+ SteelBlue.freeze
336
+ Tan.freeze
337
+ Teal.freeze
338
+ Thistle.freeze
339
+ Tomato.freeze
340
+ Turquoise.freeze
341
+ Violet.freeze
342
+ VioletRed.freeze
343
+ Wheat.freeze
344
+ White.freeze
345
+ WhiteSmoke.freeze
346
+ Yellow.freeze
347
+ YellowGreen.freeze
348
+ Gray10.freeze
349
+ Gray20.freeze
350
+ Gray30.freeze
351
+ Gray40.freeze
352
+ Gray50.freeze
353
+ Gray60.freeze
354
+ Gray70.freeze
355
+ Gray80.freeze
356
+ Gray90.freeze
357
+ end