cairo 1.4.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of cairo might be problematic. Click here for more details.

@@ -35,7 +35,7 @@ def parse(args=ARGV)
35
35
  end
36
36
 
37
37
  def render_background(cr)
38
- cr.set_source_rgba(1.0, 1.0, 1.0)
38
+ cr.set_source_color(:white)
39
39
  cr.paint
40
40
  end
41
41
 
@@ -50,9 +50,9 @@ end
50
50
 
51
51
  def setup_fade_out(cr, width)
52
52
  fade_out = Cairo::LinearPattern.new(0, 0, width, 0)
53
- fade_out.add_color_stop_rgba(0, 0, 0, 0, 1)
54
- fade_out.add_color_stop_rgba(0.66, 0, 0, 0, 1)
55
- fade_out.add_color_stop_rgba(1, 0, 0, 0, 0)
53
+ fade_out.add_color_stop(0, "#000f")
54
+ fade_out.add_color_stop(0.66, "#000f")
55
+ fade_out.add_color_stop(1, "#0000")
56
56
 
57
57
  cr.set_source(fade_out)
58
58
  end
@@ -93,22 +93,20 @@ def render(options, output, surface_class)
93
93
  body_width = width - margin_left - margin_right
94
94
  body_height = height - margin_top - margin_bottom
95
95
 
96
- surface = surface_class.new(output, width, height)
97
- cr = Cairo::Context.new(surface)
96
+ surface_class.new(output, width, height) do |surface|
97
+ cr = Cairo::Context.new(surface)
98
98
 
99
- render_background(cr)
100
- layout = make_layout(cr, text, body_width, font_description)
101
- if fade_out
102
- setup_fade_out(cr, body_width)
103
- else
104
- cr.set_source_rgba(0, 0, 0, 1)
105
- end
106
- render_layout(cr, layout, margin_left, margin_top, body_height)
107
-
108
- cr.show_page
99
+ render_background(cr)
100
+ layout = make_layout(cr, text, body_width, font_description)
101
+ if fade_out
102
+ setup_fade_out(cr, body_width)
103
+ else
104
+ cr.set_source_color(:black)
105
+ end
106
+ render_layout(cr, layout, margin_left, margin_top, body_height)
109
107
 
110
- cr.target.finish
111
- cr
108
+ cr.show_page
109
+ end
112
110
  end
113
111
 
114
112
  def output(options, surface_class_name, suffix)
@@ -3,6 +3,11 @@ EXPORTS
3
3
  rb_mCairo DATA
4
4
  rb_cCairo_Context DATA
5
5
  rb_cCairo_Path DATA
6
+ rb_cCairo_PathData DATA
7
+ rb_cCairo_PathMoveTo DATA
8
+ rb_cCairo_PathLineTo DATA
9
+ rb_cCairo_PathCurveTo DATA
10
+ rb_cCairo_PathClosePath DATA
6
11
  rb_cCairo_Matrix DATA
7
12
  rb_cCairo_Pattern DATA
8
13
  rb_cCairo_SolidPattern DATA
@@ -17,6 +22,32 @@ EXPORTS
17
22
  rb_cCairo_TextExtents DATA
18
23
  rb_cCairo_Glyph DATA
19
24
  rb_cCairo_Surface DATA
25
+ rb_cCairo_ImageSurface DATA
26
+ rb_cCairo_PDFSurface DATA
27
+ rb_cCairo_PSSurface DATA
28
+ rb_cCairo_SVGSurface DATA
29
+ rb_cCairo_WIN32Surface DATA
30
+
31
+ rb_mCairo_Operator DATA
32
+ rb_mCairo_Antialias DATA
33
+ rb_mCairo_FillRule DATA
34
+ rb_mCairo_LineCap DATA
35
+ rb_mCairo_LineJoin DATA
36
+ rb_mCairo_FontSlant DATA
37
+ rb_mCairo_FontWeight DATA
38
+ rb_mCairo_SubpixelOrder DATA
39
+ rb_mCairo_HintStyle DATA
40
+ rb_mCairo_HintMetrics DATA
41
+ rb_mCairo_PathDataType DATA
42
+ rb_mCairo_Content DATA
43
+ rb_mCairo_Format DATA
44
+ rb_mCairo_Extend DATA
45
+ rb_mCairo_Filter DATA
46
+ rb_mCairo_SVGVersion DATA
47
+
48
+ rb_mCairo_Color DATA
49
+ rb_cCairo_Color_Base DATA
50
+
20
51
  rb_cairo_context_from_ruby_object
21
52
  rb_cairo_context_to_ruby_object
22
53
  rb_cairo_path_from_ruby_object
@@ -8,19 +8,28 @@ if /mingw|mswin|mswin32/ =~ RUBY_PLATFORM
8
8
  end
9
9
 
10
10
  module Cairo
11
- def self.__add_one_arg_setter(klass)
12
- names = klass.instance_methods(false)
13
- names.each do |name|
14
- if /^set_(.*)/ =~ name and
15
- not names.include? "#{$1}=" and
16
- klass.instance_method(name).arity == 1
17
- klass.module_eval("def #{$1}=(val); set_#{$1}(val); val; end")
11
+ class << self
12
+ def __add_one_arg_setter(klass)
13
+ names = klass.instance_methods(false)
14
+ names.each do |name|
15
+ if /^set_(.*)/ =~ name and
16
+ not names.include? "#{$1}=" and
17
+ klass.instance_method(name).arity == 1
18
+ klass.module_eval("def #{$1}=(val); set_#{$1}(val); val; end")
19
+ end
18
20
  end
19
21
  end
22
+
23
+ def normalize_const_name(name)
24
+ name.to_s.upcase.gsub(/[\s\-_.]+/, "_")
25
+ end
20
26
  end
21
27
  end
22
28
 
29
+ require 'cairo/color'
30
+
23
31
  require 'cairo.so'
32
+ require 'cairo/constants'
24
33
 
25
34
  module Cairo
26
35
  class << self
@@ -72,6 +81,15 @@ module Cairo
72
81
  def multiply(other); dup.multiply!(other); end
73
82
  alias * multiply
74
83
  end
84
+
85
+ class FontOptions
86
+ def merge(other)
87
+ dup.merge!(other)
88
+ end
89
+ end
75
90
  end
76
91
 
92
+ require 'cairo/point'
93
+ require 'cairo/colors'
77
94
  require 'cairo/context'
95
+ require 'cairo/path'
@@ -0,0 +1,255 @@
1
+ module Cairo
2
+ module Color
3
+ module_function
4
+ def parse(value, robust=false)
5
+ return value.dup if value.is_a?(Base)
6
+ case value
7
+ when Array
8
+ case value.first
9
+ when :cmyk, :cmyka
10
+ CMYK.new(*value[1..-1])
11
+ when :hsv, :hsva
12
+ HSV.new(*value[1..-1])
13
+ else
14
+ type, *value = value if [:rgb, :rgba].include?(value.first)
15
+ RGB.new(*value)
16
+ end
17
+ when /\A#/ #
18
+ parse_hex_color(value)
19
+ when String, Symbol
20
+ name = Cairo.normalize_const_name(value)
21
+ begin
22
+ const_get(name).dup
23
+ rescue NameError
24
+ raise ArgumentError, "unknown color name: #{value}"
25
+ end
26
+ else
27
+ if robust
28
+ raise ArgumentError, "can't parse as color name: #{value.inspect}"
29
+ end
30
+ value
31
+ end
32
+ end
33
+
34
+ HEX_RE = "(?i:[a-f\\d])"
35
+ def parse_hex_color(value)
36
+ case value
37
+ when /\A#((?:#{HEX_RE}){3,4})\z/ #
38
+ RGB.new(*$1.scan(/./).collect {|value| value.hex / 15.0})
39
+ when /\A#((?:#{HEX_RE}{2,2}){3,4})\z/ #
40
+ RGB.new(*$1.scan(/.{2,2}/).collect {|value| value.hex / 255.0})
41
+ when /\A#((?:#{HEX_RE}{4,4}){3,4})\z/ #
42
+ RGB.new(*$1.scan(/.{4,4}/).collect {|value| value.hex / 65535.0})
43
+ else
44
+ message = "invalid hex color format: #{value} should be "
45
+ message << "#RGB, #RGBA, #RRGGBB, #RRGGBBAA, #RRRRGGGGBBBB "
46
+ message << "or #RRRRGGGGBBBBAAAA"
47
+ raise ArgumentError, message
48
+ end
49
+ end
50
+
51
+ class Base
52
+ attr_accessor :alpha
53
+
54
+ alias_method :a, :alpha
55
+ alias_method :a=, :alpha=
56
+
57
+ def initialize(a)
58
+ assert_in_range(a, "alpha channel")
59
+ @alpha = a
60
+ end
61
+
62
+ private
63
+ def assert_in_range(value, description)
64
+ unless (0.0..1.0).include?(value)
65
+ raise ArgumentError,
66
+ "#{description} value should be in [0.0, 1.0]: #{value.inspect}"
67
+ end
68
+ end
69
+ end
70
+
71
+ class RGB < Base
72
+ attr_accessor :red, :green, :blue
73
+
74
+ alias_method :r, :red
75
+ alias_method :r=, :red=
76
+ alias_method :g, :green
77
+ alias_method :g=, :green=
78
+ alias_method :b, :blue
79
+ alias_method :b=, :blue=
80
+
81
+ def initialize(r, g, b, a=1.0)
82
+ super(a)
83
+ assert_in_range(r, "red")
84
+ assert_in_range(g, "green")
85
+ assert_in_range(b, "blue")
86
+ @red = r
87
+ @green = g
88
+ @blue = b
89
+ end
90
+
91
+ def to_a
92
+ [@red, @green, @blue, @alpha]
93
+ end
94
+ alias_method :to_ary, :to_a
95
+
96
+ def to_s
97
+ "#%02X%02X%02X%02X" % to_a.collect {|v| (v * 255).ceil}
98
+ end
99
+
100
+ def to_rgb
101
+ clone
102
+ end
103
+
104
+ def to_cmyk
105
+ cmy = [1.0 - @red, 1.0 - @green, 1.0 - @blue]
106
+ key_plate = cmy.min
107
+ if key_plate < 1.0
108
+ one_k = 1.0 - key_plate
109
+ cmyk = cmy.collect {|value| (value - key_plate) / one_k} + [key_plate]
110
+ else
111
+ cmyk = [0, 0, 0, key_plate]
112
+ end
113
+ cmyka = cmyk + [@alpha]
114
+ CMYK.new(*cmyka)
115
+ end
116
+
117
+ def to_hsv
118
+ max = [@red, @blue, @green].max
119
+ if max > 0
120
+ min = [@red, @blue, @green].min
121
+ max_min = max - min
122
+ case max
123
+ when @red
124
+ numerator = @green - @blue
125
+ angle = 0
126
+ when @blue
127
+ numerator = @blue - @red
128
+ angle = 120
129
+ when @green
130
+ numerator = @red - @green
131
+ angle = 240
132
+ end
133
+ h = max_min > 0 ? 60 * numerator / max_min + angle : 0.0
134
+ s = max_min / max
135
+ else
136
+ h = 0.0
137
+ s = 0.0
138
+ end
139
+ v = max
140
+ HSV.new(h, s, v, @alpha)
141
+ end
142
+ end
143
+
144
+ class CMYK < Base
145
+ attr_accessor :cyan, :magenta, :yellow, :key_plate
146
+
147
+ alias_method :c, :cyan
148
+ alias_method :c=, :cyan=
149
+ alias_method :m, :magenta
150
+ alias_method :m=, :magenta=
151
+ alias_method :y, :yellow
152
+ alias_method :y=, :yellow=
153
+ alias_method :k, :key_plate
154
+ alias_method :k=, :key_plate=
155
+
156
+ def initialize(c, m, y, k, a=1.0)
157
+ super(a)
158
+ assert_in_range(c, "cyan")
159
+ assert_in_range(m, "magenta")
160
+ assert_in_range(y, "yellow")
161
+ assert_in_range(k, "key plate")
162
+ @cyan = c
163
+ @magenta = m
164
+ @yellow = y
165
+ @key_plate = k
166
+ end
167
+
168
+ def to_a
169
+ [@cyan, @magenta, @yellow, @key_plate, @alpha]
170
+ end
171
+ alias_method :to_ary, :to_a
172
+
173
+ def to_rgb
174
+ one_k = 1.0 - @key_plate
175
+ rgba = [
176
+ (1.0 - @cyan) * one_k,
177
+ (1.0 - @magenta) * one_k,
178
+ (1.0 - @yellow) * one_k,
179
+ @alpha,
180
+ ]
181
+ RGB.new(*rgba)
182
+ end
183
+
184
+ def to_cmyk
185
+ clone
186
+ end
187
+
188
+ def to_hsv
189
+ to_rgb.to_hsv
190
+ end
191
+ end
192
+
193
+ class HSV < Base
194
+ attr_accessor :hue, :saturation, :value
195
+
196
+ alias_method :h, :hue
197
+ alias_method :h=, :hue=
198
+ alias_method :s, :saturation
199
+ alias_method :s=, :saturation=
200
+ alias_method :v, :value
201
+ alias_method :v=, :value=
202
+
203
+ def initialize(h, s, v, a=1.0)
204
+ super(a)
205
+ assert_in_range(s, "saturation")
206
+ assert_in_range(v, "value")
207
+ @hue = h.modulo(360.0)
208
+ @saturation = s
209
+ @value = v
210
+ end
211
+
212
+ def to_a
213
+ [@hue, @saturation, @value, @alpha]
214
+ end
215
+ alias_method :to_ary, :to_a
216
+
217
+ def to_rgb
218
+ if s > 0
219
+ h_60 = @hue / 60.0
220
+ hi = h_60.floor.modulo(6)
221
+ f = h_60 - hi
222
+ p = @value * (1 - @saturation)
223
+ q = @value * (1 - f * @saturation)
224
+ t = @value * (1 - (1 - f) * @saturation)
225
+ case hi
226
+ when 0
227
+ rgb = [@value, t, p]
228
+ when 1
229
+ rgb = [q, @value, p]
230
+ when 2
231
+ rgb = [p, @value, t]
232
+ when 3
233
+ rgb = [p, q, @value]
234
+ when 4
235
+ rgb = [t, p, @value]
236
+ when 5
237
+ rgb = [@value, p, q]
238
+ end
239
+ rgba = rgb + [@alpha]
240
+ RGB.new(*rgba)
241
+ else
242
+ RGB.new(@value, @value, @value, @alpha)
243
+ end
244
+ end
245
+
246
+ def to_cmyk
247
+ to_rgb.to_cmyk
248
+ end
249
+
250
+ def to_hsv
251
+ clone
252
+ end
253
+ end
254
+ end
255
+ end
@@ -0,0 +1,656 @@
1
+ require 'cairo/color'
2
+
3
+ module Cairo
4
+ module Color
5
+ # Alice Blue: #F0F8FF
6
+ ALICE_BLUE = RGB.new(0.941176470588235, 0.972549019607843, 1.0)
7
+ # Alizarin Crimson: #E32636
8
+ ALIZARIN_CRIMSON = RGB.new(0.890196078431372, 0.149019607843137, 0.211764705882353)
9
+ # Amaranth: #E52B50
10
+ AMARANTH = RGB.new(0.898039215686275, 0.168627450980392, 0.313725490196078)
11
+ # Amber: #FFBF00
12
+ AMBER = RGB.new(1.0, 0.749019607843137, 0.0)
13
+ # Amethyst: #9966CC
14
+ AMETHYST = RGB.new(0.6, 0.4, 0.8)
15
+ # Apricot: #FBCEB1
16
+ APRICOT = RGB.new(0.984313725490196, 0.807843137254902, 0.694117647058824)
17
+ # Aqua: #00FFFF
18
+ AQUA = RGB.new(0.0, 1.0, 1.0)
19
+ # Aquamarine: #7FFFD4
20
+ AQUAMARINE = RGB.new(0.498039215686275, 1.0, 0.831372549019608)
21
+ # Asparagus: #7BA05B
22
+ ASPARAGUS = RGB.new(0.482352941176471, 0.627450980392157, 0.356862745098039)
23
+ # Azure: #007FFF
24
+ AZURE = RGB.new(0.0, 0.498039215686275, 1.0)
25
+ # Beige: #F5F5DC
26
+ BEIGE = RGB.new(0.96078431372549, 0.96078431372549, 0.862745098039216)
27
+ # Bistre: #3D2B1F
28
+ BISTRE = RGB.new(0.23921568627451, 0.168627450980392, 0.12156862745098)
29
+ # Black: #000000
30
+ BLACK = RGB.new(0.0, 0.0, 0.0)
31
+ # Blue: #0000FF
32
+ BLUE = RGB.new(0.0, 0.0, 1.0)
33
+ # Bondi Blue: #0095B6
34
+ BONDI_BLUE = RGB.new(0.0, 0.584313725490196, 0.713725490196078)
35
+ # Bright green: #66FF00
36
+ BRIGHT_GREEN = RGB.new(0.4, 1.0, 0.0)
37
+ # Bright turquoise: #08E8DE
38
+ BRIGHT_TURQUOISE = RGB.new(0.0313725490196078, 0.909803921568627, 0.870588235294118)
39
+ # Brown: #964B00
40
+ BROWN = RGB.new(0.588235294117647, 0.294117647058824, 0.0)
41
+ # Buff: #F0DC82
42
+ BUFF = RGB.new(0.941176470588235, 0.862745098039216, 0.509803921568627)
43
+ # Burgundy: #900020
44
+ BURGUNDY = RGB.new(0.501960784313725, 0.0, 0.125490196078431)
45
+ # Burnt Orange: #CC5500
46
+ BURNT_ORANGE = RGB.new(0.8, 0.333333333333333, 0.0)
47
+ # Burnt Sienna: #E97451
48
+ BURNT_SIENNA = RGB.new(0.913725490196078, 0.454901960784314, 0.317647058823529)
49
+ # Burnt umber: #8A3324
50
+ BURNT_UMBER = RGB.new(0.541176470588235, 0.2, 0.141176470588235)
51
+ # Camouflage green: #78866B
52
+ CAMOUFLAGE_GREEN = RGB.new(0.470588235294118, 0.525490196078431, 0.419607843137255)
53
+ # Cardinal: #C41E3A
54
+ CARDINAL = RGB.new(0.768627450980392, 0.117647058823529, 0.227450980392157)
55
+ # Carmine: #960018
56
+ CARMINE = RGB.new(0.588235294117647, 0.0, 0.0941176470588235)
57
+ # Carnation: #F95A61
58
+ CARNATION = RGB.new(0.976470588235294, 0.352941176470588, 0.380392156862745)
59
+ # Carrot orange: #ED9121
60
+ CARROT_ORANGE = RGB.new(0.929411764705882, 0.568627450980392, 0.129411764705882)
61
+ # Celadon: #ACE1AF
62
+ CELADON = RGB.new(0.674509803921569, 0.882352941176471, 0.686274509803922)
63
+ # Cerise: #DE3163
64
+ CERISE = RGB.new(0.870588235294118, 0.192156862745098, 0.388235294117647)
65
+ # Cerulean: #007BA7
66
+ CERULEAN = RGB.new(0.0, 0.482352941176471, 0.654901960784314)
67
+ # Cerulean blue: #2A52BE
68
+ CERULEAN_BLUE = RGB.new(0.164705882352941, 0.32156862745098, 0.745098039215686)
69
+ # Chartreuse: #7FFF00
70
+ CHARTREUSE = RGB.new(0.498039215686275, 1.0, 0.0)
71
+ # Chartreuse yellow: #DFFF00
72
+ CHARTREUSE_YELLOW = RGB.new(0.874509803921569, 1.0, 0.0)
73
+ # Chestnut: #CD5C5C
74
+ CHESTNUT = RGB.new(0.803921568627451, 0.36078431372549, 0.36078431372549)
75
+ # Chocolate: #D2691E
76
+ CHOCOLATE = RGB.new(0.823529411764706, 0.411764705882353, 0.117647058823529)
77
+ # Cinnamon: #7B3F00
78
+ CINNAMON = RGB.new(0.482352941176471, 0.247058823529412, 0.0)
79
+ # Cobalt: #0047AB
80
+ COBALT = RGB.new(0.0, 0.27843137254902, 0.670588235294118)
81
+ # Copper: #B87333
82
+ COPPER = RGB.new(0.72156862745098, 0.450980392156863, 0.2)
83
+ # Copper rose: #996666
84
+ COPPER_ROSE = RGB.new(0.6, 0.4, 0.4)
85
+ # Coral: #FF7F50
86
+ CORAL = RGB.new(1.0, 0.498039215686275, 0.313725490196078)
87
+ # Coral Red: #FF4040
88
+ CORAL_RED = RGB.new(1.0, 0.250980392156863, 0.250980392156863)
89
+ # Corn: #FBEC5D
90
+ CORN = RGB.new(0.984313725490196, 0.925490196078431, 0.364705882352941)
91
+ # Cornflower blue: #6495ED
92
+ CORNFLOWER_BLUE = RGB.new(0.392156862745098, 0.584313725490196, 0.929411764705882)
93
+ # Cream: #FFFDD0
94
+ CREAM = RGB.new(1.0, 0.992156862745098, 0.815686274509804)
95
+ # Crimson: #DC143C
96
+ CRIMSON = RGB.new(0.862745098039216, 0.0784313725490196, 0.235294117647059)
97
+ # Cyan: #00FFFF
98
+ CYAN = RGB.new(0.0, 1.0, 1.0)
99
+ # Dark blue: #0000C8
100
+ DARK_BLUE = RGB.new(0.0, 0.0, 0.545098039215686)
101
+ # Denim: #1560BD
102
+ DENIM = RGB.new(0.0823529411764706, 0.376470588235294, 0.741176470588235)
103
+ # Dodger blue: #1E90FF
104
+ DODGER_BLUE = RGB.new(0.117647058823529, 0.564705882352941, 1.0)
105
+ # Emerald: #50C878
106
+ EMERALD = RGB.new(0.313725490196078, 0.784313725490196, 0.470588235294118)
107
+ # Eggplant: #990066
108
+ EGGPLANT = RGB.new(0.6, 0.0, 0.4)
109
+ # Falu red: #801818
110
+ FALU_RED = RGB.new(0.501960784313725, 0.0941176470588235, 0.0941176470588235)
111
+ # Fern green: #4F7942
112
+ FERN_GREEN = RGB.new(0.309803921568627, 0.474509803921569, 0.258823529411765)
113
+ # Flax: #EEDC82
114
+ FLAX = RGB.new(0.933333333333333, 0.862745098039216, 0.509803921568627)
115
+ # Forest green: #228B22
116
+ FOREST_GREEN = RGB.new(0.133333333333333, 0.545098039215686, 0.133333333333333)
117
+ # French Rose: #F64A8A
118
+ FRENCH_ROSE = RGB.new(0.964705882352941, 0.290196078431373, 0.541176470588235)
119
+ # Fuchsia: #FF00FF
120
+ FUCHSIA = RGB.new(1.0, 0.0, 1.0)
121
+ # Gamboge: #E49B0F
122
+ GAMBOGE = RGB.new(0.894117647058824, 0.607843137254902, 0.0588235294117647)
123
+ # Gold: #FFD700
124
+ GOLD = RGB.new(1.0, 0.843137254901961, 0.0)
125
+ # Goldenrod: #DAA520
126
+ GOLDENROD = RGB.new(0.854901960784314, 0.647058823529412, 0.125490196078431)
127
+ # Gray: #808080
128
+ GRAY = RGB.new(0.501960784313725, 0.501960784313725, 0.501960784313725)
129
+ # Gray-asparagus: #465945
130
+ GRAY_ASPARAGUS = RGB.new(0.274509803921569, 0.349019607843137, 0.270588235294118)
131
+ # Green: #00FF00
132
+ GREEN = RGB.new(0.0, 1.0, 0.0)
133
+ # Green-yellow: #ADFF2F
134
+ GREEN_YELLOW = RGB.new(0.67843137254902, 1.0, 0.184313725490196)
135
+ # Harlequin: #3FFF00
136
+ HARLEQUIN = RGB.new(0.247058823529412, 1.0, 0.0)
137
+ # Heliotrope: #DF73FF
138
+ HELIOTROPE = RGB.new(0.874509803921569, 0.450980392156863, 1.0)
139
+ # Hollywood Cerise: #F400A1
140
+ HOLLYWOOD_CERISE = RGB.new(0.956862745098039, 0.0, 0.631372549019608)
141
+ # Hot Magenta: #FF00CC
142
+ HOT_MAGENTA = RGB.new(1.0, 0.0, 0.8)
143
+ # Hot Pink: #FF69B4
144
+ HOT_PINK = RGB.new(1.0, 0.411764705882353, 0.705882352941177)
145
+ # Indigo: #4B0082
146
+ INDIGO = RGB.new(0.294117647058824, 0.0, 0.509803921568627)
147
+ # International Klein Blue: #002FA7
148
+ INTERNATIONAL_KLEIN_BLUE = RGB.new(0.0, 0.184313725490196, 0.654901960784314)
149
+ # International orange: #FF4F00
150
+ INTERNATIONAL_ORANGE = RGB.new(1.0, 0.309803921568627, 0.0)
151
+ # Ivory: #FFFFF0
152
+ IVORY = RGB.new(1.0, 1.0, 0.941176470588235)
153
+ # Jade: #00A86B
154
+ JADE = RGB.new(0.0, 0.658823529411765, 0.419607843137255)
155
+ # Khaki: #C3B091
156
+ KHAKI = RGB.new(0.764705882352941, 0.690196078431373, 0.568627450980392)
157
+ # Khaki (X11): #F0E68C
158
+ KHAKI_X11 = RGB.new(0.941176470588235, 0.901960784313726, 0.549019607843137)
159
+ # Lavender: #B57EDC
160
+ LAVENDER = RGB.new(0.709803921568627, 0.494117647058824, 0.862745098039216)
161
+ # Lavender blue: #CCCCFF
162
+ LAVENDER_BLUE = RGB.new(0.8, 0.8, 1.0)
163
+ # Lavender blush: #FFF0F5
164
+ LAVENDER_BLUSH = RGB.new(1.0, 0.941176470588235, 0.96078431372549)
165
+ # Lavender gray: #BDBBD7
166
+ LAVENDER_GRAY = RGB.new(0.741176470588235, 0.733333333333333, 0.843137254901961)
167
+ # Lavender pink: #FBAED2
168
+ LAVENDER_PINK = RGB.new(0.984313725490196, 0.682352941176471, 0.823529411764706)
169
+ # Lavender rose: #FBA0E3
170
+ LAVENDER_ROSE = RGB.new(0.984313725490196, 0.627450980392157, 0.890196078431372)
171
+ # Lemon: #FDE910
172
+ LEMON = RGB.new(0.992156862745098, 0.913725490196078, 0.0627450980392157)
173
+ # Lemon chiffon: #FFFACD
174
+ LEMON_CHIFFON = RGB.new(1.0, 0.980392156862745, 0.803921568627451)
175
+ # Lilac: #C8A2C8
176
+ LILAC = RGB.new(0.784313725490196, 0.635294117647059, 0.784313725490196)
177
+ # Lime: #BFFF00
178
+ LIME = RGB.new(0.749019607843137, 1.0, 0.0)
179
+ # Linen: #FAF0E6
180
+ LINEN = RGB.new(0.980392156862745, 0.941176470588235, 0.901960784313726)
181
+ # Magenta: #FF00FF
182
+ MAGENTA = RGB.new(1.0, 0.0, 1.0)
183
+ # Malachite: #0BDA51
184
+ MALACHITE = RGB.new(0.0431372549019608, 0.854901960784314, 0.317647058823529)
185
+ # Maroon: #800000
186
+ MAROON = RGB.new(0.501960784313725, 0.0, 0.0)
187
+ # Mauve: #E0B0FF
188
+ MAUVE = RGB.new(0.87843137254902, 0.690196078431373, 1.0)
189
+ # Medium carmine: #AF4035
190
+ MEDIUM_CARMINE = RGB.new(0.686274509803922, 0.250980392156863, 0.207843137254902)
191
+ # Medium Lavender: #EE82EE
192
+ MEDIUM_LAVENDER = RGB.new(0.933333333333333, 0.509803921568627, 0.933333333333333)
193
+ # Medium Purple: #9370DB
194
+ MEDIUM_PURPLE = RGB.new(0.576470588235294, 0.43921568627451, 0.858823529411765)
195
+ # Midnight Blue: #003366
196
+ MIDNIGHT_BLUE = RGB.new(0.0, 0.2, 0.4)
197
+ # Mint Green: #98FF98
198
+ MINT_GREEN = RGB.new(0.596078431372549, 1.0, 0.596078431372549)
199
+ # Moss green: #ADDFAD
200
+ MOSS_GREEN = RGB.new(0.67843137254902, 0.874509803921569, 0.67843137254902)
201
+ # Mountbatten pink: #997A8D
202
+ MOUNTBATTEN_PINK = RGB.new(0.6, 0.47843137254902, 0.552941176470588)
203
+ # Mustard: #FFDB58
204
+ MUSTARD = RGB.new(1.0, 0.858823529411765, 0.345098039215686)
205
+ # Navajo white: #FFDEAD
206
+ NAVAJO_WHITE = RGB.new(1.0, 0.870588235294118, 0.67843137254902)
207
+ # Navy Blue: #000080
208
+ NAVY_BLUE = RGB.new(0.0, 0.0, 0.501960784313725)
209
+ # Ochre: #CC7722
210
+ OCHRE = RGB.new(0.8, 0.466666666666667, 0.133333333333333)
211
+ # Old Gold: #CFB53B
212
+ OLD_GOLD = RGB.new(0.811764705882353, 0.709803921568627, 0.231372549019608)
213
+ # Old Lace: #FDF5E6
214
+ OLD_LACE = RGB.new(0.992156862745098, 0.96078431372549, 0.901960784313726)
215
+ # Old Lavender: #796878
216
+ OLD_LAVENDER = RGB.new(0.474509803921569, 0.407843137254902, 0.470588235294118)
217
+ # Old Rose: #C08081
218
+ OLD_ROSE = RGB.new(0.752941176470588, 0.501960784313725, 0.505882352941176)
219
+ # Olive: #808000
220
+ OLIVE = RGB.new(0.501960784313725, 0.501960784313725, 0.0)
221
+ # Olive Drab: #6B8E23
222
+ OLIVE_DRAB = RGB.new(0.419607843137255, 0.556862745098039, 0.137254901960784)
223
+ # Orange (color wheel): #FF7500
224
+ ORANGE_COLOR_WHEEL = RGB.new(1.0, 0.498039215686275, 0.0)
225
+ ORANGE = ORANGE_COLOR_WHEEL
226
+ # Orange (web): #FFA500
227
+ ORANGE_WEB = RGB.new(1.0, 0.647058823529412, 0.0)
228
+ # Orange Peel: #FFA000
229
+ ORANGE_PEEL = RGB.new(1.0, 0.627450980392157, 0.0)
230
+ # Orchid: #DA70D6
231
+ ORCHID = RGB.new(0.854901960784314, 0.43921568627451, 0.83921568627451)
232
+ # Papaya whip: #FFEFD5
233
+ PAPAYA_WHIP = RGB.new(1.0, 0.937254901960784, 0.835294117647059)
234
+ # Pastel green: #77DD77
235
+ PASTEL_GREEN = RGB.new(0.466666666666667, 0.866666666666667, 0.466666666666667)
236
+ # Pastel pink: #FFD1DC
237
+ PASTEL_PINK = RGB.new(1.0, 0.819607843137255, 0.862745098039216)
238
+ # Peach: #FFE5B4
239
+ PEACH = RGB.new(1.0, 0.898039215686275, 0.705882352941177)
240
+ # Peach-orange: #FFCC99
241
+ PEACH_ORANGE = RGB.new(1.0, 0.8, 0.6)
242
+ # Peach-yellow: #FADFAD
243
+ PEACH_YELLOW = RGB.new(0.980392156862745, 0.874509803921569, 0.67843137254902)
244
+ # Pear: #D1E231
245
+ PEAR = RGB.new(0.819607843137255, 0.886274509803922, 0.192156862745098)
246
+ # Periwinkle: #CCCCFF
247
+ PERIWINKLE = RGB.new(0.8, 0.8, 1.0)
248
+ # Persian blue: #1C39BB
249
+ PERSIAN_BLUE = RGB.new(0.109803921568627, 0.223529411764706, 0.733333333333333)
250
+ # Persian green: #00A693
251
+ PERSIAN_GREEN = RGB.new(0.0, 0.650980392156863, 0.576470588235294)
252
+ # Persian indigo: #32127A
253
+ PERSIAN_INDIGO = RGB.new(0.196078431372549, 0.0705882352941176, 0.47843137254902)
254
+ # Persian pink: #F77FBE
255
+ PERSIAN_PINK = RGB.new(0.968627450980392, 0.498039215686275, 0.745098039215686)
256
+ # Persian red: #CC3333
257
+ PERSIAN_RED = RGB.new(0.8, 0.2, 0.2)
258
+ # Persian rose: #FF1CB1
259
+ PERSIAN_ROSE = RGB.new(1.0, 0.109803921568627, 0.694117647058824)
260
+ # Pine Green: #01796F
261
+ PINE_GREEN = RGB.new(0.00392156862745098, 0.474509803921569, 0.435294117647059)
262
+ # Pink: #FFC0CB
263
+ PINK = RGB.new(1.0, 0.752941176470588, 0.796078431372549)
264
+ # Pink-orange: #FF9966
265
+ PINK_ORANGE = RGB.new(1.0, 0.6, 0.4)
266
+ # Pomegranate: #F34723
267
+ POMEGRANATE = RGB.new(0.952941176470588, 0.27843137254902, 0.137254901960784)
268
+ # Powder blue (web): #B0E0E6
269
+ POWDER_BLUE_WEB = RGB.new(0.690196078431373, 0.87843137254902, 0.901960784313726)
270
+ # Puce: #CC8899
271
+ PUCE = RGB.new(0.8, 0.533333333333333, 0.6)
272
+ # Prussian blue: #003153
273
+ PRUSSIAN_BLUE = RGB.new(0.0, 0.192156862745098, 0.325490196078431)
274
+ # Pumpkin: #FF7518
275
+ PUMPKIN = RGB.new(1.0, 0.458823529411765, 0.0941176470588235)
276
+ # Purple: #660099
277
+ PURPLE = RGB.new(0.4, 0.0, 0.6)
278
+ # Raw umber: #734A12
279
+ RAW_UMBER = RGB.new(0.450980392156863, 0.290196078431373, 0.0705882352941176)
280
+ # Red: #FF0000
281
+ RED = RGB.new(1.0, 0.0, 0.0)
282
+ # Red-violet: #C71585
283
+ RED_VIOLET = RGB.new(0.780392156862745, 0.0823529411764706, 0.52156862745098)
284
+ # Robin egg blue: #00CCCC
285
+ ROBIN_EGG_BLUE = RGB.new(0.0, 0.8, 0.8)
286
+ # Rose: #FF007F
287
+ ROSE = RGB.new(1.0, 0.0, 0.498039215686275)
288
+ # Royal Blue: #4169E1
289
+ ROYAL_BLUE = RGB.new(0.254901960784314, 0.411764705882353, 0.882352941176471)
290
+ # Russet: #80461B
291
+ RUSSET = RGB.new(0.501960784313725, 0.274509803921569, 0.105882352941176)
292
+ # Rust: #B7410E
293
+ RUST = RGB.new(0.717647058823529, 0.254901960784314, 0.0549019607843137)
294
+ # Safety Orange (Blaze Orange): #FF6600
295
+ SAFETY_ORANGE = RGB.new(1.0, 0.4, 0.0)
296
+ BLAZE_ORANGE = SAFETY_ORANGE
297
+ # Saffron: #F4C430
298
+ SAFFRON = RGB.new(0.956862745098039, 0.768627450980392, 0.188235294117647)
299
+ # Sapphire: #082567
300
+ SAPPHIRE = RGB.new(0.0313725490196078, 0.145098039215686, 0.403921568627451)
301
+ # Salmon: #FF8C69
302
+ SALMON = RGB.new(1.0, 0.549019607843137, 0.411764705882353)
303
+ # Sandy brown: #F4A460
304
+ SANDY_BROWN = RGB.new(0.956862745098039, 0.643137254901961, 0.376470588235294)
305
+ # Sangria: #92000A
306
+ SANGRIA = RGB.new(0.572549019607843, 0.0, 0.0392156862745098)
307
+ # Scarlet: #FF2400
308
+ SCARLET = RGB.new(1.0, 0.141176470588235, 0.0)
309
+ # School bus yellow: #FFD800
310
+ SCHOOL_BUS_YELLOW = RGB.new(1.0, 0.847058823529412, 0.0)
311
+ # Sea Green: #2E8B57
312
+ SEA_GREEN = RGB.new(0.180392156862745, 0.545098039215686, 0.341176470588235)
313
+ # Seashell: #FFF5EE
314
+ SEASHELL = RGB.new(1.0, 0.96078431372549, 0.933333333333333)
315
+ # Selective yellow: #FFBA00
316
+ SELECTIVE_YELLOW = RGB.new(1.0, 0.729411764705882, 0.0)
317
+ # Sepia: #704214
318
+ SEPIA = RGB.new(0.43921568627451, 0.258823529411765, 0.0784313725490196)
319
+ # Shocking Pink: #FC0FC0
320
+ SHOCKING_PINK = RGB.new(0.988235294117647, 0.0588235294117647, 0.752941176470588)
321
+ # Silver: #C0C0C0
322
+ SILVER = RGB.new(0.752941176470588, 0.752941176470588, 0.752941176470588)
323
+ # Slate gray: #708090
324
+ SLATE_GRAY = RGB.new(0.43921568627451, 0.501960784313725, 0.564705882352941)
325
+ # Smalt (Dark powder blue): #003399
326
+ SMALT = RGB.new(0.0, 0.2, 0.6)
327
+ DARK_POWDER_BLUE = SMALT
328
+ # Spring Green: #00FF7F
329
+ SPRING_GREEN = RGB.new(0.0, 1.0, 0.498039215686275)
330
+ # Steel blue: #4682B4
331
+ STEEL_BLUE = RGB.new(0.274509803921569, 0.509803921568627, 0.705882352941177)
332
+ # Swamp green: #ACB78E
333
+ SWAMP_GREEN = RGB.new(0.674509803921569, 0.717647058823529, 0.556862745098039)
334
+ # Tan: #D2B48C
335
+ TAN = RGB.new(0.823529411764706, 0.705882352941177, 0.549019607843137)
336
+ # Tangerine: #FFCC00
337
+ TANGERINE = RGB.new(1.0, 0.8, 0.0)
338
+ # Taupe: #483C32
339
+ TAUPE = RGB.new(0.282352941176471, 0.235294117647059, 0.196078431372549)
340
+ # Tea Green: #D0F0C0
341
+ TEA_GREEN = RGB.new(0.815686274509804, 0.941176470588235, 0.752941176470588)
342
+ # Teal: #008080
343
+ TEAL = RGB.new(0.0, 0.501960784313725, 0.501960784313725)
344
+ # Tenn&eacute; (Tawny): #CD5700
345
+ TENNE = RGB.new(0.803921568627451, 0.341176470588235, 0.0)
346
+ TAWNY = TENNE
347
+ # Terra cotta: #E2725B
348
+ TERRA_COTTA = RGB.new(0.886274509803922, 0.447058823529412, 0.356862745098039)
349
+ # Thistle: #D8BFD8
350
+ THISTLE = RGB.new(0.847058823529412, 0.749019607843137, 0.847058823529412)
351
+ # Turquoise: #30D5C8
352
+ TURQUOISE = RGB.new(0.188235294117647, 0.835294117647059, 0.784313725490196)
353
+ # Ultramarine: #120A8F
354
+ ULTRAMARINE = RGB.new(0.0705882352941176, 0.0392156862745098, 0.56078431372549)
355
+ # Vermilion: #FF4D00
356
+ VERMILION = RGB.new(1.0, 0.301960784313725, 0.0)
357
+ # Violet: #8B00FF
358
+ VIOLET = RGB.new(0.545098039215686, 0.0, 1.0)
359
+ # Violet-eggplant: #991199
360
+ VIOLET_EGGPLANT = RGB.new(0.6, 0.0666666666666667, 0.6)
361
+ # Viridian: #40826D
362
+ VIRIDIAN = RGB.new(0.250980392156863, 0.509803921568627, 0.427450980392157)
363
+ # Wheat: #F5DEB3
364
+ WHEAT = RGB.new(0.96078431372549, 0.870588235294118, 0.701960784313725)
365
+ # White: #FFFFFF
366
+ WHITE = RGB.new(1.0, 1.0, 1.0)
367
+ # Wisteria: #C9A0DC
368
+ WISTERIA = RGB.new(0.788235294117647, 0.627450980392157, 0.862745098039216)
369
+ # Yellow: #FFFF00
370
+ YELLOW = RGB.new(1.0, 1.0, 0.0)
371
+ # Zinnwaldite: #EBC2AF
372
+ ZINNWALDITE = RGB.new(0.92156862745098, 0.76078431372549, 0.686274509803922)
373
+ module X11
374
+ # Gray: #BEBEBE
375
+ GRAY = RGB.new(0.745098039215686, 0.745098039215686, 0.745098039215686)
376
+ # Green: #00FF00
377
+ GREEN = RGB.new(0.0, 1.0, 0.0)
378
+ # Maroon: #B03060
379
+ MAROON = RGB.new(0.690196078431373, 0.188235294117647, 0.376470588235294)
380
+ # Purple: #A020F0
381
+ PURPLE = RGB.new(0.627450980392157, 0.125490196078431, 0.941176470588235)
382
+ # Alice Blue: #F0F8FF
383
+ ALICE_BLUE = RGB.new(0.941176470588235, 0.972549019607843, 1.0)
384
+ # Antique White: #FAEBD7
385
+ ANTIQUE_WHITE = RGB.new(0.980392156862745, 0.92156862745098, 0.843137254901961)
386
+ # Aqua: #00FFFF
387
+ AQUA = RGB.new(0.0, 1.0, 1.0)
388
+ # Aquamarine: #7FFFD4
389
+ AQUAMARINE = RGB.new(0.498039215686275, 1.0, 0.831372549019608)
390
+ # Azure: #F0FFFF
391
+ AZURE = RGB.new(0.941176470588235, 1.0, 1.0)
392
+ # Beige: #F5F5DC
393
+ BEIGE = RGB.new(0.96078431372549, 0.96078431372549, 0.862745098039216)
394
+ # Bisque: #FFE4C4
395
+ BISQUE = RGB.new(1.0, 0.894117647058824, 0.768627450980392)
396
+ # Black: #000000
397
+ BLACK = RGB.new(0.0, 0.0, 0.0)
398
+ # Blanched Almond: #FFEBCD
399
+ BLANCHED_ALMOND = RGB.new(1.0, 0.92156862745098, 0.803921568627451)
400
+ # Blue: #0000FF
401
+ BLUE = RGB.new(0.0, 0.0, 1.0)
402
+ # Blue Violet: #8A2BE2
403
+ BLUE_VIOLET = RGB.new(0.541176470588235, 0.168627450980392, 0.886274509803922)
404
+ # Brown: #A52A2A
405
+ BROWN = RGB.new(0.647058823529412, 0.164705882352941, 0.164705882352941)
406
+ # Burly Wood: #DEB887
407
+ BURLY_WOOD = RGB.new(0.870588235294118, 0.72156862745098, 0.529411764705882)
408
+ # Cadet Blue: #5F9EA0
409
+ CADET_BLUE = RGB.new(0.372549019607843, 0.619607843137255, 0.627450980392157)
410
+ # Chartreuse: #7FFF00
411
+ CHARTREUSE = RGB.new(0.498039215686275, 1.0, 0.0)
412
+ # Chocolate: #D2691E
413
+ CHOCOLATE = RGB.new(0.823529411764706, 0.411764705882353, 0.117647058823529)
414
+ # Coral: #FF7F50
415
+ CORAL = RGB.new(1.0, 0.498039215686275, 0.313725490196078)
416
+ # Cornflower Blue: #6495ED
417
+ CORNFLOWER_BLUE = RGB.new(0.392156862745098, 0.584313725490196, 0.929411764705882)
418
+ # Cornsilk: #FFF8DC
419
+ CORNSILK = RGB.new(1.0, 0.972549019607843, 0.862745098039216)
420
+ # Crimson: #DC143C
421
+ CRIMSON = RGB.new(0.862745098039216, 0.0784313725490196, 0.235294117647059)
422
+ # Cyan: #00FFFF
423
+ CYAN = RGB.new(0.0, 1.0, 1.0)
424
+ # Dark Blue: #00008B
425
+ DARK_BLUE = RGB.new(0.0, 0.0, 0.545098039215686)
426
+ # Dark Cyan: #008B8B
427
+ DARK_CYAN = RGB.new(0.0, 0.545098039215686, 0.545098039215686)
428
+ # Dark Goldenrod: #B8860B
429
+ DARK_GOLDENROD = RGB.new(0.72156862745098, 0.525490196078431, 0.0431372549019608)
430
+ # Dark Gray: #A9A9A9
431
+ DARK_GRAY = RGB.new(0.662745098039216, 0.662745098039216, 0.662745098039216)
432
+ # Dark Green: #006400
433
+ DARK_GREEN = RGB.new(0.0, 0.392156862745098, 0.0)
434
+ # Dark Khaki: #BDB76B
435
+ DARK_KHAKI = RGB.new(0.741176470588235, 0.717647058823529, 0.419607843137255)
436
+ # Dark Magenta: #8B008B
437
+ DARK_MAGENTA = RGB.new(0.545098039215686, 0.0, 0.545098039215686)
438
+ # Dark Olive Green: #556B2F
439
+ DARK_OLIVE_GREEN = RGB.new(0.333333333333333, 0.419607843137255, 0.184313725490196)
440
+ # Dark Orange: #FF8C00
441
+ DARK_ORANGE = RGB.new(1.0, 0.549019607843137, 0.0)
442
+ # Dark Orchid: #9932CC
443
+ DARK_ORCHID = RGB.new(0.6, 0.196078431372549, 0.8)
444
+ # Dark Red: #8B0000
445
+ DARK_RED = RGB.new(0.545098039215686, 0.0, 0.0)
446
+ # Dark Salmon: #E9967A
447
+ DARK_SALMON = RGB.new(0.913725490196078, 0.588235294117647, 0.47843137254902)
448
+ # Dark Sea Green: #8FBC8F
449
+ DARK_SEA_GREEN = RGB.new(0.56078431372549, 0.737254901960784, 0.56078431372549)
450
+ # Dark Slate Blue: #483D8B
451
+ DARK_SLATE_BLUE = RGB.new(0.282352941176471, 0.23921568627451, 0.545098039215686)
452
+ # Dark Slate Gray: #2F4F4F
453
+ DARK_SLATE_GRAY = RGB.new(0.184313725490196, 0.309803921568627, 0.309803921568627)
454
+ # Dark Turquoise: #00CED1
455
+ DARK_TURQUOISE = RGB.new(0.0, 0.807843137254902, 0.819607843137255)
456
+ # Dark Violet: #9400D3
457
+ DARK_VIOLET = RGB.new(0.580392156862745, 0.0, 0.827450980392157)
458
+ # Deep Pink: #FF1493
459
+ DEEP_PINK = RGB.new(1.0, 0.0784313725490196, 0.576470588235294)
460
+ # Deep Sky Blue: #00BFFF
461
+ DEEP_SKY_BLUE = RGB.new(0.0, 0.749019607843137, 1.0)
462
+ # Dim Gray: #696969
463
+ DIM_GRAY = RGB.new(0.411764705882353, 0.411764705882353, 0.411764705882353)
464
+ # Dodger Blue: #1E90FF
465
+ DODGER_BLUE = RGB.new(0.117647058823529, 0.564705882352941, 1.0)
466
+ # Fire Brick: #B22222
467
+ FIRE_BRICK = RGB.new(0.698039215686274, 0.133333333333333, 0.133333333333333)
468
+ # Floral White: #FFFAF0
469
+ FLORAL_WHITE = RGB.new(1.0, 0.980392156862745, 0.941176470588235)
470
+ # Forest Green: #228B22
471
+ FOREST_GREEN = RGB.new(0.133333333333333, 0.545098039215686, 0.133333333333333)
472
+ # Fuchsia: #FF00FF
473
+ FUCHSIA = RGB.new(1.0, 0.0, 1.0)
474
+ # Gainsboro: #DCDCDC
475
+ GAINSBORO = RGB.new(0.862745098039216, 0.862745098039216, 0.862745098039216)
476
+ # Ghost White: #F8F8FF
477
+ GHOST_WHITE = RGB.new(0.972549019607843, 0.972549019607843, 1.0)
478
+ # Gold: #FFD700
479
+ GOLD = RGB.new(1.0, 0.843137254901961, 0.0)
480
+ # Goldenrod: #DAA520
481
+ GOLDENROD = RGB.new(0.854901960784314, 0.647058823529412, 0.125490196078431)
482
+ # Green Yellow: #ADFF2F
483
+ GREEN_YELLOW = RGB.new(0.67843137254902, 1.0, 0.184313725490196)
484
+ # Honeydew: #F0FFF0
485
+ HONEYDEW = RGB.new(0.941176470588235, 1.0, 0.941176470588235)
486
+ # Hot Pink: #FF69B4
487
+ HOT_PINK = RGB.new(1.0, 0.411764705882353, 0.705882352941177)
488
+ # Indian Red: #CD5C5C
489
+ INDIAN_RED = RGB.new(0.803921568627451, 0.36078431372549, 0.36078431372549)
490
+ # Indigo: #4B0082
491
+ INDIGO = RGB.new(0.294117647058824, 0.0, 0.509803921568627)
492
+ # Ivory: #FFFFF0
493
+ IVORY = RGB.new(1.0, 1.0, 0.941176470588235)
494
+ # Khaki: #F0E68C
495
+ KHAKI = RGB.new(0.941176470588235, 0.901960784313726, 0.549019607843137)
496
+ # Lavender: #E6E6FA
497
+ LAVENDER = RGB.new(0.901960784313726, 0.901960784313726, 0.980392156862745)
498
+ # Lavender Blush: #FFF0F5
499
+ LAVENDER_BLUSH = RGB.new(1.0, 0.941176470588235, 0.96078431372549)
500
+ # Lawn Green: #7CFC00
501
+ LAWN_GREEN = RGB.new(0.486274509803922, 0.988235294117647, 0.0)
502
+ # Lemon Chiffon: #FFFACD
503
+ LEMON_CHIFFON = RGB.new(1.0, 0.980392156862745, 0.803921568627451)
504
+ # Light Blue: #ADD8E6
505
+ LIGHT_BLUE = RGB.new(0.67843137254902, 0.847058823529412, 0.901960784313726)
506
+ # Light Coral: #F08080
507
+ LIGHT_CORAL = RGB.new(0.941176470588235, 0.501960784313725, 0.501960784313725)
508
+ # Light Cyan: #E0FFFF
509
+ LIGHT_CYAN = RGB.new(0.87843137254902, 1.0, 1.0)
510
+ # Light Goldenrod Yellow: #FAFAD2
511
+ LIGHT_GOLDENROD_YELLOW = RGB.new(0.980392156862745, 0.980392156862745, 0.823529411764706)
512
+ # Light Green: #90EE90
513
+ LIGHT_GREEN = RGB.new(0.564705882352941, 0.933333333333333, 0.564705882352941)
514
+ # Light Grey: #D3D3D3
515
+ LIGHT_GREY = RGB.new(0.827450980392157, 0.827450980392157, 0.827450980392157)
516
+ # Light Pink: #FFB6C1
517
+ LIGHT_PINK = RGB.new(1.0, 0.713725490196078, 0.756862745098039)
518
+ # Light Salmon: #FFA07A
519
+ LIGHT_SALMON = RGB.new(1.0, 0.627450980392157, 0.47843137254902)
520
+ # Light Sea Green: #20B2AA
521
+ LIGHT_SEA_GREEN = RGB.new(0.125490196078431, 0.698039215686274, 0.666666666666667)
522
+ # Light Sky Blue: #87CEFA
523
+ LIGHT_SKY_BLUE = RGB.new(0.529411764705882, 0.807843137254902, 0.980392156862745)
524
+ # Light Slate Gray: #778899
525
+ LIGHT_SLATE_GRAY = RGB.new(0.466666666666667, 0.533333333333333, 0.6)
526
+ # Light Steel Blue: #B0C4DE
527
+ LIGHT_STEEL_BLUE = RGB.new(0.690196078431373, 0.768627450980392, 0.870588235294118)
528
+ # Light Yellow: #FFFFE0
529
+ LIGHT_YELLOW = RGB.new(1.0, 1.0, 0.87843137254902)
530
+ # Lime: #00FF00
531
+ LIME = RGB.new(0.0, 1.0, 0.0)
532
+ # Lime Green: #32CD32
533
+ LIME_GREEN = RGB.new(0.196078431372549, 0.803921568627451, 0.196078431372549)
534
+ # Linen: #FAF0E6
535
+ LINEN = RGB.new(0.980392156862745, 0.941176470588235, 0.901960784313726)
536
+ # Magenta: #FF00FF
537
+ MAGENTA = RGB.new(1.0, 0.0, 1.0)
538
+ # Medium Aquamarine: #66CDAA
539
+ MEDIUM_AQUAMARINE = RGB.new(0.4, 0.803921568627451, 0.666666666666667)
540
+ # Medium Blue: #0000CD
541
+ MEDIUM_BLUE = RGB.new(0.0, 0.0, 0.803921568627451)
542
+ # Medium Orchid: #BA55D3
543
+ MEDIUM_ORCHID = RGB.new(0.729411764705882, 0.333333333333333, 0.827450980392157)
544
+ # Medium Purple: #9370DB
545
+ MEDIUM_PURPLE = RGB.new(0.576470588235294, 0.43921568627451, 0.858823529411765)
546
+ # Medium Sea Green: #3CB371
547
+ MEDIUM_SEA_GREEN = RGB.new(0.235294117647059, 0.701960784313725, 0.443137254901961)
548
+ # Medium Slate Blue: #7B68EE
549
+ MEDIUM_SLATE_BLUE = RGB.new(0.482352941176471, 0.407843137254902, 0.933333333333333)
550
+ # Medium Spring Green: #00FA9A
551
+ MEDIUM_SPRING_GREEN = RGB.new(0.0, 0.980392156862745, 0.603921568627451)
552
+ # Medium Turquoise: #48D1CC
553
+ MEDIUM_TURQUOISE = RGB.new(0.282352941176471, 0.819607843137255, 0.8)
554
+ # Medium Violet Red: #C71585
555
+ MEDIUM_VIOLET_RED = RGB.new(0.780392156862745, 0.0823529411764706, 0.52156862745098)
556
+ # Midnight Blue: #191970
557
+ MIDNIGHT_BLUE = RGB.new(0.0980392156862745, 0.0980392156862745, 0.43921568627451)
558
+ # Mint Cream: #F5FFFA
559
+ MINT_CREAM = RGB.new(0.96078431372549, 1.0, 0.980392156862745)
560
+ # Misty Rose: #FFE4E1
561
+ MISTY_ROSE = RGB.new(1.0, 0.894117647058824, 0.882352941176471)
562
+ # Moccasin: #FFE4B5
563
+ MOCCASIN = RGB.new(1.0, 0.894117647058824, 0.709803921568627)
564
+ # Navajo White: #FFDEAD
565
+ NAVAJO_WHITE = RGB.new(1.0, 0.870588235294118, 0.67843137254902)
566
+ # Old Lace: #FDF5E6
567
+ OLD_LACE = RGB.new(0.992156862745098, 0.96078431372549, 0.901960784313726)
568
+ # Olive: #808000
569
+ OLIVE = RGB.new(0.501960784313725, 0.501960784313725, 0.0)
570
+ # Olive Drab: #6B8E23
571
+ OLIVE_DRAB = RGB.new(0.419607843137255, 0.556862745098039, 0.137254901960784)
572
+ # Orange: #FFA500
573
+ ORANGE = RGB.new(1.0, 0.647058823529412, 0.0)
574
+ # Orange Red: #FF4500
575
+ ORANGE_RED = RGB.new(1.0, 0.270588235294118, 0.0)
576
+ # Orchid: #DA70D6
577
+ ORCHID = RGB.new(0.854901960784314, 0.43921568627451, 0.83921568627451)
578
+ # Pale Goldenrod: #EEE8AA
579
+ PALE_GOLDENROD = RGB.new(0.933333333333333, 0.909803921568627, 0.666666666666667)
580
+ # Pale Green: #98FB98
581
+ PALE_GREEN = RGB.new(0.596078431372549, 0.984313725490196, 0.596078431372549)
582
+ # Pale Turquoise: #AFEEEE
583
+ PALE_TURQUOISE = RGB.new(0.686274509803922, 0.933333333333333, 0.933333333333333)
584
+ # Pale Violet Red: #DB7093
585
+ PALE_VIOLET_RED = RGB.new(0.858823529411765, 0.43921568627451, 0.576470588235294)
586
+ # Papaya Whip: #FFEFD5
587
+ PAPAYA_WHIP = RGB.new(1.0, 0.937254901960784, 0.835294117647059)
588
+ # Peach Puff: #FFDAB9
589
+ PEACH_PUFF = RGB.new(1.0, 0.854901960784314, 0.725490196078431)
590
+ # Peru: #CD853F
591
+ PERU = RGB.new(0.803921568627451, 0.52156862745098, 0.247058823529412)
592
+ # Pink: #FFC0CB
593
+ PINK = RGB.new(1.0, 0.752941176470588, 0.796078431372549)
594
+ # Plum: #DDA0DD
595
+ PLUM = RGB.new(0.866666666666667, 0.627450980392157, 0.866666666666667)
596
+ # Powder Blue: #B0E0E6
597
+ POWDER_BLUE = RGB.new(0.690196078431373, 0.87843137254902, 0.901960784313726)
598
+ # Red: #FF0000
599
+ RED = RGB.new(1.0, 0.0, 0.0)
600
+ # Rosy Brown: #BC8F8F
601
+ ROSY_BROWN = RGB.new(0.737254901960784, 0.56078431372549, 0.56078431372549)
602
+ # Royal Blue: #4169E1
603
+ ROYAL_BLUE = RGB.new(0.254901960784314, 0.411764705882353, 0.882352941176471)
604
+ # Saddle Brown: #8B4513
605
+ SADDLE_BROWN = RGB.new(0.545098039215686, 0.270588235294118, 0.0745098039215686)
606
+ # Salmon: #FA8072
607
+ SALMON = RGB.new(0.980392156862745, 0.501960784313725, 0.447058823529412)
608
+ # Sandy Brown: #F4A460
609
+ SANDY_BROWN = RGB.new(0.956862745098039, 0.643137254901961, 0.376470588235294)
610
+ # Sea Green: #2E8B57
611
+ SEA_GREEN = RGB.new(0.180392156862745, 0.545098039215686, 0.341176470588235)
612
+ # Seashell: #FFF5EE
613
+ SEASHELL = RGB.new(1.0, 0.96078431372549, 0.933333333333333)
614
+ # Sienna: #A0522D
615
+ SIENNA = RGB.new(0.627450980392157, 0.32156862745098, 0.176470588235294)
616
+ # Silver: #C0C0C0
617
+ SILVER = RGB.new(0.752941176470588, 0.752941176470588, 0.752941176470588)
618
+ # Sky Blue: #87CEEB
619
+ SKY_BLUE = RGB.new(0.529411764705882, 0.807843137254902, 0.92156862745098)
620
+ # Slate Blue: #6A5ACD
621
+ SLATE_BLUE = RGB.new(0.415686274509804, 0.352941176470588, 0.803921568627451)
622
+ # Slate Gray: #708090
623
+ SLATE_GRAY = RGB.new(0.43921568627451, 0.501960784313725, 0.564705882352941)
624
+ # Snow: #FFFAFA
625
+ SNOW = RGB.new(1.0, 0.980392156862745, 0.980392156862745)
626
+ # Spring Green: #00FF7F
627
+ SPRING_GREEN = RGB.new(0.0, 1.0, 0.498039215686275)
628
+ # Steel Blue: #4682B4
629
+ STEEL_BLUE = RGB.new(0.274509803921569, 0.509803921568627, 0.705882352941177)
630
+ # Tan: #D2B48C
631
+ TAN = RGB.new(0.823529411764706, 0.705882352941177, 0.549019607843137)
632
+ # Teal: #008080
633
+ TEAL = RGB.new(0.0, 0.501960784313725, 0.501960784313725)
634
+ # Thistle: #D8BFD8
635
+ THISTLE = RGB.new(0.847058823529412, 0.749019607843137, 0.847058823529412)
636
+ # Tomato: #FF6347
637
+ TOMATO = RGB.new(1.0, 0.388235294117647, 0.27843137254902)
638
+ # Turquoise: #40E0D0
639
+ TURQUOISE = RGB.new(0.250980392156863, 0.87843137254902, 0.815686274509804)
640
+ # Violet: #EE82EE
641
+ VIOLET = RGB.new(0.933333333333333, 0.509803921568627, 0.933333333333333)
642
+ # Wheat: #F5DEB3
643
+ WHEAT = RGB.new(0.96078431372549, 0.870588235294118, 0.701960784313725)
644
+ # White: #FFFFFF
645
+ WHITE = RGB.new(1.0, 1.0, 1.0)
646
+ # White Smoke: #F5F5F5
647
+ WHITE_SMOKE = RGB.new(0.96078431372549, 0.96078431372549, 0.96078431372549)
648
+ # Yellow: #FFFF00
649
+ YELLOW = RGB.new(1.0, 1.0, 0.0)
650
+ # Yellow Green: #9ACD32
651
+ YELLOW_GREEN = RGB.new(0.603921568627451, 0.803921568627451, 0.196078431372549)
652
+ end
653
+ include X11
654
+
655
+ end
656
+ end