8 gi.require_version('Rsvg', '2.0')
9 from gi.repository import Rsvg
14 # Some convenience things for the program to use
18 OUTPUT_DIR_PREFIX='/srv/cworth.org/zombocom'
19 OUTPUT_DIR="{}/busart".format(OUTPUT_DIR_PREFIX)
21 input = sys.stdin.read()
23 # Do at least a modicum of a safety check
25 sys.stderr.write("Error: Cowardly refusing to interpret script with 'import'")
28 (fd, filename) = tempfile.mkstemp(suffix=".svg", prefix="busart", dir=OUTPUT_DIR);
30 os.chmod(filename, 0o644)
33 sys.stderr.write("This script requires a single argument (value, 1 - 4)")
36 user = int(sys.argv[1])
39 # Also delete our import for some more safety
45 # Note: We'll let the following "safe" imports remain:
51 'alice blue': (0xf0/0xff, 0xf8/0xff, 0xff/0xff),
52 'aliceblue': (0xf0/0xff, 0xf8/0xff, 0xff/0xff),
53 'antique white': (0xfa/0xff, 0xeb/0xff, 0xd7/0xff),
54 'antiquewhite': (0xfa/0xff, 0xeb/0xff, 0xd7/0xff),
55 'antiquewhite1': (0xff/0xff, 0xef/0xff, 0xdb/0xff),
56 'antiquewhite2': (0xee/0xff, 0xdf/0xff, 0xcc/0xff),
57 'antiquewhite3': (0xcd/0xff, 0xc0/0xff, 0xb0/0xff),
58 'antiquewhite4': (0x8b/0xff, 0x83/0xff, 0x78/0xff),
59 'aquamarine': (0x7f/0xff, 0xff/0xff, 0xd4/0xff),
60 'aquamarine1': (0x7f/0xff, 0xff/0xff, 0xd4/0xff),
61 'aquamarine2': (0x76/0xff, 0xee/0xff, 0xc6/0xff),
62 'aquamarine3': (0x66/0xff, 0xcd/0xff, 0xaa/0xff),
63 'aquamarine4': (0x45/0xff, 0x8b/0xff, 0x74/0xff),
64 'azure': (0xf0/0xff, 0xff/0xff, 0xff/0xff),
65 'azure1': (0xf0/0xff, 0xff/0xff, 0xff/0xff),
66 'azure2': (0xe0/0xff, 0xee/0xff, 0xee/0xff),
67 'azure3': (0xc1/0xff, 0xcd/0xff, 0xcd/0xff),
68 'azure4': (0x83/0xff, 0x8b/0xff, 0x8b/0xff),
69 'beige': (0xf5/0xff, 0xf5/0xff, 0xdc/0xff),
70 'bisque': (0xff/0xff, 0xe4/0xff, 0xc4/0xff),
71 'bisque1': (0xff/0xff, 0xe4/0xff, 0xc4/0xff),
72 'bisque2': (0xee/0xff, 0xd5/0xff, 0xb7/0xff),
73 'bisque3': (0xcd/0xff, 0xb7/0xff, 0x9e/0xff),
74 'bisque4': (0x8b/0xff, 0x7d/0xff, 0x6b/0xff),
75 'black': (0x00/0xff, 0x00/0xff, 0x00/0xff),
76 'blanched almond': (0xff/0xff, 0xeb/0xff, 0xcd/0xff),
77 'blanchedalmond': (0xff/0xff, 0xeb/0xff, 0xcd/0xff),
78 'blue': (0x00/0xff, 0x00/0xff, 0xff/0xff),
79 'blue violet': (0x8a/0xff, 0x2b/0xff, 0xe2/0xff),
80 'blue1': (0x00/0xff, 0x00/0xff, 0xff/0xff),
81 'blue2': (0x00/0xff, 0x00/0xff, 0xee/0xff),
82 'blue3': (0x00/0xff, 0x00/0xff, 0xcd/0xff),
83 'blue4': (0x00/0xff, 0x00/0xff, 0x8b/0xff),
84 'blueviolet': (0x8a/0xff, 0x2b/0xff, 0xe2/0xff),
85 'brown': (0xa5/0xff, 0x2a/0xff, 0x2a/0xff),
86 'brown1': (0xff/0xff, 0x40/0xff, 0x40/0xff),
87 'brown2': (0xee/0xff, 0x3b/0xff, 0x3b/0xff),
88 'brown3': (0xcd/0xff, 0x33/0xff, 0x33/0xff),
89 'brown4': (0x8b/0xff, 0x23/0xff, 0x23/0xff),
90 'burlywood': (0xde/0xff, 0xb8/0xff, 0x87/0xff),
91 'burlywood1': (0xff/0xff, 0xd3/0xff, 0x9b/0xff),
92 'burlywood2': (0xee/0xff, 0xc5/0xff, 0x91/0xff),
93 'burlywood3': (0xcd/0xff, 0xaa/0xff, 0x7d/0xff),
94 'burlywood4': (0x8b/0xff, 0x73/0xff, 0x55/0xff),
95 'cadet blue': (0x5f/0xff, 0x9e/0xff, 0xa0/0xff),
96 'cadetblue': (0x5f/0xff, 0x9e/0xff, 0xa0/0xff),
97 'cadetblue1': (0x98/0xff, 0xf5/0xff, 0xff/0xff),
98 'cadetblue2': (0x8e/0xff, 0xe5/0xff, 0xee/0xff),
99 'cadetblue3': (0x7a/0xff, 0xc5/0xff, 0xcd/0xff),
100 'cadetblue4': (0x53/0xff, 0x86/0xff, 0x8b/0xff),
101 'chartreuse': (0x7f/0xff, 0xff/0xff, 0x00/0xff),
102 'chartreuse1': (0x7f/0xff, 0xff/0xff, 0x00/0xff),
103 'chartreuse2': (0x76/0xff, 0xee/0xff, 0x00/0xff),
104 'chartreuse3': (0x66/0xff, 0xcd/0xff, 0x00/0xff),
105 'chartreuse4': (0x45/0xff, 0x8b/0xff, 0x00/0xff),
106 'chocolate': (0xd2/0xff, 0x69/0xff, 0x1e/0xff),
107 'chocolate1': (0xff/0xff, 0x7f/0xff, 0x24/0xff),
108 'chocolate2': (0xee/0xff, 0x76/0xff, 0x21/0xff),
109 'chocolate3': (0xcd/0xff, 0x66/0xff, 0x1d/0xff),
110 'chocolate4': (0x8b/0xff, 0x45/0xff, 0x13/0xff),
111 'coral': (0xff/0xff, 0x7f/0xff, 0x50/0xff),
112 'coral1': (0xff/0xff, 0x72/0xff, 0x56/0xff),
113 'coral2': (0xee/0xff, 0x6a/0xff, 0x50/0xff),
114 'coral3': (0xcd/0xff, 0x5b/0xff, 0x45/0xff),
115 'coral4': (0x8b/0xff, 0x3e/0xff, 0x2f/0xff),
116 'cornflower blue': (0x64/0xff, 0x95/0xff, 0xed/0xff),
117 'cornflowerblue': (0x64/0xff, 0x95/0xff, 0xed/0xff),
118 'cornsilk': (0xff/0xff, 0xf8/0xff, 0xdc/0xff),
119 'cornsilk1': (0xff/0xff, 0xf8/0xff, 0xdc/0xff),
120 'cornsilk2': (0xee/0xff, 0xe8/0xff, 0xcd/0xff),
121 'cornsilk3': (0xcd/0xff, 0xc8/0xff, 0xb1/0xff),
122 'cornsilk4': (0x8b/0xff, 0x88/0xff, 0x78/0xff),
123 'cyan': (0x00/0xff, 0xff/0xff, 0xff/0xff),
124 'cyan1': (0x00/0xff, 0xff/0xff, 0xff/0xff),
125 'cyan2': (0x00/0xff, 0xee/0xff, 0xee/0xff),
126 'cyan3': (0x00/0xff, 0xcd/0xff, 0xcd/0xff),
127 'cyan4': (0x00/0xff, 0x8b/0xff, 0x8b/0xff),
128 'dark blue': (0x00/0xff, 0x00/0xff, 0x8b/0xff),
129 'dark cyan': (0x00/0xff, 0x8b/0xff, 0x8b/0xff),
130 'dark goldenrod': (0xb8/0xff, 0x86/0xff, 0x0b/0xff),
131 'dark gray': (0xa9/0xff, 0xa9/0xff, 0xa9/0xff),
132 'dark green': (0x00/0xff, 0x64/0xff, 0x00/0xff),
133 'dark grey': (0xa9/0xff, 0xa9/0xff, 0xa9/0xff),
134 'dark khaki': (0xbd/0xff, 0xb7/0xff, 0x6b/0xff),
135 'dark magenta': (0x8b/0xff, 0x00/0xff, 0x8b/0xff),
136 'dark olive green': (0x55/0xff, 0x6b/0xff, 0x2f/0xff),
137 'dark orange': (0xff/0xff, 0x8c/0xff, 0x00/0xff),
138 'dark orchid': (0x99/0xff, 0x32/0xff, 0xcc/0xff),
139 'dark red': (0x8b/0xff, 0x00/0xff, 0x00/0xff),
140 'dark salmon': (0xe9/0xff, 0x96/0xff, 0x7a/0xff),
141 'dark sea green': (0x8f/0xff, 0xbc/0xff, 0x8f/0xff),
142 'dark slate blue': (0x48/0xff, 0x3d/0xff, 0x8b/0xff),
143 'dark slate gray': (0x2f/0xff, 0x4f/0xff, 0x4f/0xff),
144 'dark slate grey': (0x2f/0xff, 0x4f/0xff, 0x4f/0xff),
145 'dark turquoise': (0x00/0xff, 0xce/0xff, 0xd1/0xff),
146 'dark violet': (0x94/0xff, 0x00/0xff, 0xd3/0xff),
147 'darkblue': (0x00/0xff, 0x00/0xff, 0x8b/0xff),
148 'darkcyan': (0x00/0xff, 0x8b/0xff, 0x8b/0xff),
149 'darkgoldenrod': (0xb8/0xff, 0x86/0xff, 0x0b/0xff),
150 'darkgoldenrod1': (0xff/0xff, 0xb9/0xff, 0x0f/0xff),
151 'darkgoldenrod2': (0xee/0xff, 0xad/0xff, 0x0e/0xff),
152 'darkgoldenrod3': (0xcd/0xff, 0x95/0xff, 0x0c/0xff),
153 'darkgoldenrod4': (0x8b/0xff, 0x65/0xff, 0x08/0xff),
154 'darkgray': (0xa9/0xff, 0xa9/0xff, 0xa9/0xff),
155 'darkgreen': (0x00/0xff, 0x64/0xff, 0x00/0xff),
156 'darkgrey': (0xa9/0xff, 0xa9/0xff, 0xa9/0xff),
157 'darkkhaki': (0xbd/0xff, 0xb7/0xff, 0x6b/0xff),
158 'darkmagenta': (0x8b/0xff, 0x00/0xff, 0x8b/0xff),
159 'darkolivegreen': (0x55/0xff, 0x6b/0xff, 0x2f/0xff),
160 'darkolivegreen1': (0xca/0xff, 0xff/0xff, 0x70/0xff),
161 'darkolivegreen2': (0xbc/0xff, 0xee/0xff, 0x68/0xff),
162 'darkolivegreen3': (0xa2/0xff, 0xcd/0xff, 0x5a/0xff),
163 'darkolivegreen4': (0x6e/0xff, 0x8b/0xff, 0x3d/0xff),
164 'darkorange': (0xff/0xff, 0x8c/0xff, 0x00/0xff),
165 'darkorange1': (0xff/0xff, 0x7f/0xff, 0x00/0xff),
166 'darkorange2': (0xee/0xff, 0x76/0xff, 0x00/0xff),
167 'darkorange3': (0xcd/0xff, 0x66/0xff, 0x00/0xff),
168 'darkorange4': (0x8b/0xff, 0x45/0xff, 0x00/0xff),
169 'darkorchid': (0x99/0xff, 0x32/0xff, 0xcc/0xff),
170 'darkorchid1': (0xbf/0xff, 0x3e/0xff, 0xff/0xff),
171 'darkorchid2': (0xb2/0xff, 0x3a/0xff, 0xee/0xff),
172 'darkorchid3': (0x9a/0xff, 0x32/0xff, 0xcd/0xff),
173 'darkorchid4': (0x68/0xff, 0x22/0xff, 0x8b/0xff),
174 'darkred': (0x8b/0xff, 0x00/0xff, 0x00/0xff),
175 'darksalmon': (0xe9/0xff, 0x96/0xff, 0x7a/0xff),
176 'darkseagreen': (0x8f/0xff, 0xbc/0xff, 0x8f/0xff),
177 'darkseagreen1': (0xc1/0xff, 0xff/0xff, 0xc1/0xff),
178 'darkseagreen2': (0xb4/0xff, 0xee/0xff, 0xb4/0xff),
179 'darkseagreen3': (0x9b/0xff, 0xcd/0xff, 0x9b/0xff),
180 'darkseagreen4': (0x69/0xff, 0x8b/0xff, 0x69/0xff),
181 'darkslateblue': (0x48/0xff, 0x3d/0xff, 0x8b/0xff),
182 'darkslategray': (0x2f/0xff, 0x4f/0xff, 0x4f/0xff),
183 'darkslategray1': (0x97/0xff, 0xff/0xff, 0xff/0xff),
184 'darkslategray2': (0x8d/0xff, 0xee/0xff, 0xee/0xff),
185 'darkslategray3': (0x79/0xff, 0xcd/0xff, 0xcd/0xff),
186 'darkslategray4': (0x52/0xff, 0x8b/0xff, 0x8b/0xff),
187 'darkslategrey': (0x2f/0xff, 0x4f/0xff, 0x4f/0xff),
188 'darkturquoise': (0x00/0xff, 0xce/0xff, 0xd1/0xff),
189 'darkviolet': (0x94/0xff, 0x00/0xff, 0xd3/0xff),
190 'deep pink': (0xff/0xff, 0x14/0xff, 0x93/0xff),
191 'deep sky blue': (0x00/0xff, 0xbf/0xff, 0xff/0xff),
192 'deeppink': (0xff/0xff, 0x14/0xff, 0x93/0xff),
193 'deeppink1': (0xff/0xff, 0x14/0xff, 0x93/0xff),
194 'deeppink2': (0xee/0xff, 0x12/0xff, 0x89/0xff),
195 'deeppink3': (0xcd/0xff, 0x10/0xff, 0x76/0xff),
196 'deeppink4': (0x8b/0xff, 0x0a/0xff, 0x50/0xff),
197 'deepskyblue': (0x00/0xff, 0xbf/0xff, 0xff/0xff),
198 'deepskyblue1': (0x00/0xff, 0xbf/0xff, 0xff/0xff),
199 'deepskyblue2': (0x00/0xff, 0xb2/0xff, 0xee/0xff),
200 'deepskyblue3': (0x00/0xff, 0x9a/0xff, 0xcd/0xff),
201 'deepskyblue4': (0x00/0xff, 0x68/0xff, 0x8b/0xff),
202 'dim gray': (0x69/0xff, 0x69/0xff, 0x69/0xff),
203 'dim grey': (0x69/0xff, 0x69/0xff, 0x69/0xff),
204 'dimgray': (0x69/0xff, 0x69/0xff, 0x69/0xff),
205 'dimgrey': (0x69/0xff, 0x69/0xff, 0x69/0xff),
206 'dodger blue': (0x1e/0xff, 0x90/0xff, 0xff/0xff),
207 'dodgerblue': (0x1e/0xff, 0x90/0xff, 0xff/0xff),
208 'dodgerblue1': (0x1e/0xff, 0x90/0xff, 0xff/0xff),
209 'dodgerblue2': (0x1c/0xff, 0x86/0xff, 0xee/0xff),
210 'dodgerblue3': (0x18/0xff, 0x74/0xff, 0xcd/0xff),
211 'dodgerblue4': (0x10/0xff, 0x4e/0xff, 0x8b/0xff),
212 'firebrick': (0xb2/0xff, 0x22/0xff, 0x22/0xff),
213 'firebrick1': (0xff/0xff, 0x30/0xff, 0x30/0xff),
214 'firebrick2': (0xee/0xff, 0x2c/0xff, 0x2c/0xff),
215 'firebrick3': (0xcd/0xff, 0x26/0xff, 0x26/0xff),
216 'firebrick4': (0x8b/0xff, 0x1a/0xff, 0x1a/0xff),
217 'floral white': (0xff/0xff, 0xfa/0xff, 0xf0/0xff),
218 'floralwhite': (0xff/0xff, 0xfa/0xff, 0xf0/0xff),
219 'forest green': (0x22/0xff, 0x8b/0xff, 0x22/0xff),
220 'forestgreen': (0x22/0xff, 0x8b/0xff, 0x22/0xff),
221 'gainsboro': (0xdc/0xff, 0xdc/0xff, 0xdc/0xff),
222 'ghost white': (0xf8/0xff, 0xf8/0xff, 0xff/0xff),
223 'ghostwhite': (0xf8/0xff, 0xf8/0xff, 0xff/0xff),
224 'gold': (0xff/0xff, 0xd7/0xff, 0x00/0xff),
225 'gold1': (0xff/0xff, 0xd7/0xff, 0x00/0xff),
226 'gold2': (0xee/0xff, 0xc9/0xff, 0x00/0xff),
227 'gold3': (0xcd/0xff, 0xad/0xff, 0x00/0xff),
228 'gold4': (0x8b/0xff, 0x75/0xff, 0x00/0xff),
229 'goldenrod': (0xda/0xff, 0xa5/0xff, 0x20/0xff),
230 'goldenrod1': (0xff/0xff, 0xc1/0xff, 0x25/0xff),
231 'goldenrod2': (0xee/0xff, 0xb4/0xff, 0x22/0xff),
232 'goldenrod3': (0xcd/0xff, 0x9b/0xff, 0x1d/0xff),
233 'goldenrod4': (0x8b/0xff, 0x69/0xff, 0x14/0xff),
234 'gray': (0x80/0xff, 0x80/0xff, 0x80/0xff),
235 'gray0': (0x00/0xff, 0x00/0xff, 0x00/0xff),
236 'gray1': (0x03/0xff, 0x03/0xff, 0x03/0xff),
237 'gray2': (0x05/0xff, 0x05/0xff, 0x05/0xff),
238 'gray3': (0x08/0xff, 0x08/0xff, 0x08/0xff),
239 'gray4': (0x0a/0xff, 0x0a/0xff, 0x0a/0xff),
240 'gray5': (0x0d/0xff, 0x0d/0xff, 0x0d/0xff),
241 'gray6': (0x0f/0xff, 0x0f/0xff, 0x0f/0xff),
242 'gray7': (0x12/0xff, 0x12/0xff, 0x12/0xff),
243 'gray8': (0x14/0xff, 0x14/0xff, 0x14/0xff),
244 'gray9': (0x17/0xff, 0x17/0xff, 0x17/0xff),
245 'gray10': (0x1a/0xff, 0x1a/0xff, 0x1a/0xff),
246 'gray11': (0x1c/0xff, 0x1c/0xff, 0x1c/0xff),
247 'gray12': (0x1f/0xff, 0x1f/0xff, 0x1f/0xff),
248 'gray13': (0x21/0xff, 0x21/0xff, 0x21/0xff),
249 'gray14': (0x24/0xff, 0x24/0xff, 0x24/0xff),
250 'gray15': (0x26/0xff, 0x26/0xff, 0x26/0xff),
251 'gray16': (0x29/0xff, 0x29/0xff, 0x29/0xff),
252 'gray17': (0x2b/0xff, 0x2b/0xff, 0x2b/0xff),
253 'gray18': (0x2e/0xff, 0x2e/0xff, 0x2e/0xff),
254 'gray19': (0x30/0xff, 0x30/0xff, 0x30/0xff),
255 'gray20': (0x33/0xff, 0x33/0xff, 0x33/0xff),
256 'gray21': (0x36/0xff, 0x36/0xff, 0x36/0xff),
257 'gray22': (0x38/0xff, 0x38/0xff, 0x38/0xff),
258 'gray23': (0x3b/0xff, 0x3b/0xff, 0x3b/0xff),
259 'gray24': (0x3d/0xff, 0x3d/0xff, 0x3d/0xff),
260 'gray25': (0x40/0xff, 0x40/0xff, 0x40/0xff),
261 'gray26': (0x42/0xff, 0x42/0xff, 0x42/0xff),
262 'gray27': (0x45/0xff, 0x45/0xff, 0x45/0xff),
263 'gray28': (0x47/0xff, 0x47/0xff, 0x47/0xff),
264 'gray29': (0x4a/0xff, 0x4a/0xff, 0x4a/0xff),
265 'gray30': (0x4d/0xff, 0x4d/0xff, 0x4d/0xff),
266 'gray31': (0x4f/0xff, 0x4f/0xff, 0x4f/0xff),
267 'gray32': (0x52/0xff, 0x52/0xff, 0x52/0xff),
268 'gray33': (0x54/0xff, 0x54/0xff, 0x54/0xff),
269 'gray34': (0x57/0xff, 0x57/0xff, 0x57/0xff),
270 'gray35': (0x59/0xff, 0x59/0xff, 0x59/0xff),
271 'gray36': (0x5c/0xff, 0x5c/0xff, 0x5c/0xff),
272 'gray37': (0x5e/0xff, 0x5e/0xff, 0x5e/0xff),
273 'gray38': (0x61/0xff, 0x61/0xff, 0x61/0xff),
274 'gray39': (0x63/0xff, 0x63/0xff, 0x63/0xff),
275 'gray40': (0x66/0xff, 0x66/0xff, 0x66/0xff),
276 'gray41': (0x69/0xff, 0x69/0xff, 0x69/0xff),
277 'gray42': (0x6b/0xff, 0x6b/0xff, 0x6b/0xff),
278 'gray43': (0x6e/0xff, 0x6e/0xff, 0x6e/0xff),
279 'gray44': (0x70/0xff, 0x70/0xff, 0x70/0xff),
280 'gray45': (0x73/0xff, 0x73/0xff, 0x73/0xff),
281 'gray46': (0x75/0xff, 0x75/0xff, 0x75/0xff),
282 'gray47': (0x78/0xff, 0x78/0xff, 0x78/0xff),
283 'gray48': (0x7a/0xff, 0x7a/0xff, 0x7a/0xff),
284 'gray49': (0x7d/0xff, 0x7d/0xff, 0x7d/0xff),
285 'gray50': (0x7f/0xff, 0x7f/0xff, 0x7f/0xff),
286 'gray51': (0x82/0xff, 0x82/0xff, 0x82/0xff),
287 'gray52': (0x85/0xff, 0x85/0xff, 0x85/0xff),
288 'gray53': (0x87/0xff, 0x87/0xff, 0x87/0xff),
289 'gray54': (0x8a/0xff, 0x8a/0xff, 0x8a/0xff),
290 'gray55': (0x8c/0xff, 0x8c/0xff, 0x8c/0xff),
291 'gray56': (0x8f/0xff, 0x8f/0xff, 0x8f/0xff),
292 'gray57': (0x91/0xff, 0x91/0xff, 0x91/0xff),
293 'gray58': (0x94/0xff, 0x94/0xff, 0x94/0xff),
294 'gray59': (0x96/0xff, 0x96/0xff, 0x96/0xff),
295 'gray60': (0x99/0xff, 0x99/0xff, 0x99/0xff),
296 'gray61': (0x9c/0xff, 0x9c/0xff, 0x9c/0xff),
297 'gray62': (0x9e/0xff, 0x9e/0xff, 0x9e/0xff),
298 'gray63': (0xa1/0xff, 0xa1/0xff, 0xa1/0xff),
299 'gray64': (0xa3/0xff, 0xa3/0xff, 0xa3/0xff),
300 'gray65': (0xa6/0xff, 0xa6/0xff, 0xa6/0xff),
301 'gray66': (0xa8/0xff, 0xa8/0xff, 0xa8/0xff),
302 'gray67': (0xab/0xff, 0xab/0xff, 0xab/0xff),
303 'gray68': (0xad/0xff, 0xad/0xff, 0xad/0xff),
304 'gray69': (0xb0/0xff, 0xb0/0xff, 0xb0/0xff),
305 'gray70': (0xb3/0xff, 0xb3/0xff, 0xb3/0xff),
306 'gray71': (0xb5/0xff, 0xb5/0xff, 0xb5/0xff),
307 'gray72': (0xb8/0xff, 0xb8/0xff, 0xb8/0xff),
308 'gray73': (0xba/0xff, 0xba/0xff, 0xba/0xff),
309 'gray74': (0xbd/0xff, 0xbd/0xff, 0xbd/0xff),
310 'gray75': (0xbf/0xff, 0xbf/0xff, 0xbf/0xff),
311 'gray76': (0xc2/0xff, 0xc2/0xff, 0xc2/0xff),
312 'gray77': (0xc4/0xff, 0xc4/0xff, 0xc4/0xff),
313 'gray78': (0xc7/0xff, 0xc7/0xff, 0xc7/0xff),
314 'gray79': (0xc9/0xff, 0xc9/0xff, 0xc9/0xff),
315 'gray80': (0xcc/0xff, 0xcc/0xff, 0xcc/0xff),
316 'gray81': (0xcf/0xff, 0xcf/0xff, 0xcf/0xff),
317 'gray82': (0xd1/0xff, 0xd1/0xff, 0xd1/0xff),
318 'gray83': (0xd4/0xff, 0xd4/0xff, 0xd4/0xff),
319 'gray84': (0xd6/0xff, 0xd6/0xff, 0xd6/0xff),
320 'gray85': (0xd9/0xff, 0xd9/0xff, 0xd9/0xff),
321 'gray86': (0xdb/0xff, 0xdb/0xff, 0xdb/0xff),
322 'gray87': (0xde/0xff, 0xde/0xff, 0xde/0xff),
323 'gray88': (0xe0/0xff, 0xe0/0xff, 0xe0/0xff),
324 'gray89': (0xe3/0xff, 0xe3/0xff, 0xe3/0xff),
325 'gray90': (0xe5/0xff, 0xe5/0xff, 0xe5/0xff),
326 'gray91': (0xe8/0xff, 0xe8/0xff, 0xe8/0xff),
327 'gray92': (0xeb/0xff, 0xeb/0xff, 0xeb/0xff),
328 'gray93': (0xed/0xff, 0xed/0xff, 0xed/0xff),
329 'gray94': (0xf0/0xff, 0xf0/0xff, 0xf0/0xff),
330 'gray95': (0xf2/0xff, 0xf2/0xff, 0xf2/0xff),
331 'gray96': (0xf5/0xff, 0xf5/0xff, 0xf5/0xff),
332 'gray97': (0xf7/0xff, 0xf7/0xff, 0xf7/0xff),
333 'gray98': (0xfa/0xff, 0xfa/0xff, 0xfa/0xff),
334 'gray99': (0xfc/0xff, 0xfc/0xff, 0xfc/0xff),
335 'gray100': (0xff/0xff, 0xff/0xff, 0xff/0xff),
336 'green': (0x00/0xff, 0x80/0xff, 0x00/0xff),
337 'green yellow': (0xad/0xff, 0xff/0xff, 0x2f/0xff),
338 'green1': (0x00/0xff, 0xff/0xff, 0x00/0xff),
339 'green2': (0x00/0xff, 0xee/0xff, 0x00/0xff),
340 'green3': (0x00/0xff, 0xcd/0xff, 0x00/0xff),
341 'green4': (0x00/0xff, 0x8b/0xff, 0x00/0xff),
342 'greenyellow': (0xad/0xff, 0xff/0xff, 0x2f/0xff),
343 'grey': (0x80/0xff, 0x80/0xff, 0x80/0xff),
344 'grey0': (0x00/0xff, 0x00/0xff, 0x00/0xff),
345 'grey1': (0x03/0xff, 0x03/0xff, 0x03/0xff),
346 'grey2': (0x05/0xff, 0x05/0xff, 0x05/0xff),
347 'grey3': (0x08/0xff, 0x08/0xff, 0x08/0xff),
348 'grey4': (0x0a/0xff, 0x0a/0xff, 0x0a/0xff),
349 'grey5': (0x0d/0xff, 0x0d/0xff, 0x0d/0xff),
350 'grey6': (0x0f/0xff, 0x0f/0xff, 0x0f/0xff),
351 'grey7': (0x12/0xff, 0x12/0xff, 0x12/0xff),
352 'grey8': (0x14/0xff, 0x14/0xff, 0x14/0xff),
353 'grey9': (0x17/0xff, 0x17/0xff, 0x17/0xff),
354 'grey10': (0x1a/0xff, 0x1a/0xff, 0x1a/0xff),
355 'grey11': (0x1c/0xff, 0x1c/0xff, 0x1c/0xff),
356 'grey12': (0x1f/0xff, 0x1f/0xff, 0x1f/0xff),
357 'grey13': (0x21/0xff, 0x21/0xff, 0x21/0xff),
358 'grey14': (0x24/0xff, 0x24/0xff, 0x24/0xff),
359 'grey15': (0x26/0xff, 0x26/0xff, 0x26/0xff),
360 'grey16': (0x29/0xff, 0x29/0xff, 0x29/0xff),
361 'grey17': (0x2b/0xff, 0x2b/0xff, 0x2b/0xff),
362 'grey18': (0x2e/0xff, 0x2e/0xff, 0x2e/0xff),
363 'grey19': (0x30/0xff, 0x30/0xff, 0x30/0xff),
364 'grey20': (0x33/0xff, 0x33/0xff, 0x33/0xff),
365 'grey21': (0x36/0xff, 0x36/0xff, 0x36/0xff),
366 'grey22': (0x38/0xff, 0x38/0xff, 0x38/0xff),
367 'grey23': (0x3b/0xff, 0x3b/0xff, 0x3b/0xff),
368 'grey24': (0x3d/0xff, 0x3d/0xff, 0x3d/0xff),
369 'grey25': (0x40/0xff, 0x40/0xff, 0x40/0xff),
370 'grey26': (0x42/0xff, 0x42/0xff, 0x42/0xff),
371 'grey27': (0x45/0xff, 0x45/0xff, 0x45/0xff),
372 'grey28': (0x47/0xff, 0x47/0xff, 0x47/0xff),
373 'grey29': (0x4a/0xff, 0x4a/0xff, 0x4a/0xff),
374 'grey30': (0x4d/0xff, 0x4d/0xff, 0x4d/0xff),
375 'grey31': (0x4f/0xff, 0x4f/0xff, 0x4f/0xff),
376 'grey32': (0x52/0xff, 0x52/0xff, 0x52/0xff),
377 'grey33': (0x54/0xff, 0x54/0xff, 0x54/0xff),
378 'grey34': (0x57/0xff, 0x57/0xff, 0x57/0xff),
379 'grey35': (0x59/0xff, 0x59/0xff, 0x59/0xff),
380 'grey36': (0x5c/0xff, 0x5c/0xff, 0x5c/0xff),
381 'grey37': (0x5e/0xff, 0x5e/0xff, 0x5e/0xff),
382 'grey38': (0x61/0xff, 0x61/0xff, 0x61/0xff),
383 'grey39': (0x63/0xff, 0x63/0xff, 0x63/0xff),
384 'grey40': (0x66/0xff, 0x66/0xff, 0x66/0xff),
385 'grey41': (0x69/0xff, 0x69/0xff, 0x69/0xff),
386 'grey42': (0x6b/0xff, 0x6b/0xff, 0x6b/0xff),
387 'grey43': (0x6e/0xff, 0x6e/0xff, 0x6e/0xff),
388 'grey44': (0x70/0xff, 0x70/0xff, 0x70/0xff),
389 'grey45': (0x73/0xff, 0x73/0xff, 0x73/0xff),
390 'grey46': (0x75/0xff, 0x75/0xff, 0x75/0xff),
391 'grey47': (0x78/0xff, 0x78/0xff, 0x78/0xff),
392 'grey48': (0x7a/0xff, 0x7a/0xff, 0x7a/0xff),
393 'grey49': (0x7d/0xff, 0x7d/0xff, 0x7d/0xff),
394 'grey50': (0x7f/0xff, 0x7f/0xff, 0x7f/0xff),
395 'grey51': (0x82/0xff, 0x82/0xff, 0x82/0xff),
396 'grey52': (0x85/0xff, 0x85/0xff, 0x85/0xff),
397 'grey53': (0x87/0xff, 0x87/0xff, 0x87/0xff),
398 'grey54': (0x8a/0xff, 0x8a/0xff, 0x8a/0xff),
399 'grey55': (0x8c/0xff, 0x8c/0xff, 0x8c/0xff),
400 'grey56': (0x8f/0xff, 0x8f/0xff, 0x8f/0xff),
401 'grey57': (0x91/0xff, 0x91/0xff, 0x91/0xff),
402 'grey58': (0x94/0xff, 0x94/0xff, 0x94/0xff),
403 'grey59': (0x96/0xff, 0x96/0xff, 0x96/0xff),
404 'grey60': (0x99/0xff, 0x99/0xff, 0x99/0xff),
405 'grey61': (0x9c/0xff, 0x9c/0xff, 0x9c/0xff),
406 'grey62': (0x9e/0xff, 0x9e/0xff, 0x9e/0xff),
407 'grey63': (0xa1/0xff, 0xa1/0xff, 0xa1/0xff),
408 'grey64': (0xa3/0xff, 0xa3/0xff, 0xa3/0xff),
409 'grey65': (0xa6/0xff, 0xa6/0xff, 0xa6/0xff),
410 'grey66': (0xa8/0xff, 0xa8/0xff, 0xa8/0xff),
411 'grey67': (0xab/0xff, 0xab/0xff, 0xab/0xff),
412 'grey68': (0xad/0xff, 0xad/0xff, 0xad/0xff),
413 'grey69': (0xb0/0xff, 0xb0/0xff, 0xb0/0xff),
414 'grey70': (0xb3/0xff, 0xb3/0xff, 0xb3/0xff),
415 'grey71': (0xb5/0xff, 0xb5/0xff, 0xb5/0xff),
416 'grey72': (0xb8/0xff, 0xb8/0xff, 0xb8/0xff),
417 'grey73': (0xba/0xff, 0xba/0xff, 0xba/0xff),
418 'grey74': (0xbd/0xff, 0xbd/0xff, 0xbd/0xff),
419 'grey75': (0xbf/0xff, 0xbf/0xff, 0xbf/0xff),
420 'grey76': (0xc2/0xff, 0xc2/0xff, 0xc2/0xff),
421 'grey77': (0xc4/0xff, 0xc4/0xff, 0xc4/0xff),
422 'grey78': (0xc7/0xff, 0xc7/0xff, 0xc7/0xff),
423 'grey79': (0xc9/0xff, 0xc9/0xff, 0xc9/0xff),
424 'grey80': (0xcc/0xff, 0xcc/0xff, 0xcc/0xff),
425 'grey81': (0xcf/0xff, 0xcf/0xff, 0xcf/0xff),
426 'grey82': (0xd1/0xff, 0xd1/0xff, 0xd1/0xff),
427 'grey83': (0xd4/0xff, 0xd4/0xff, 0xd4/0xff),
428 'grey84': (0xd6/0xff, 0xd6/0xff, 0xd6/0xff),
429 'grey85': (0xd9/0xff, 0xd9/0xff, 0xd9/0xff),
430 'grey86': (0xdb/0xff, 0xdb/0xff, 0xdb/0xff),
431 'grey87': (0xde/0xff, 0xde/0xff, 0xde/0xff),
432 'grey88': (0xe0/0xff, 0xe0/0xff, 0xe0/0xff),
433 'grey89': (0xe3/0xff, 0xe3/0xff, 0xe3/0xff),
434 'grey90': (0xe5/0xff, 0xe5/0xff, 0xe5/0xff),
435 'grey91': (0xe8/0xff, 0xe8/0xff, 0xe8/0xff),
436 'grey92': (0xeb/0xff, 0xeb/0xff, 0xeb/0xff),
437 'grey93': (0xed/0xff, 0xed/0xff, 0xed/0xff),
438 'grey94': (0xf0/0xff, 0xf0/0xff, 0xf0/0xff),
439 'grey95': (0xf2/0xff, 0xf2/0xff, 0xf2/0xff),
440 'grey96': (0xf5/0xff, 0xf5/0xff, 0xf5/0xff),
441 'grey97': (0xf7/0xff, 0xf7/0xff, 0xf7/0xff),
442 'grey98': (0xfa/0xff, 0xfa/0xff, 0xfa/0xff),
443 'grey99': (0xfc/0xff, 0xfc/0xff, 0xfc/0xff),
444 'grey100': (0xff/0xff, 0xff/0xff, 0xff/0xff),
445 'honeydew': (0xf0/0xff, 0xff/0xff, 0xf0/0xff),
446 'honeydew1': (0xf0/0xff, 0xff/0xff, 0xf0/0xff),
447 'honeydew2': (0xe0/0xff, 0xee/0xff, 0xe0/0xff),
448 'honeydew3': (0xc1/0xff, 0xcd/0xff, 0xc1/0xff),
449 'honeydew4': (0x83/0xff, 0x8b/0xff, 0x83/0xff),
450 'hot pink': (0xff/0xff, 0x69/0xff, 0xb4/0xff),
451 'hotpink': (0xff/0xff, 0x69/0xff, 0xb4/0xff),
452 'hotpink1': (0xff/0xff, 0x6e/0xff, 0xb4/0xff),
453 'hotpink2': (0xee/0xff, 0x6a/0xff, 0xa7/0xff),
454 'hotpink3': (0xcd/0xff, 0x60/0xff, 0x90/0xff),
455 'hotpink4': (0x8b/0xff, 0x3a/0xff, 0x62/0xff),
456 'indian red': (0xcd/0xff, 0x5c/0xff, 0x5c/0xff),
457 'indianred': (0xcd/0xff, 0x5c/0xff, 0x5c/0xff),
458 'indianred1': (0xff/0xff, 0x6a/0xff, 0x6a/0xff),
459 'indianred2': (0xee/0xff, 0x63/0xff, 0x63/0xff),
460 'indianred3': (0xcd/0xff, 0x55/0xff, 0x55/0xff),
461 'indianred4': (0x8b/0xff, 0x3a/0xff, 0x3a/0xff),
462 'ivory': (0xff/0xff, 0xff/0xff, 0xf0/0xff),
463 'ivory1': (0xff/0xff, 0xff/0xff, 0xf0/0xff),
464 'ivory2': (0xee/0xff, 0xee/0xff, 0xe0/0xff),
465 'ivory3': (0xcd/0xff, 0xcd/0xff, 0xc1/0xff),
466 'ivory4': (0x8b/0xff, 0x8b/0xff, 0x83/0xff),
467 'khaki': (0xf0/0xff, 0xe6/0xff, 0x8c/0xff),
468 'khaki1': (0xff/0xff, 0xf6/0xff, 0x8f/0xff),
469 'khaki2': (0xee/0xff, 0xe6/0xff, 0x85/0xff),
470 'khaki3': (0xcd/0xff, 0xc6/0xff, 0x73/0xff),
471 'khaki4': (0x8b/0xff, 0x86/0xff, 0x4e/0xff),
472 'lavender': (0xe6/0xff, 0xe6/0xff, 0xfa/0xff),
473 'lavender blush': (0xff/0xff, 0xf0/0xff, 0xf5/0xff),
474 'lavenderblush': (0xff/0xff, 0xf0/0xff, 0xf5/0xff),
475 'lavenderblush1': (0xff/0xff, 0xf0/0xff, 0xf5/0xff),
476 'lavenderblush2': (0xee/0xff, 0xe0/0xff, 0xe5/0xff),
477 'lavenderblush3': (0xcd/0xff, 0xc1/0xff, 0xc5/0xff),
478 'lavenderblush4': (0x8b/0xff, 0x83/0xff, 0x86/0xff),
479 'lawn green': (0x7c/0xff, 0xfc/0xff, 0x00/0xff),
480 'lawngreen': (0x7c/0xff, 0xfc/0xff, 0x00/0xff),
481 'lemon chiffon': (0xff/0xff, 0xfa/0xff, 0xcd/0xff),
482 'lemonchiffon': (0xff/0xff, 0xfa/0xff, 0xcd/0xff),
483 'lemonchiffon1': (0xff/0xff, 0xfa/0xff, 0xcd/0xff),
484 'lemonchiffon2': (0xee/0xff, 0xe9/0xff, 0xbf/0xff),
485 'lemonchiffon3': (0xcd/0xff, 0xc9/0xff, 0xa5/0xff),
486 'lemonchiffon4': (0x8b/0xff, 0x89/0xff, 0x70/0xff),
487 'light blue': (0xad/0xff, 0xd8/0xff, 0xe6/0xff),
488 'light coral': (0xf0/0xff, 0x80/0xff, 0x80/0xff),
489 'light cyan': (0xe0/0xff, 0xff/0xff, 0xff/0xff),
490 'light goldenrod': (0xee/0xff, 0xdd/0xff, 0x82/0xff),
491 'light goldenrod yellow': (0xfa/0xff, 0xfa/0xff, 0xd2/0xff),
492 'light gray': (0xd3/0xff, 0xd3/0xff, 0xd3/0xff),
493 'light green': (0x90/0xff, 0xee/0xff, 0x90/0xff),
494 'light grey': (0xd3/0xff, 0xd3/0xff, 0xd3/0xff),
495 'light pink': (0xff/0xff, 0xb6/0xff, 0xc1/0xff),
496 'light salmon': (0xff/0xff, 0xa0/0xff, 0x7a/0xff),
497 'light sea green': (0x20/0xff, 0xb2/0xff, 0xaa/0xff),
498 'light sky blue': (0x87/0xff, 0xce/0xff, 0xfa/0xff),
499 'light slate blue': (0x84/0xff, 0x70/0xff, 0xff/0xff),
500 'light slate gray': (0x77/0xff, 0x88/0xff, 0x99/0xff),
501 'light slate grey': (0x77/0xff, 0x88/0xff, 0x99/0xff),
502 'light steel blue': (0xb0/0xff, 0xc4/0xff, 0xde/0xff),
503 'light yellow': (0xff/0xff, 0xff/0xff, 0xe0/0xff),
504 'lightblue': (0xad/0xff, 0xd8/0xff, 0xe6/0xff),
505 'lightblue1': (0xbf/0xff, 0xef/0xff, 0xff/0xff),
506 'lightblue2': (0xb2/0xff, 0xdf/0xff, 0xee/0xff),
507 'lightblue3': (0x9a/0xff, 0xc0/0xff, 0xcd/0xff),
508 'lightblue4': (0x68/0xff, 0x83/0xff, 0x8b/0xff),
509 'lightcoral': (0xf0/0xff, 0x80/0xff, 0x80/0xff),
510 'lightcyan': (0xe0/0xff, 0xff/0xff, 0xff/0xff),
511 'lightcyan1': (0xe0/0xff, 0xff/0xff, 0xff/0xff),
512 'lightcyan2': (0xd1/0xff, 0xee/0xff, 0xee/0xff),
513 'lightcyan3': (0xb4/0xff, 0xcd/0xff, 0xcd/0xff),
514 'lightcyan4': (0x7a/0xff, 0x8b/0xff, 0x8b/0xff),
515 'lightgoldenrod': (0xee/0xff, 0xdd/0xff, 0x82/0xff),
516 'lightgoldenrod1': (0xff/0xff, 0xec/0xff, 0x8b/0xff),
517 'lightgoldenrod2': (0xee/0xff, 0xdc/0xff, 0x82/0xff),
518 'lightgoldenrod3': (0xcd/0xff, 0xbe/0xff, 0x70/0xff),
519 'lightgoldenrod4': (0x8b/0xff, 0x81/0xff, 0x4c/0xff),
520 'lightgoldenrodyellow': (0xfa/0xff, 0xfa/0xff, 0xd2/0xff),
521 'lightgray': (0xd3/0xff, 0xd3/0xff, 0xd3/0xff),
522 'lightgreen': (0x90/0xff, 0xee/0xff, 0x90/0xff),
523 'lightgrey': (0xd3/0xff, 0xd3/0xff, 0xd3/0xff),
524 'lightpink': (0xff/0xff, 0xb6/0xff, 0xc1/0xff),
525 'lightpink1': (0xff/0xff, 0xae/0xff, 0xb9/0xff),
526 'lightpink2': (0xee/0xff, 0xa2/0xff, 0xad/0xff),
527 'lightpink3': (0xcd/0xff, 0x8c/0xff, 0x95/0xff),
528 'lightpink4': (0x8b/0xff, 0x5f/0xff, 0x65/0xff),
529 'lightsalmon': (0xff/0xff, 0xa0/0xff, 0x7a/0xff),
530 'lightsalmon1': (0xff/0xff, 0xa0/0xff, 0x7a/0xff),
531 'lightsalmon2': (0xee/0xff, 0x95/0xff, 0x72/0xff),
532 'lightsalmon3': (0xcd/0xff, 0x81/0xff, 0x62/0xff),
533 'lightsalmon4': (0x8b/0xff, 0x57/0xff, 0x42/0xff),
534 'lightseagreen': (0x20/0xff, 0xb2/0xff, 0xaa/0xff),
535 'lightskyblue': (0x87/0xff, 0xce/0xff, 0xfa/0xff),
536 'lightskyblue1': (0xb0/0xff, 0xe2/0xff, 0xff/0xff),
537 'lightskyblue2': (0xa4/0xff, 0xd3/0xff, 0xee/0xff),
538 'lightskyblue3': (0x8d/0xff, 0xb6/0xff, 0xcd/0xff),
539 'lightskyblue4': (0x60/0xff, 0x7b/0xff, 0x8b/0xff),
540 'lightslateblue': (0x84/0xff, 0x70/0xff, 0xff/0xff),
541 'lightslategray': (0x77/0xff, 0x88/0xff, 0x99/0xff),
542 'lightslategrey': (0x77/0xff, 0x88/0xff, 0x99/0xff),
543 'lightsteelblue': (0xb0/0xff, 0xc4/0xff, 0xde/0xff),
544 'lightsteelblue1': (0xca/0xff, 0xe1/0xff, 0xff/0xff),
545 'lightsteelblue2': (0xbc/0xff, 0xd2/0xff, 0xee/0xff),
546 'lightsteelblue3': (0xa2/0xff, 0xb5/0xff, 0xcd/0xff),
547 'lightsteelblue4': (0x6e/0xff, 0x7b/0xff, 0x8b/0xff),
548 'lightyellow': (0xff/0xff, 0xff/0xff, 0xe0/0xff),
549 'lightyellow1': (0xff/0xff, 0xff/0xff, 0xe0/0xff),
550 'lightyellow2': (0xee/0xff, 0xee/0xff, 0xd1/0xff),
551 'lightyellow3': (0xcd/0xff, 0xcd/0xff, 0xb4/0xff),
552 'lightyellow4': (0x8b/0xff, 0x8b/0xff, 0x7a/0xff),
553 'lime green': (0x32/0xff, 0xcd/0xff, 0x32/0xff),
554 'limegreen': (0x32/0xff, 0xcd/0xff, 0x32/0xff),
555 'linen': (0xfa/0xff, 0xf0/0xff, 0xe6/0xff),
556 'magenta': (0xff/0xff, 0x00/0xff, 0xff/0xff),
557 'magenta1': (0xff/0xff, 0x00/0xff, 0xff/0xff),
558 'magenta2': (0xee/0xff, 0x00/0xff, 0xee/0xff),
559 'magenta3': (0xcd/0xff, 0x00/0xff, 0xcd/0xff),
560 'magenta4': (0x8b/0xff, 0x00/0xff, 0x8b/0xff),
561 'maroon': (0x80/0xff, 0x00/0xff, 0x00/0xff),
562 'maroon1': (0xff/0xff, 0x34/0xff, 0xb3/0xff),
563 'maroon2': (0xee/0xff, 0x30/0xff, 0xa7/0xff),
564 'maroon3': (0xcd/0xff, 0x29/0xff, 0x90/0xff),
565 'maroon4': (0x8b/0xff, 0x1c/0xff, 0x62/0xff),
566 'medium aquamarine': (0x66/0xff, 0xcd/0xff, 0xaa/0xff),
567 'medium blue': (0x00/0xff, 0x00/0xff, 0xcd/0xff),
568 'medium orchid': (0xba/0xff, 0x55/0xff, 0xd3/0xff),
569 'medium purple': (0x93/0xff, 0x70/0xff, 0xdb/0xff),
570 'medium sea green': (0x3c/0xff, 0xb3/0xff, 0x71/0xff),
571 'medium slate blue': (0x7b/0xff, 0x68/0xff, 0xee/0xff),
572 'medium spring green': (0x00/0xff, 0xfa/0xff, 0x9a/0xff),
573 'medium turquoise': (0x48/0xff, 0xd1/0xff, 0xcc/0xff),
574 'medium violet red': (0xc7/0xff, 0x15/0xff, 0x85/0xff),
575 'mediumaquamarine': (0x66/0xff, 0xcd/0xff, 0xaa/0xff),
576 'mediumblue': (0x00/0xff, 0x00/0xff, 0xcd/0xff),
577 'mediumorchid': (0xba/0xff, 0x55/0xff, 0xd3/0xff),
578 'mediumorchid1': (0xe0/0xff, 0x66/0xff, 0xff/0xff),
579 'mediumorchid2': (0xd1/0xff, 0x5f/0xff, 0xee/0xff),
580 'mediumorchid3': (0xb4/0xff, 0x52/0xff, 0xcd/0xff),
581 'mediumorchid4': (0x7a/0xff, 0x37/0xff, 0x8b/0xff),
582 'mediumpurple': (0x93/0xff, 0x70/0xff, 0xdb/0xff),
583 'mediumpurple1': (0xab/0xff, 0x82/0xff, 0xff/0xff),
584 'mediumpurple2': (0x9f/0xff, 0x79/0xff, 0xee/0xff),
585 'mediumpurple3': (0x89/0xff, 0x68/0xff, 0xcd/0xff),
586 'mediumpurple4': (0x5d/0xff, 0x47/0xff, 0x8b/0xff),
587 'mediumseagreen': (0x3c/0xff, 0xb3/0xff, 0x71/0xff),
588 'mediumslateblue': (0x7b/0xff, 0x68/0xff, 0xee/0xff),
589 'mediumspringgreen': (0x00/0xff, 0xfa/0xff, 0x9a/0xff),
590 'mediumturquoise': (0x48/0xff, 0xd1/0xff, 0xcc/0xff),
591 'mediumvioletred': (0xc7/0xff, 0x15/0xff, 0x85/0xff),
592 'midnight blue': (0x19/0xff, 0x19/0xff, 0x70/0xff),
593 'midnightblue': (0x19/0xff, 0x19/0xff, 0x70/0xff),
594 'mint cream': (0xf5/0xff, 0xff/0xff, 0xfa/0xff),
595 'mintcream': (0xf5/0xff, 0xff/0xff, 0xfa/0xff),
596 'misty rose': (0xff/0xff, 0xe4/0xff, 0xe1/0xff),
597 'mistyrose': (0xff/0xff, 0xe4/0xff, 0xe1/0xff),
598 'mistyrose1': (0xff/0xff, 0xe4/0xff, 0xe1/0xff),
599 'mistyrose2': (0xee/0xff, 0xd5/0xff, 0xd2/0xff),
600 'mistyrose3': (0xcd/0xff, 0xb7/0xff, 0xb5/0xff),
601 'mistyrose4': (0x8b/0xff, 0x7d/0xff, 0x7b/0xff),
602 'moccasin': (0xff/0xff, 0xe4/0xff, 0xb5/0xff),
603 'navajo white': (0xff/0xff, 0xde/0xff, 0xad/0xff),
604 'navajowhite': (0xff/0xff, 0xde/0xff, 0xad/0xff),
605 'navajowhite1': (0xff/0xff, 0xde/0xff, 0xad/0xff),
606 'navajowhite2': (0xee/0xff, 0xcf/0xff, 0xa1/0xff),
607 'navajowhite3': (0xcd/0xff, 0xb3/0xff, 0x8b/0xff),
608 'navajowhite4': (0x8b/0xff, 0x79/0xff, 0x5e/0xff),
609 'navy': (0x00/0xff, 0x00/0xff, 0x80/0xff),
610 'navy blue': (0x00/0xff, 0x00/0xff, 0x80/0xff),
611 'navyblue': (0x00/0xff, 0x00/0xff, 0x80/0xff),
612 'old lace': (0xfd/0xff, 0xf5/0xff, 0xe6/0xff),
613 'oldlace': (0xfd/0xff, 0xf5/0xff, 0xe6/0xff),
614 'olive drab': (0x6b/0xff, 0x8e/0xff, 0x23/0xff),
615 'olivedrab': (0x6b/0xff, 0x8e/0xff, 0x23/0xff),
616 'olivedrab1': (0xc0/0xff, 0xff/0xff, 0x3e/0xff),
617 'olivedrab2': (0xb3/0xff, 0xee/0xff, 0x3a/0xff),
618 'olivedrab3': (0x9a/0xff, 0xcd/0xff, 0x32/0xff),
619 'olivedrab4': (0x69/0xff, 0x8b/0xff, 0x22/0xff),
620 'orange': (0xff/0xff, 0xa5/0xff, 0x00/0xff),
621 'orange red': (0xff/0xff, 0x45/0xff, 0x00/0xff),
622 'orange1': (0xff/0xff, 0xa5/0xff, 0x00/0xff),
623 'orange2': (0xee/0xff, 0x9a/0xff, 0x00/0xff),
624 'orange3': (0xcd/0xff, 0x85/0xff, 0x00/0xff),
625 'orange4': (0x8b/0xff, 0x5a/0xff, 0x00/0xff),
626 'orangered': (0xff/0xff, 0x45/0xff, 0x00/0xff),
627 'orangered1': (0xff/0xff, 0x45/0xff, 0x00/0xff),
628 'orangered2': (0xee/0xff, 0x40/0xff, 0x00/0xff),
629 'orangered3': (0xcd/0xff, 0x37/0xff, 0x00/0xff),
630 'orangered4': (0x8b/0xff, 0x25/0xff, 0x00/0xff),
631 'orchid': (0xda/0xff, 0x70/0xff, 0xd6/0xff),
632 'orchid1': (0xff/0xff, 0x83/0xff, 0xfa/0xff),
633 'orchid2': (0xee/0xff, 0x7a/0xff, 0xe9/0xff),
634 'orchid3': (0xcd/0xff, 0x69/0xff, 0xc9/0xff),
635 'orchid4': (0x8b/0xff, 0x47/0xff, 0x89/0xff),
636 'pale goldenrod': (0xee/0xff, 0xe8/0xff, 0xaa/0xff),
637 'pale green': (0x98/0xff, 0xfb/0xff, 0x98/0xff),
638 'pale turquoise': (0xaf/0xff, 0xee/0xff, 0xee/0xff),
639 'pale violet red': (0xdb/0xff, 0x70/0xff, 0x93/0xff),
640 'palegoldenrod': (0xee/0xff, 0xe8/0xff, 0xaa/0xff),
641 'palegreen': (0x98/0xff, 0xfb/0xff, 0x98/0xff),
642 'palegreen1': (0x9a/0xff, 0xff/0xff, 0x9a/0xff),
643 'palegreen2': (0x90/0xff, 0xee/0xff, 0x90/0xff),
644 'palegreen3': (0x7c/0xff, 0xcd/0xff, 0x7c/0xff),
645 'palegreen4': (0x54/0xff, 0x8b/0xff, 0x54/0xff),
646 'paleturquoise': (0xaf/0xff, 0xee/0xff, 0xee/0xff),
647 'paleturquoise1': (0xbb/0xff, 0xff/0xff, 0xff/0xff),
648 'paleturquoise2': (0xae/0xff, 0xee/0xff, 0xee/0xff),
649 'paleturquoise3': (0x96/0xff, 0xcd/0xff, 0xcd/0xff),
650 'paleturquoise4': (0x66/0xff, 0x8b/0xff, 0x8b/0xff),
651 'palevioletred': (0xdb/0xff, 0x70/0xff, 0x93/0xff),
652 'palevioletred1': (0xff/0xff, 0x82/0xff, 0xab/0xff),
653 'palevioletred2': (0xee/0xff, 0x79/0xff, 0x9f/0xff),
654 'palevioletred3': (0xcd/0xff, 0x68/0xff, 0x7f/0xff),
655 'palevioletred4': (0x8b/0xff, 0x47/0xff, 0x5d/0xff),
656 'papaya whip': (0xff/0xff, 0xef/0xff, 0xd5/0xff),
657 'papayawhip': (0xff/0xff, 0xef/0xff, 0xd5/0xff),
658 'peach puff': (0xff/0xff, 0xda/0xff, 0xb9/0xff),
659 'peachpuff': (0xff/0xff, 0xda/0xff, 0xb9/0xff),
660 'peachpuff1': (0xff/0xff, 0xda/0xff, 0xb9/0xff),
661 'peachpuff2': (0xee/0xff, 0xcb/0xff, 0xad/0xff),
662 'peachpuff3': (0xcd/0xff, 0xaf/0xff, 0x95/0xff),
663 'peachpuff4': (0x8b/0xff, 0x77/0xff, 0x65/0xff),
664 'peru': (0xcd/0xff, 0x85/0xff, 0x3f/0xff),
665 'pink': (0xff/0xff, 0xc0/0xff, 0xcb/0xff),
666 'pink1': (0xff/0xff, 0xb5/0xff, 0xc5/0xff),
667 'pink2': (0xee/0xff, 0xa9/0xff, 0xb8/0xff),
668 'pink3': (0xcd/0xff, 0x91/0xff, 0x9e/0xff),
669 'pink4': (0x8b/0xff, 0x63/0xff, 0x6c/0xff),
670 'plum': (0xdd/0xff, 0xa0/0xff, 0xdd/0xff),
671 'plum1': (0xff/0xff, 0xbb/0xff, 0xff/0xff),
672 'plum2': (0xee/0xff, 0xae/0xff, 0xee/0xff),
673 'plum3': (0xcd/0xff, 0x96/0xff, 0xcd/0xff),
674 'plum4': (0x8b/0xff, 0x66/0xff, 0x8b/0xff),
675 'powder blue': (0xb0/0xff, 0xe0/0xff, 0xe6/0xff),
676 'powderblue': (0xb0/0xff, 0xe0/0xff, 0xe6/0xff),
677 'purple': (0x80/0xff, 0x00/0xff, 0x80/0xff),
678 'purple1': (0x9b/0xff, 0x30/0xff, 0xff/0xff),
679 'purple2': (0x91/0xff, 0x2c/0xff, 0xee/0xff),
680 'purple3': (0x7d/0xff, 0x26/0xff, 0xcd/0xff),
681 'purple4': (0x55/0xff, 0x1a/0xff, 0x8b/0xff),
682 'red': (0xff/0xff, 0x00/0xff, 0x00/0xff),
683 'red1': (0xff/0xff, 0x00/0xff, 0x00/0xff),
684 'red2': (0xee/0xff, 0x00/0xff, 0x00/0xff),
685 'red3': (0xcd/0xff, 0x00/0xff, 0x00/0xff),
686 'red4': (0x8b/0xff, 0x00/0xff, 0x00/0xff),
687 'rosy brown': (0xbc/0xff, 0x8f/0xff, 0x8f/0xff),
688 'rosybrown': (0xbc/0xff, 0x8f/0xff, 0x8f/0xff),
689 'rosybrown1': (0xff/0xff, 0xc1/0xff, 0xc1/0xff),
690 'rosybrown2': (0xee/0xff, 0xb4/0xff, 0xb4/0xff),
691 'rosybrown3': (0xcd/0xff, 0x9b/0xff, 0x9b/0xff),
692 'rosybrown4': (0x8b/0xff, 0x69/0xff, 0x69/0xff),
693 'royal blue': (0x41/0xff, 0x69/0xff, 0xe1/0xff),
694 'royalblue': (0x41/0xff, 0x69/0xff, 0xe1/0xff),
695 'royalblue1': (0x48/0xff, 0x76/0xff, 0xff/0xff),
696 'royalblue2': (0x43/0xff, 0x6e/0xff, 0xee/0xff),
697 'royalblue3': (0x3a/0xff, 0x5f/0xff, 0xcd/0xff),
698 'royalblue4': (0x27/0xff, 0x40/0xff, 0x8b/0xff),
699 'saddle brown': (0x8b/0xff, 0x45/0xff, 0x13/0xff),
700 'saddlebrown': (0x8b/0xff, 0x45/0xff, 0x13/0xff),
701 'salmon': (0xfa/0xff, 0x80/0xff, 0x72/0xff),
702 'salmon1': (0xff/0xff, 0x8c/0xff, 0x69/0xff),
703 'salmon2': (0xee/0xff, 0x82/0xff, 0x62/0xff),
704 'salmon3': (0xcd/0xff, 0x70/0xff, 0x54/0xff),
705 'salmon4': (0x8b/0xff, 0x4c/0xff, 0x39/0xff),
706 'sandy brown': (0xf4/0xff, 0xa4/0xff, 0x60/0xff),
707 'sandybrown': (0xf4/0xff, 0xa4/0xff, 0x60/0xff),
708 'sea green': (0x2e/0xff, 0x8b/0xff, 0x57/0xff),
709 'seagreen': (0x2e/0xff, 0x8b/0xff, 0x57/0xff),
710 'seagreen1': (0x54/0xff, 0xff/0xff, 0x9f/0xff),
711 'seagreen2': (0x4e/0xff, 0xee/0xff, 0x94/0xff),
712 'seagreen3': (0x43/0xff, 0xcd/0xff, 0x80/0xff),
713 'seagreen4': (0x2e/0xff, 0x8b/0xff, 0x57/0xff),
714 'seashell': (0xff/0xff, 0xf5/0xff, 0xee/0xff),
715 'seashell1': (0xff/0xff, 0xf5/0xff, 0xee/0xff),
716 'seashell2': (0xee/0xff, 0xe5/0xff, 0xde/0xff),
717 'seashell3': (0xcd/0xff, 0xc5/0xff, 0xbf/0xff),
718 'seashell4': (0x8b/0xff, 0x86/0xff, 0x82/0xff),
719 'sienna': (0xa0/0xff, 0x52/0xff, 0x2d/0xff),
720 'sienna1': (0xff/0xff, 0x82/0xff, 0x47/0xff),
721 'sienna2': (0xee/0xff, 0x79/0xff, 0x42/0xff),
722 'sienna3': (0xcd/0xff, 0x68/0xff, 0x39/0xff),
723 'sienna4': (0x8b/0xff, 0x47/0xff, 0x26/0xff),
724 'sky blue': (0x87/0xff, 0xce/0xff, 0xeb/0xff),
725 'skyblue': (0x87/0xff, 0xce/0xff, 0xeb/0xff),
726 'skyblue1': (0x87/0xff, 0xce/0xff, 0xff/0xff),
727 'skyblue2': (0x7e/0xff, 0xc0/0xff, 0xee/0xff),
728 'skyblue3': (0x6c/0xff, 0xa6/0xff, 0xcd/0xff),
729 'skyblue4': (0x4a/0xff, 0x70/0xff, 0x8b/0xff),
730 'slate blue': (0x6a/0xff, 0x5a/0xff, 0xcd/0xff),
731 'slate gray': (0x70/0xff, 0x80/0xff, 0x90/0xff),
732 'slate grey': (0x70/0xff, 0x80/0xff, 0x90/0xff),
733 'slateblue': (0x6a/0xff, 0x5a/0xff, 0xcd/0xff),
734 'slateblue1': (0x83/0xff, 0x6f/0xff, 0xff/0xff),
735 'slateblue2': (0x7a/0xff, 0x67/0xff, 0xee/0xff),
736 'slateblue3': (0x69/0xff, 0x59/0xff, 0xcd/0xff),
737 'slateblue4': (0x47/0xff, 0x3c/0xff, 0x8b/0xff),
738 'slategray': (0x70/0xff, 0x80/0xff, 0x90/0xff),
739 'slategray1': (0xc6/0xff, 0xe2/0xff, 0xff/0xff),
740 'slategray2': (0xb9/0xff, 0xd3/0xff, 0xee/0xff),
741 'slategray3': (0x9f/0xff, 0xb6/0xff, 0xcd/0xff),
742 'slategray4': (0x6c/0xff, 0x7b/0xff, 0x8b/0xff),
743 'slategrey': (0x70/0xff, 0x80/0xff, 0x90/0xff),
744 'snow': (0xff/0xff, 0xfa/0xff, 0xfa/0xff),
745 'snow1': (0xff/0xff, 0xfa/0xff, 0xfa/0xff),
746 'snow2': (0xee/0xff, 0xe9/0xff, 0xe9/0xff),
747 'snow3': (0xcd/0xff, 0xc9/0xff, 0xc9/0xff),
748 'snow4': (0x8b/0xff, 0x89/0xff, 0x89/0xff),
749 'spring green': (0x00/0xff, 0xff/0xff, 0x7f/0xff),
750 'springgreen': (0x00/0xff, 0xff/0xff, 0x7f/0xff),
751 'springgreen1': (0x00/0xff, 0xff/0xff, 0x7f/0xff),
752 'springgreen2': (0x00/0xff, 0xee/0xff, 0x76/0xff),
753 'springgreen3': (0x00/0xff, 0xcd/0xff, 0x66/0xff),
754 'springgreen4': (0x00/0xff, 0x8b/0xff, 0x45/0xff),
755 'steel blue': (0x46/0xff, 0x82/0xff, 0xb4/0xff),
756 'steelblue': (0x46/0xff, 0x82/0xff, 0xb4/0xff),
757 'steelblue1': (0x63/0xff, 0xb8/0xff, 0xff/0xff),
758 'steelblue2': (0x5c/0xff, 0xac/0xff, 0xee/0xff),
759 'steelblue3': (0x4f/0xff, 0x94/0xff, 0xcd/0xff),
760 'steelblue4': (0x36/0xff, 0x64/0xff, 0x8b/0xff),
761 'tan': (0xd2/0xff, 0xb4/0xff, 0x8c/0xff),
762 'tan1': (0xff/0xff, 0xa5/0xff, 0x4f/0xff),
763 'tan2': (0xee/0xff, 0x9a/0xff, 0x49/0xff),
764 'tan3': (0xcd/0xff, 0x85/0xff, 0x3f/0xff),
765 'tan4': (0x8b/0xff, 0x5a/0xff, 0x2b/0xff),
766 'thistle': (0xd8/0xff, 0xbf/0xff, 0xd8/0xff),
767 'thistle1': (0xff/0xff, 0xe1/0xff, 0xff/0xff),
768 'thistle2': (0xee/0xff, 0xd2/0xff, 0xee/0xff),
769 'thistle3': (0xcd/0xff, 0xb5/0xff, 0xcd/0xff),
770 'thistle4': (0x8b/0xff, 0x7b/0xff, 0x8b/0xff),
771 'tomato': (0xff/0xff, 0x63/0xff, 0x47/0xff),
772 'tomato1': (0xff/0xff, 0x63/0xff, 0x47/0xff),
773 'tomato2': (0xee/0xff, 0x5c/0xff, 0x42/0xff),
774 'tomato3': (0xcd/0xff, 0x4f/0xff, 0x39/0xff),
775 'tomato4': (0x8b/0xff, 0x36/0xff, 0x26/0xff),
776 'turquoise': (0x40/0xff, 0xe0/0xff, 0xd0/0xff),
777 'turquoise1': (0x00/0xff, 0xf5/0xff, 0xff/0xff),
778 'turquoise2': (0x00/0xff, 0xe5/0xff, 0xee/0xff),
779 'turquoise3': (0x00/0xff, 0xc5/0xff, 0xcd/0xff),
780 'turquoise4': (0x00/0xff, 0x86/0xff, 0x8b/0xff),
781 'violet': (0xee/0xff, 0x82/0xff, 0xee/0xff),
782 'violet red': (0xd0/0xff, 0x20/0xff, 0x90/0xff),
783 'violetred': (0xd0/0xff, 0x20/0xff, 0x90/0xff),
784 'violetred1': (0xff/0xff, 0x3e/0xff, 0x96/0xff),
785 'violetred2': (0xee/0xff, 0x3a/0xff, 0x8c/0xff),
786 'violetred3': (0xcd/0xff, 0x32/0xff, 0x78/0xff),
787 'violetred4': (0x8b/0xff, 0x22/0xff, 0x52/0xff),
788 'wheat': (0xf5/0xff, 0xde/0xff, 0xb3/0xff),
789 'wheat1': (0xff/0xff, 0xe7/0xff, 0xba/0xff),
790 'wheat2': (0xee/0xff, 0xd8/0xff, 0xae/0xff),
791 'wheat3': (0xcd/0xff, 0xba/0xff, 0x96/0xff),
792 'wheat4': (0x8b/0xff, 0x7e/0xff, 0x66/0xff),
793 'white': (0xff/0xff, 0xff/0xff, 0xff/0xff),
794 'white smoke': (0xf5/0xff, 0xf5/0xff, 0xf5/0xff),
795 'whitesmoke': (0xf5/0xff, 0xf5/0xff, 0xf5/0xff),
796 'yellow': (0xff/0xff, 0xff/0xff, 0x00/0xff),
797 'yellow green': (0x9a/0xff, 0xcd/0xff, 0x32/0xff),
798 'yellow1': (0xff/0xff, 0xff/0xff, 0x00/0xff),
799 'yellow2': (0xee/0xff, 0xee/0xff, 0x00/0xff),
800 'yellow3': (0xcd/0xff, 0xcd/0xff, 0x00/0xff),
801 'yellow4': (0x8b/0xff, 0x8b/0xff, 0x00/0xff),
802 'yellowgreen': (0x9a/0xff, 0xcd/0xff, 0x32/0xff)
806 "WAT", "ER ", "PLA", "NET"
810 "304", "570", "325", "6"
818 with cairo.SVGSurface(filename, 512, 512) as surface:
820 cr = cairo.Context(surface);
821 cr.set_font_size(190)
822 cr.select_font_face("sans", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)
823 # Setup RSVG rendering
831 def random_within(max):
832 return max * random()
836 cr.rel_curve_to(-delta/2 + random_within(delta),
837 -delta/2 + random_within(delta),
838 -delta/2 + random_within(delta),
839 -delta/2 + random_within(delta),
840 -delta/2 + random_within(delta),
841 -delta/2 + random_within(delta))
843 def arc(x, y, r, a1, a2):
844 cr.arc(x, y, r, a1, a2)
847 cr.arc(x, y, r, 0, 2 * math.pi)
855 def set_color(color):
858 (r,g,b) = COLORS[color]
861 cr.set_source_rgba(r, g, b, a)
863 def set_random_color():
865 (r,g,b) = rand.choice(list(COLORS.values()))
866 cr.set_source_rgba(r, g, b, a)
868 def set_opacity(opacity):
871 cr.set_source_rgba(r, g, b, a)
879 def line(x, y, dx, dy):
881 cr.rel_line_to(dx, dy)
883 def set_line_width(width):
884 cr.set_line_width(width)
889 # After the submitted code, draw the solution in white, (so it will
890 # only be clearly visible if they've made their drawing big enough).
891 cr.set_source_rgb(1, 1, 1)
893 cr.show_text(hint[user])
894 cr.set_font_size(240)
896 cr.show_text(code[user])
900 svg = rsvg.new_from_file("hand.svg")
904 cr.translate(i%4 * 500, i/4 * 500)
905 cr.rotate(2 * math.pi * random())
911 svg = rsvg.new_from_file("mouth.svg")
915 cr.translate(i%4 * 150, i/4 * 150)
916 cr.rotate(2 * math.pi * random())
922 svg = rsvg.new_from_file("eye.svg")
926 cr.translate(i%4 * 600, i/4 * 600)
927 cr.rotate(2 * math.pi * random())
931 # Run the submitted code
934 # If the answer hasn't been shown yet, show it now
938 web_file = filename.removeprefix(OUTPUT_DIR_PREFIX)