rubygoo 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,73 +1,75 @@
1
- class CheckBox < Widget
2
- attr_accessor :checked
3
- can_fire :checked
4
- def initialize(opts={})
5
- super opts
6
- end
7
-
8
- def added()
9
- @checked = false
10
- @color = theme_property :color
11
- @bg_color = theme_property :bg_color
12
- @border_color = theme_property :border_color
13
- @focus_color = theme_property :focus_color
14
- @checked_color = theme_property :checked_color
1
+ module Rubygoo
2
+ class CheckBox < Widget
3
+ attr_accessor :checked
4
+ can_fire :checked
5
+ def initialize(opts={})
6
+ super opts
7
+ end
15
8
 
16
- @rect = Rect.new [@x-@x_pad,@y-@y_pad,@w+2*@x_pad,@h+2*@y_pad]
17
- end
9
+ def added()
10
+ @checked = false
11
+ @color = theme_property :color
12
+ @bg_color = theme_property :bg_color
13
+ @border_color = theme_property :border_color
14
+ @focus_color = theme_property :focus_color
15
+ @checked_color = theme_property :checked_color
18
16
 
19
- def checked?()
20
- @checked
21
- end
17
+ @rect = Rect.new [@x-@x_pad,@y-@y_pad,@w+2*@x_pad,@h+2*@y_pad]
18
+ end
22
19
 
23
- def toggle()
24
- if checked?
25
- uncheck
26
- else
27
- check
20
+ def checked?()
21
+ @checked
28
22
  end
29
- end
30
23
 
31
- def check()
32
- @checked = true
33
- fire :checked
34
- end
24
+ def toggle()
25
+ if checked?
26
+ uncheck
27
+ else
28
+ check
29
+ end
30
+ end
35
31
 
36
- def uncheck()
37
- @checked = false
38
- fire :checked
39
- end
32
+ def check()
33
+ @checked = true
34
+ fire :checked
35
+ end
40
36
 
41
- # called when there is a mouse click
42
- def mouse_up(event)
43
- toggle
44
- end
37
+ def uncheck()
38
+ @checked = false
39
+ fire :checked
40
+ end
45
41
 
46
- # called when a key press is sent to us
47
- def key_pressed(event)
48
- case event.data[:key]
49
- when K_SPACE
42
+ # called when there is a mouse click
43
+ def mouse_up(event)
50
44
  toggle
51
45
  end
52
- end
53
46
 
54
- def draw(screen)
55
- if @focussed
56
- screen.fill @focus_color, @rect
57
- elsif @bg_color
58
- screen.fill @bg_color, @rect
47
+ # called when a key press is sent to us
48
+ def key_pressed(event)
49
+ case event.data[:key]
50
+ when K_SPACE
51
+ toggle
52
+ end
59
53
  end
60
54
 
61
- if @checked
62
- screen.fill @checked_color, @rect.inflate(-@x_pad,-@y_pad)
63
- end
55
+ def draw(screen)
56
+ if @focussed
57
+ screen.fill @focus_color, @rect
58
+ elsif @bg_color
59
+ screen.fill @bg_color, @rect
60
+ end
61
+
62
+ if @checked
63
+ screen.fill @checked_color, @rect.inflate(-@x_pad,-@y_pad)
64
+ end
64
65
 
65
- if @border_color
66
- x1 = @rect[0]
67
- y1 = @rect[1]
68
- x2 = @rect[2] + x1
69
- y2 = @rect[3] + y1
70
- screen.draw_box x1, y1, x2, y2, @border_color
66
+ if @border_color
67
+ x1 = @rect[0]
68
+ y1 = @rect[1]
69
+ x2 = @rect[2] + x1
70
+ y2 = @rect[3] + y1
71
+ screen.draw_box x1, y1, x2, y2, @border_color
72
+ end
71
73
  end
72
74
  end
73
75
  end
@@ -1,129 +1,139 @@
1
- class Container < Widget
2
-
3
- attr_accessor :widgets, :bg_color, :rect
4
-
5
- def initialize(opts={})
6
- super opts
7
- # cannot get this if we don't have an app yet
8
- @bg_color = theme_property :bg_color if self.app
9
- @queued_widgets = []
10
- @widgets = []
11
- @modal_widgets = []
12
- end
1
+ module Rubygoo
2
+ class Container < Widget
3
+
4
+ attr_accessor :widgets, :bg_color, :rect
5
+
6
+ def initialize(opts={})
7
+ super opts
8
+ # cannot get this if we don't have an app yet
9
+ @bg_color = theme_property :bg_color if self.app
10
+ @queued_widgets = []
11
+ @widgets = []
12
+ @modal_widgets = []
13
+ end
13
14
 
14
- # called when we are added to another container
15
- def added()
16
- add *@queued_widgets
17
- @queued_widgets = []
18
- end
15
+ # called when we are added to another container
16
+ def added()
17
+ add *@queued_widgets
18
+ @queued_widgets = []
19
+ end
19
20
 
20
- def add_modal(widget)
21
- @modal_widgets << widget
22
- add widget
23
- end
21
+ def add_modal(widget)
22
+ @modal_widgets << widget
23
+ add widget
24
+ end
24
25
 
25
- # Add widget(s) to the container.
26
- def add(*widgets)
27
- widgets.uniq.each do |w|
28
- unless @widgets.include? w
29
- if self.app
30
- w.container = self
31
- w.parent = self
32
- w.app = self.app
33
- w.app.add_tabbed_widget w
34
- w.added
35
- @widgets << w
36
- else
37
- @queued_widgets << w
26
+ # Add widget(s) to the container.
27
+ def add(*widgets)
28
+ widgets.uniq.each do |w|
29
+ unless @widgets.include? w
30
+ if self.app
31
+ w.container = self
32
+ w.parent = self
33
+ w.app = self.app
34
+ w.app.add_tabbed_widget w
35
+ w.added
36
+ @widgets << w
37
+ else
38
+ @queued_widgets << w
39
+ end
38
40
  end
39
41
  end
42
+ widgets
40
43
  end
41
- widgets
42
- end
43
44
 
44
- # Remove widget(s) to the container.
45
- def remove(*widgets)
46
- widgets.uniq.each do |w|
47
- widget = @widgets.delete(w)
48
- queued_widget = @queued_widgets.delete(w)
49
- modal_widget = @modal_widgets.delete(w)
50
- if widget or queued_widget or modal_widget
51
- w.removed
45
+ # Remove widget(s) to the container.
46
+ def remove(*widgets)
47
+ widgets.uniq.each do |w|
48
+ widget = @widgets.delete(w)
49
+ queued_widget = @queued_widgets.delete(w)
50
+ modal_widget = @modal_widgets.delete(w)
51
+ if widget or queued_widget or modal_widget
52
+ w.removed
53
+ end
52
54
  end
53
55
  end
54
- end
55
56
 
56
- # draw ourself and our children
57
- def draw(screen)
58
- # any container specific code here (border_colors?)
59
- if @bg_color
60
- if app == self
61
- screen.fill @bg_color
62
- else
63
- screen.fill @bg_color, @rect
57
+ # draw ourself and our children
58
+ def draw(screen)
59
+ # any container specific code here (border_colors?)
60
+ if @bg_color
61
+ if app == self
62
+ screen.fill @bg_color
63
+ else
64
+ screen.fill @bg_color, @rect
65
+ end
66
+ end
67
+
68
+ # draw kiddies
69
+ @widgets.each do |w|
70
+ w.draw screen
64
71
  end
65
72
  end
66
73
 
67
- # draw kiddies
68
- @widgets.each do |w|
69
- w.draw screen
74
+ # called when there is a mouse motion
75
+ def mouse_motion(event)
76
+ @widgets.each do |w|
77
+ w.mouse_motion event #if w.contains? [event.data[:x],event.data[:y]]
78
+ end
70
79
  end
71
- end
72
80
 
73
- # called when there is a mouse motion
74
- def mouse_motion(event)
75
- @widgets.each do |w|
76
- w.mouse_motion event if w.contains? [event.data[:x],event.data[:y]]
81
+ # called when there is a mouse click
82
+ def mouse_down(event)
83
+ @widgets.each do |w|
84
+ w.mouse_down event if w.contains? [event.data[:x],event.data[:y]]
85
+ end
77
86
  end
78
- end
79
87
 
80
- # called when there is a mouse click
81
- def mouse_down(event)
82
- @widgets.each do |w|
83
- w.mouse_down event if w.contains? [event.data[:x],event.data[:y]]
88
+ # called when there is a mouse release
89
+ def mouse_up(event)
90
+ @widgets.each do |w|
91
+ w.mouse_up event if w.contains? [event.data[:x],event.data[:y]]
92
+ end
84
93
  end
85
- end
86
94
 
87
- # called when there is a mouse release
88
- def mouse_up(event)
89
- @widgets.each do |w|
90
- w.mouse_up event if w.contains? [event.data[:x],event.data[:y]]
95
+ # pass on the key press to our widgets
96
+ def key_pressed(event)
97
+ @widgets.each do |w|
98
+ w.key_pressed event if w.focussed?
99
+ end
91
100
  end
92
- end
93
101
 
94
- # pass on the key press to our widgets
95
- def key_pressed(event)
96
- @widgets.each do |w|
97
- w.key_pressed event if w.focussed?
102
+ # pass on the key release to our widgets
103
+ def key_released(event)
104
+ @widgets.each do |w|
105
+ w.key_released event if w.focussed?
106
+ end
98
107
  end
99
- end
100
108
 
101
- # pass on the key release to our widgets
102
- def key_released(event)
103
- @widgets.each do |w|
104
- w.key_released event if w.focussed?
109
+ # distribute our mouse events to our modals first
110
+ def modal_mouse_call(meth, event)
111
+ if @modal_widgets.empty?
112
+ @widgets.each do |w|
113
+ w.send meth, event if w.contains? [event.data[:x],event.data[:y]]
114
+ end
115
+ else
116
+ @modal_widgets.last.send meth, event
117
+ end
105
118
  end
106
- end
107
119
 
108
- # distribute our mouse events to our modals first
109
- def modal_mouse_call(meth, event)
110
- if @modal_widgets.empty?
111
- @widgets.each do |w|
112
- w.send meth, event if w.contains? [event.data[:x],event.data[:y]]
120
+ # distribute our keyboard events to our modals first
121
+ def modal_keyboard_call(meth, event)
122
+ if @modal_widgets.empty?
123
+ @widgets.each do |w|
124
+ w.send meth, event if w.focussed?
125
+ end
126
+ else
127
+ @modal_widgets.last.send meth, event
113
128
  end
114
- else
115
- @modal_widgets.last.send meth, event
116
129
  end
117
- end
118
130
 
119
- # distribute our keyboard events to our modals first
120
- def modal_keyboard_call(meth, event)
121
- if @modal_widgets.empty?
131
+ # called each update cycle with the amount of time that has passed. useful
132
+ # for animations, etc
133
+ def update(time)
122
134
  @widgets.each do |w|
123
- w.send meth, event if w.focussed?
135
+ w.update time
124
136
  end
125
- else
126
- @modal_widgets.last.send meth, event
127
137
  end
128
138
  end
129
139
  end
@@ -1,151 +1,153 @@
1
1
 
2
- # colors from: http://www.w3schools.com/css/css_colornames.asp
3
- CSS_COLORS = {
4
- :AliceBlue => [240,248,255,255],
5
- :AntiqueWhite => [250,235,215,255],
6
- :Aqua => [0,255,255,255],
7
- :Aquamarine => [127,255,212,255],
8
- :Azure => [240,255,255,255],
9
- :Beige => [245,245,220,255],
10
- :Bisque => [255,228,196,255],
11
- :Black => [0,0,0,255],
12
- :BlanchedAlmond => [255,235,205,255],
13
- :Blue => [0,0,255,255],
14
- :BlueViolet => [138,43,226,255],
15
- :Brown => [165,42,42,255],
16
- :BurlyWood => [222,184,135,255],
17
- :CadetBlue => [95,158,160,255],
18
- :Chartreuse => [127,255,0,255],
19
- :Chocolate => [210,105,30,255],
20
- :Coral => [255,127,80,255],
21
- :CornflowerBlue => [100,149,237,255],
22
- :Cornsilk => [255,248,220,255],
23
- :Crimson => [237,164,61,255],
24
- :Cyan => [0,255,255,255],
25
- :DarkBlue => [0,0,139,255],
26
- :DarkCyan => [0,139,139,255],
27
- :DarkGoldenRod => [184,134,11,255],
28
- :DarkGray => [169,169,169,255],
29
- :DarkGrey => [169,169,169,255],
30
- :DarkGreen => [0,100,0,255],
31
- :DarkKhaki => [189,183,107,255],
32
- :DarkMagenta => [139,0,139,255],
33
- :DarkOliveGreen => [85,107,47,255],
34
- :Darkorange => [255,140,0,255],
35
- :DarkOrchid => [153,50,204,255],
36
- :DarkRed => [139,0,0,255],
37
- :DarkSalmon => [233,150,122,255],
38
- :DarkSeaGreen => [143,188,143,255],
39
- :DarkSlateBlue => [72,61,139,255],
40
- :DarkSlateGray => [47,79,79,255],
41
- :DarkSlateGrey => [47,79,79,255],
42
- :DarkTurquoise => [0,206,209,255],
43
- :DarkViolet => [148,0,211,255],
44
- :DeepPink => [255,20,147,255],
45
- :DeepSkyBlue => [0,191,255,255],
46
- :DimGray => [105,105,105,255],
47
- :DimGrey => [105,105,105,255],
48
- :DodgerBlue => [30,144,255,255],
49
- :FireBrick => [178,34,34,255],
50
- :FloralWhite => [255,250,240,255],
51
- :ForestGreen => [34,139,34,255],
52
- :Fuchsia => [255,0,255,255],
53
- :Gainsboro => [220,220,220,255],
54
- :GhostWhite => [248,248,255,255],
55
- :Gold => [255,215,0,255],
56
- :GoldenRod => [218,165,32,255],
57
- :Gray => [128,128,128,255],
58
- :Grey => [128,128,128,255],
59
- :Green => [0,128,0,255],
60
- :GreenYellow => [173,255,47,255],
61
- :HoneyDew => [240,255,240,255],
62
- :HotPink => [255,105,180,255],
63
- :IndianRed => [205,92,92,255],
64
- :Indigo => [75,0,130,255],
65
- :Ivory => [255,255,240,255],
66
- :Khaki => [240,230,140,255],
67
- :Lavender => [230,230,250,255],
68
- :LavenderBlush => [255,240,245,255],
69
- :LawnGreen => [124,252,0,255],
70
- :LemonChiffon => [255,250,205,255],
71
- :LightBlue => [173,216,230,255],
72
- :LightCoral => [240,128,128,255],
73
- :LightCyan => [224,255,255,255],
74
- :LightGoldenRodYellow => [250,250,210,255],
75
- :LightGray => [211,211,211,255],
76
- :LightGrey => [211,211,211,255],
77
- :LightGreen => [144,238,144,255],
78
- :LightPink => [255,182,193,255],
79
- :LightSalmon => [255,160,122,255],
80
- :LightSeaGreen => [32,178,170,255],
81
- :LightSkyBlue => [135,206,250,255],
82
- :LightSlateGray => [119,136,153,255],
83
- :LightSlateGrey => [119,136,153,255],
84
- :LightSteelBlue => [176,196,222,255],
85
- :LightYellow => [255,255,224,255],
86
- :Lime => [0,255,0,255],
87
- :LimeGreen => [50,205,50,255],
88
- :Linen => [250,240,230,255],
89
- :Magenta => [255,0,255,255],
90
- :Maroon => [128,0,0,255],
91
- :MediumAquaMarine => [102,205,170,255],
92
- :MediumBlue => [0,0,205,255],
93
- :MediumOrchid => [186,85,211,255],
94
- :MediumPurple => [147,112,219,255],
95
- :MediumSeaGreen => [60,179,113,255],
96
- :MediumSlateBlue => [123,104,238,255],
97
- :MediumSpringGreen => [0,250,154,255],
98
- :MediumTurquoise => [72,209,204,255],
99
- :MediumVioletRed => [199,21,133,255],
100
- :MidnightBlue => [25,25,112,255],
101
- :MintCream => [245,255,250,255],
102
- :MistyRose => [255,228,225,255],
103
- :Moccasin => [255,228,181,255],
104
- :NavajoWhite => [255,222,173,255],
105
- :Navy => [0,0,128,255],
106
- :OldLace => [253,245,230,255],
107
- :Olive => [128,128,0,255],
108
- :OliveDrab => [107,142,35,255],
109
- :Orange => [255,165,0,255],
110
- :OrangeRed => [255,69,0,255],
111
- :Orchid => [218,112,214,255],
112
- :PaleGoldenRod => [238,232,170,255],
113
- :PaleGreen => [152,251,152,255],
114
- :PaleTurquoise => [175,238,238,255],
115
- :PaleVioletRed => [219,112,147,255],
116
- :PapayaWhip => [255,239,213,255],
117
- :PeachPuff => [255,218,185,255],
118
- :Peru => [205,133,63,255],
119
- :Pink => [255,192,203,255],
120
- :Plum => [221,160,221,255],
121
- :PowderBlue => [176,224,230,255],
122
- :Purple => [128,0,128,255],
123
- :Red => [255,0,0,255],
124
- :RosyBrown => [188,143,143],
125
- :RoyalBlue => [65,105,225,255],
126
- :SaddleBrown => [139,69,19,255],
127
- :Salmon => [250,128,114,255],
128
- :SandyBrown => [244,164,96,255],
129
- :SeaGreen => [46,139,87,255],
130
- :SeaShell => [255,245,238,255],
131
- :Sienna => [160,82,45,255],
132
- :Silver => [192,192,192,255],
133
- :SkyBlue => [135,206,235,255],
134
- :SlateBlue => [106,90,205,255],
135
- :SlateGray => [112,128,144,255],
136
- :SlateGrey => [112,128,144,255],
137
- :Snow => [255,250,250,255],
138
- :SpringGreen => [0,255,127,255],
139
- :SteelBlue => [70,130,180,255],
140
- :Tan => [210,180,140,255],
141
- :Teal => [0,128,128,255],
142
- :Thistle => [216,191,216,255],
143
- :Tomato => [255,99,71,255],
144
- :Turquoise => [64,224,208,255],
145
- :Violet => [238,130,238,255],
146
- :Wheat => [245,222,179,255],
147
- :White => [255,255,255,255],
148
- :WhiteSmoke => [245,245,245,255],
149
- :Yellow => [255,255,0],
150
- :YellowGreen => [154,205,50,255]
151
- }
2
+ module Rubygoo
3
+ # colors from: http://www.w3schools.com/css/css_colornames.asp
4
+ CSS_COLORS = {
5
+ :AliceBlue => [240,248,255,255],
6
+ :AntiqueWhite => [250,235,215,255],
7
+ :Aqua => [0,255,255,255],
8
+ :Aquamarine => [127,255,212,255],
9
+ :Azure => [240,255,255,255],
10
+ :Beige => [245,245,220,255],
11
+ :Bisque => [255,228,196,255],
12
+ :Black => [0,0,0,255],
13
+ :BlanchedAlmond => [255,235,205,255],
14
+ :Blue => [0,0,255,255],
15
+ :BlueViolet => [138,43,226,255],
16
+ :Brown => [165,42,42,255],
17
+ :BurlyWood => [222,184,135,255],
18
+ :CadetBlue => [95,158,160,255],
19
+ :Chartreuse => [127,255,0,255],
20
+ :Chocolate => [210,105,30,255],
21
+ :Coral => [255,127,80,255],
22
+ :CornflowerBlue => [100,149,237,255],
23
+ :Cornsilk => [255,248,220,255],
24
+ :Crimson => [237,164,61,255],
25
+ :Cyan => [0,255,255,255],
26
+ :DarkBlue => [0,0,139,255],
27
+ :DarkCyan => [0,139,139,255],
28
+ :DarkGoldenRod => [184,134,11,255],
29
+ :DarkGray => [169,169,169,255],
30
+ :DarkGrey => [169,169,169,255],
31
+ :DarkGreen => [0,100,0,255],
32
+ :DarkKhaki => [189,183,107,255],
33
+ :DarkMagenta => [139,0,139,255],
34
+ :DarkOliveGreen => [85,107,47,255],
35
+ :Darkorange => [255,140,0,255],
36
+ :DarkOrchid => [153,50,204,255],
37
+ :DarkRed => [139,0,0,255],
38
+ :DarkSalmon => [233,150,122,255],
39
+ :DarkSeaGreen => [143,188,143,255],
40
+ :DarkSlateBlue => [72,61,139,255],
41
+ :DarkSlateGray => [47,79,79,255],
42
+ :DarkSlateGrey => [47,79,79,255],
43
+ :DarkTurquoise => [0,206,209,255],
44
+ :DarkViolet => [148,0,211,255],
45
+ :DeepPink => [255,20,147,255],
46
+ :DeepSkyBlue => [0,191,255,255],
47
+ :DimGray => [105,105,105,255],
48
+ :DimGrey => [105,105,105,255],
49
+ :DodgerBlue => [30,144,255,255],
50
+ :FireBrick => [178,34,34,255],
51
+ :FloralWhite => [255,250,240,255],
52
+ :ForestGreen => [34,139,34,255],
53
+ :Fuchsia => [255,0,255,255],
54
+ :Gainsboro => [220,220,220,255],
55
+ :GhostWhite => [248,248,255,255],
56
+ :Gold => [255,215,0,255],
57
+ :GoldenRod => [218,165,32,255],
58
+ :Gray => [128,128,128,255],
59
+ :Grey => [128,128,128,255],
60
+ :Green => [0,128,0,255],
61
+ :GreenYellow => [173,255,47,255],
62
+ :HoneyDew => [240,255,240,255],
63
+ :HotPink => [255,105,180,255],
64
+ :IndianRed => [205,92,92,255],
65
+ :Indigo => [75,0,130,255],
66
+ :Ivory => [255,255,240,255],
67
+ :Khaki => [240,230,140,255],
68
+ :Lavender => [230,230,250,255],
69
+ :LavenderBlush => [255,240,245,255],
70
+ :LawnGreen => [124,252,0,255],
71
+ :LemonChiffon => [255,250,205,255],
72
+ :LightBlue => [173,216,230,255],
73
+ :LightCoral => [240,128,128,255],
74
+ :LightCyan => [224,255,255,255],
75
+ :LightGoldenRodYellow => [250,250,210,255],
76
+ :LightGray => [211,211,211,255],
77
+ :LightGrey => [211,211,211,255],
78
+ :LightGreen => [144,238,144,255],
79
+ :LightPink => [255,182,193,255],
80
+ :LightSalmon => [255,160,122,255],
81
+ :LightSeaGreen => [32,178,170,255],
82
+ :LightSkyBlue => [135,206,250,255],
83
+ :LightSlateGray => [119,136,153,255],
84
+ :LightSlateGrey => [119,136,153,255],
85
+ :LightSteelBlue => [176,196,222,255],
86
+ :LightYellow => [255,255,224,255],
87
+ :Lime => [0,255,0,255],
88
+ :LimeGreen => [50,205,50,255],
89
+ :Linen => [250,240,230,255],
90
+ :Magenta => [255,0,255,255],
91
+ :Maroon => [128,0,0,255],
92
+ :MediumAquaMarine => [102,205,170,255],
93
+ :MediumBlue => [0,0,205,255],
94
+ :MediumOrchid => [186,85,211,255],
95
+ :MediumPurple => [147,112,219,255],
96
+ :MediumSeaGreen => [60,179,113,255],
97
+ :MediumSlateBlue => [123,104,238,255],
98
+ :MediumSpringGreen => [0,250,154,255],
99
+ :MediumTurquoise => [72,209,204,255],
100
+ :MediumVioletRed => [199,21,133,255],
101
+ :MidnightBlue => [25,25,112,255],
102
+ :MintCream => [245,255,250,255],
103
+ :MistyRose => [255,228,225,255],
104
+ :Moccasin => [255,228,181,255],
105
+ :NavajoWhite => [255,222,173,255],
106
+ :Navy => [0,0,128,255],
107
+ :OldLace => [253,245,230,255],
108
+ :Olive => [128,128,0,255],
109
+ :OliveDrab => [107,142,35,255],
110
+ :Orange => [255,165,0,255],
111
+ :OrangeRed => [255,69,0,255],
112
+ :Orchid => [218,112,214,255],
113
+ :PaleGoldenRod => [238,232,170,255],
114
+ :PaleGreen => [152,251,152,255],
115
+ :PaleTurquoise => [175,238,238,255],
116
+ :PaleVioletRed => [219,112,147,255],
117
+ :PapayaWhip => [255,239,213,255],
118
+ :PeachPuff => [255,218,185,255],
119
+ :Peru => [205,133,63,255],
120
+ :Pink => [255,192,203,255],
121
+ :Plum => [221,160,221,255],
122
+ :PowderBlue => [176,224,230,255],
123
+ :Purple => [128,0,128,255],
124
+ :Red => [255,0,0,255],
125
+ :RosyBrown => [188,143,143],
126
+ :RoyalBlue => [65,105,225,255],
127
+ :SaddleBrown => [139,69,19,255],
128
+ :Salmon => [250,128,114,255],
129
+ :SandyBrown => [244,164,96,255],
130
+ :SeaGreen => [46,139,87,255],
131
+ :SeaShell => [255,245,238,255],
132
+ :Sienna => [160,82,45,255],
133
+ :Silver => [192,192,192,255],
134
+ :SkyBlue => [135,206,235,255],
135
+ :SlateBlue => [106,90,205,255],
136
+ :SlateGray => [112,128,144,255],
137
+ :SlateGrey => [112,128,144,255],
138
+ :Snow => [255,250,250,255],
139
+ :SpringGreen => [0,255,127,255],
140
+ :SteelBlue => [70,130,180,255],
141
+ :Tan => [210,180,140,255],
142
+ :Teal => [0,128,128,255],
143
+ :Thistle => [216,191,216,255],
144
+ :Tomato => [255,99,71,255],
145
+ :Turquoise => [64,224,208,255],
146
+ :Violet => [238,130,238,255],
147
+ :Wheat => [245,222,179,255],
148
+ :White => [255,255,255,255],
149
+ :WhiteSmoke => [245,245,245,255],
150
+ :Yellow => [255,255,0],
151
+ :YellowGreen => [154,205,50,255]
152
+ }
153
+ end