x4js 2.0.28 → 2.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/.vscode/launch.json +14 -0
  2. package/.vscode/settings.json +2 -0
  3. package/ai-comments.txt +97 -0
  4. package/demo/assets/house-light.svg +1 -0
  5. package/demo/assets/radio.svg +4 -0
  6. package/demo/index.html +12 -0
  7. package/demo/main.scss +23 -0
  8. package/demo/main.ts +324 -0
  9. package/demo/package.json +26 -0
  10. package/demo/scss.d.ts +4 -0
  11. package/demo/svg.d.ts +1 -0
  12. package/demo/tsconfig.json +14 -0
  13. package/lib/types/x4js.d.ts +0 -2374
  14. package/package.json +23 -47
  15. package/prepack.mjs +3 -0
  16. package/scripts/prepack.mjs +342 -0
  17. package/src/colors.scss +246 -0
  18. package/src/components/boxes/boxes.module.scss +1 -1
  19. package/src/components/boxes/boxes.ts +139 -28
  20. package/src/components/button/button.ts +80 -33
  21. package/src/components/combobox/combobox.ts +1 -1
  22. package/src/components/dialog/dialog.ts +4 -0
  23. package/src/components/gridview/gridview.ts +104 -6
  24. package/src/components/icon/icon.ts +42 -14
  25. package/src/components/input/input.ts +146 -74
  26. package/src/components/keyboard/keyboard.module.scss +1 -1
  27. package/src/components/keyboard/keyboard.ts +31 -9
  28. package/src/components/label/label.module.scss +9 -0
  29. package/src/components/label/label.ts +10 -6
  30. package/src/components/link/link.module.scss +44 -0
  31. package/src/components/link/link.ts +7 -1
  32. package/src/components/listbox/listbox.module.scss +18 -4
  33. package/src/components/listbox/listbox.ts +32 -12
  34. package/src/components/menu/menu.module.scss +14 -2
  35. package/src/components/menu/menu.ts +1 -1
  36. package/src/components/messages/messages.ts +13 -5
  37. package/src/components/panel/panel.module.scss +7 -0
  38. package/src/components/popup/popup.ts +14 -10
  39. package/src/components/propgrid/propgrid.ts +1 -1
  40. package/src/components/shared.scss +4 -0
  41. package/src/components/spreadsheet/spreadsheet.ts +81 -34
  42. package/src/components/tabs/tabs.module.scss +1 -0
  43. package/src/components/textarea/textarea.ts +8 -2
  44. package/src/components/textedit/textedit.ts +7 -0
  45. package/src/components/themes.scss +2 -0
  46. package/src/components/tooltips/tooltips.ts +15 -3
  47. package/src/core/component.ts +358 -162
  48. package/src/core/core_application.ts +129 -32
  49. package/src/core/core_colors.ts +382 -119
  50. package/src/core/core_data.ts +73 -86
  51. package/src/core/core_dom.ts +10 -0
  52. package/src/core/core_dragdrop.ts +32 -7
  53. package/src/core/core_element.ts +111 -4
  54. package/src/core/core_events.ts +48 -11
  55. package/src/core/core_i18n.ts +2 -0
  56. package/src/core/core_pdf.ts +454 -0
  57. package/src/core/core_router.ts +64 -5
  58. package/src/core/core_state.ts +1 -0
  59. package/src/core/core_styles.ts +11 -12
  60. package/src/core/core_svg.ts +346 -51
  61. package/src/core/core_tools.ts +105 -17
  62. package/src/x4.ts +1 -0
  63. package/src/x4tsx.d.ts +2 -1
  64. package/tsconfig.json +11 -0
  65. package/lib/README.txt +0 -20
  66. package/lib/cjs/x4.css +0 -1
  67. package/lib/cjs/x4.js +0 -2
  68. package/lib/esm/x4.css +0 -1
  69. package/lib/esm/x4.mjs +0 -2
  70. package/lib/styles/x4.css +0 -1
@@ -17,12 +17,12 @@
17
17
  import { clamp, isString } from './core_tools';
18
18
 
19
19
 
20
- function hx( v: number ) {
21
- const hex = v.toString( 16 );
22
- return hex.padStart( 2, '0' );
20
+ function hx(v: number) {
21
+ const hex = v.toString(16);
22
+ return hex.padStart(2, '0');
23
23
  }
24
24
 
25
- function round( v: number ) {
25
+ function round(v: number) {
26
26
  return Math.round(v);
27
27
  }
28
28
 
@@ -44,17 +44,28 @@ export interface Hsv {
44
44
 
45
45
  export class Color {
46
46
 
47
- private rgb: [red:number,green:number,blue:number,alpha:number] = [0,0,0,1];
47
+ private rgb: [red: number, green: number, blue: number, alpha: number] = [0, 0, 0, 1];
48
48
  private invalid = false;
49
49
 
50
- constructor( value: string );
51
- constructor( r: number, g: number, b: number, a?: number );
52
- constructor( ...args: any[] ) {
53
- if( isString(args[0] ) ) {
54
- this.setValue( args[0] );
50
+ /**
51
+ * Creates a new Color instance from a string.
52
+ * @param value - The color string (e.g. "#ff0000", "rgb(255,0,0)").
53
+ */
54
+ constructor(value: string);
55
+ /**
56
+ * Creates a new Color instance from RGB values.
57
+ * @param r - Red component (0-255).
58
+ * @param g - Green component (0-255).
59
+ * @param b - Blue component (0-255).
60
+ * @param a - Alpha component (0-1).
61
+ */
62
+ constructor(r: number, g: number, b: number, a?: number);
63
+ constructor(...args: any[]) {
64
+ if (isString(args[0])) {
65
+ this.setValue(args[0]);
55
66
  }
56
67
  else {
57
- this.setRgb( args[0], args[1], args[2], args[3] );
68
+ this.setRgb(args[0], args[1], args[2], args[3]);
58
69
  }
59
70
  }
60
71
 
@@ -66,72 +77,83 @@ export class Color {
66
77
  * rgb(a,b,c)
67
78
  * rgba(a,b,c,d)
68
79
  * var( --color-5 )
80
+ * cyan
81
+ * transparent
69
82
  */
70
-
71
- setValue( value: string ): this {
72
83
 
73
- this.invalid = false;
74
-
75
- if( value.length==4 && /#[0-9a-fA-F]{3}/.test(value) ) {
76
- const r1 = parseInt( value[1], 16 );
77
- const g1 = parseInt( value[2], 16 );
78
- const b1 = parseInt( value[3], 16 );
79
- return this.setRgb( r1<<4|r1, g1<<4|g1, b1<<4|b1, 1.0 );
80
- }
84
+ setValue(value: string): this {
81
85
 
82
- if( value.length==7 && /#[0-9a-fA-F]{6}/.test(value) ) {
83
- const r1 = parseInt( value[1], 16 );
84
- const r2 = parseInt( value[2], 16 );
85
- const g1 = parseInt( value[3], 16 );
86
- const g2 = parseInt( value[4], 16 );
87
- const b1 = parseInt( value[5], 16 );
88
- const b2 = parseInt( value[6], 16 );
89
- return this.setRgb( r1<<4|r2, g1<<4|g2, b1<<4|b2, 1.0 );
90
- }
86
+ this.invalid = false;
91
87
 
92
- if( value.length==9 && /#[0-9a-fA-F]{8}/.test(value) ) {
93
- const r1 = parseInt( value[1], 16 );
94
- const r2 = parseInt( value[2], 16 );
95
- const g1 = parseInt( value[3], 16 );
96
- const g2 = parseInt( value[4], 16 );
97
- const b1 = parseInt( value[5], 16 );
98
- const b2 = parseInt( value[6], 16 );
99
- const a1 = parseInt( value[7], 16 );
100
- const a2 = parseInt( value[8], 16 );
101
- return this.setRgb( r1<<4|r2, g1<<4|g2, b1<<4|b2, (a1<<4|a2) / 255.0 );
102
- }
88
+ if( value.startsWith('#') ) {
89
+ if (value.length == 7 && /#[0-9a-fA-F]{6}/.test(value)) {
90
+ const hex = parseInt(value.slice(1), 16);
91
+ return this.setRgb( hex >> 16, hex >> 8, hex, 1.0 );
92
+ }
93
+
94
+ if (value.length == 4 && /#[0-9a-fA-F]{3}/.test(value)) {
95
+ const hex = parseInt(value.slice(1), 16);
96
+ return this.setRgb( ((hex >> 8)&0xf)*17, ((hex >> 4)&0xf) * 17, (hex & 0x0F)*17, 1.0 );
97
+ }
103
98
 
104
- if( value.startsWith('rgba') ) {
105
- const re = /rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((\d+)|(\d*\.\d+)|(\.\d+))\s*\)/;
106
- const m = re.exec( value );
107
- if( m ) {
108
- return this.setRgb( parseInt(m[1]), parseInt(m[2]), parseInt(m[3]), parseFloat(m[4]) );
99
+ if (value.length == 9 && /#[0-9a-fA-F]{8}/.test(value)) {
100
+ const hex = parseInt(value.slice(1), 16) >>> 0;
101
+ return this.setRgb( hex >> 24, hex >> 16, hex >> 8, (hex & 0xFF) / 255.0 );
109
102
  }
110
103
  }
111
- else if( value.startsWith('rgb') ) {
112
- const re = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/;
113
- const m = re.exec( value );
114
- if( m ) {
115
- return this.setRgb( parseInt(m[1]), parseInt(m[2]), parseInt(m[3]), 1.0 );
104
+ else {
105
+ value = value.toLowerCase();
106
+
107
+ if (value.startsWith('rgba')) {
108
+ const re = /rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((\d+)|(\d*\.\d+)|(\.\d+))\s*\)/;
109
+ const m = re.exec(value);
110
+ if (m) {
111
+ return this.setRgb(+m[1], +m[2], +m[3], +m[4]);
112
+ }
116
113
  }
117
- }
118
- else if( value.startsWith("var") ) {
119
- const re = /var\s*\(([^)]*)\)/;
120
- const m = re.exec( value );
121
- if( m ) {
122
- const expr = m[1].trim( );
123
- const style = getComputedStyle( document.documentElement );
124
- const value = style.getPropertyValue( expr );
125
- return this.setValue( value );
114
+ else if (value.startsWith('rgb')) {
115
+ const re = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/;
116
+ const m = re.exec(value);
117
+ if (m) {
118
+ return this.setRgb(+m[1], +m[2], +m[3], 1.0);
119
+ }
120
+ }
121
+ else if (value.startsWith("var")) {
122
+ const re = /var\s*\(([^)]*)\)/;
123
+ const m = re.exec(value);
124
+ if (m) {
125
+ const expr = m[1].trim();
126
+ const style = getComputedStyle(document.documentElement);
127
+ const value = style.getPropertyValue(expr);
128
+ return this.setValue(value);
129
+ }
130
+ }
131
+ else {
132
+ const xx = CSS_COLORS[value];
133
+ if( xx!==undefined ) {
134
+ return this.setRgb( xx>>16, xx>>8, xx, 1.0 );
135
+ }
136
+ else if( value=="transparent" ) {
137
+ return this.setRgb( 0, 0, 0, 0 );
138
+ }
126
139
  }
127
140
  }
128
141
 
129
142
  this.invalid = true;
130
- return this.setRgb(255,0,0,1);
143
+ return this.setRgb(255, 0, 0, 1);
131
144
  }
132
145
 
133
- setHsv( h: number, s: number, v: number, a = 1.0 ): this {
134
-
146
+ /**
147
+ * Sets the color using HSV (Hue, Saturation, Value) components.
148
+ *
149
+ * @param h - Hue (0-1).
150
+ * @param s - Saturation (0-1).
151
+ * @param v - Value (0-1).
152
+ * @param a - Alpha (0-1, default 1.0).
153
+ * @returns The current Color instance.
154
+ */
155
+ setHsv(h: number, s: number, v: number, a = 1.0): this {
156
+
135
157
  let i = Math.min(5, Math.floor(h * 6)),
136
158
  f = h * 6 - i,
137
159
  p = v * (1 - s),
@@ -141,70 +163,100 @@ export class Color {
141
163
  let R, G, B;
142
164
 
143
165
  switch (i) {
144
- case 0:
145
- R = v;
146
- G = t;
147
- B = p;
148
- break;
149
- case 1:
150
- R = q;
151
- G = v;
152
- B = p;
153
- break;
154
- case 2:
155
- R = p;
156
- G = v;
157
- B = t;
158
- break;
159
- case 3:
160
- R = p;
161
- G = q;
162
- B = v;
163
- break;
164
- case 4:
165
- R = t;
166
- G = p;
167
- B = v;
168
- break;
169
- case 5:
170
- R = v;
171
- G = p;
172
- B = q;
173
- break;
166
+ case 0:
167
+ R = v;
168
+ G = t;
169
+ B = p;
170
+ break;
171
+ case 1:
172
+ R = q;
173
+ G = v;
174
+ B = p;
175
+ break;
176
+ case 2:
177
+ R = p;
178
+ G = v;
179
+ B = t;
180
+ break;
181
+ case 3:
182
+ R = p;
183
+ G = q;
184
+ B = v;
185
+ break;
186
+ case 4:
187
+ R = t;
188
+ G = p;
189
+ B = v;
190
+ break;
191
+ case 5:
192
+ R = v;
193
+ G = p;
194
+ B = q;
195
+ break;
174
196
  }
175
197
 
176
- return this.setRgb( R*255, G*255, B*255, a );
198
+ return this.setRgb(R * 255, G * 255, B * 255, a);
177
199
  }
178
200
 
179
201
 
180
- setRgb( r: number, g: number, b: number, a: number ): this {
181
- this.rgb = [clamp(r|0,0,255),clamp(g|0,0,255),clamp(b|0,0,255),clamp(a,0,1)];
202
+ /**
203
+ * Sets the color using RGB (Red, Green, Blue) components.
204
+ *
205
+ * @param r - Red component (0-255).
206
+ * @param g - Green component (0-255).
207
+ * @param b - Blue component (0-255).
208
+ * @param a - Alpha component (0-1).
209
+ * @returns The current Color instance.
210
+ */
211
+ setRgb(r: number, g: number, b: number, a: number): this {
212
+ this.rgb = [clamp(r | 0, 0, 255), clamp(g | 0, 0, 255), clamp(b | 0, 0, 255), clamp(a, 0, 1)];
182
213
  return this;
183
214
  }
184
215
 
185
- toRgbString( withAlpha?: boolean ): string {
216
+ /**
217
+ * Returns the CSS string representation of the color.
218
+ *
219
+ * @param withAlpha - Whether to include the alpha channel (default: true if alpha < 1).
220
+ * @returns The CSS color string (e.g. "rgb(255,0,0)" or "rgba(255,0,0,0.5)").
221
+ */
222
+ toRgbString(withAlpha?: boolean): string {
186
223
  const _ = this.rgb;
187
- return withAlpha===false || _[3]==1 ? `rgb(${round(_[0])},${round(_[1])},${round(_[2])})` : `rgba(${round(_[0])},${round(_[1])},${round(_[2])},${_[3].toFixed(3)})`
224
+ return withAlpha === false || _[3] == 1 ? `rgb(${round(_[0])},${round(_[1])},${round(_[2])})` : `rgba(${round(_[0])},${round(_[1])},${round(_[2])},${_[3].toFixed(3)})`
188
225
  }
189
226
 
190
- toHexString( ): string {
227
+ /**
228
+ * Returns the Hex string representation of the color.
229
+ *
230
+ * @returns The hex color string (e.g. "#ff0000" or "#ff000080").
231
+ */
232
+ toHexString(): string {
191
233
  const _ = this.rgb;
192
- return _[3]==1 ? `#${hx(_[0])}${hx(_[1])}${hx(_[2])}` : `#${hx(_[0])}${hx(_[1])}${hx(_[2])}${(hx((_[3]*255)|0))}`
234
+ return _[3] == 1 ? `#${hx(_[0])}${hx(_[1])}${hx(_[2])}` : `#${hx(_[0])}${hx(_[1])}${hx(_[2])}${(hx((_[3] * 255) | 0))}`
193
235
  }
194
236
 
195
- toRgb( ): Rgb {
237
+ /**
238
+ * Returns the color as an RGB object.
239
+ *
240
+ * @returns An object containing red, green, blue, and alpha properties.
241
+ */
242
+ toRgb(): Rgb {
196
243
  const _ = this.rgb;
197
244
  return { red: _[0], green: _[1], blue: _[2], alpha: _[3] };
198
245
  }
199
246
 
200
- toHsv( ): Hsv {
201
-
202
- let el = this.toRgb( );
247
+ /**
248
+ * Converts the color to HSV representation.
249
+ *
250
+ * @returns An object containing hue, saturation, value, and alpha properties.
251
+ */
252
+ toHsv(): Hsv {
253
+
254
+ let el = this.toRgb();
203
255
 
204
256
  el.red /= 255.0;
205
257
  el.green /= 255.0;
206
258
  el.blue /= 255.0;
207
-
259
+
208
260
  const max = Math.max(el.red, el.green, el.blue);
209
261
  const min = Math.min(el.red, el.green, el.blue);
210
262
  const delta = max - min;
@@ -218,33 +270,244 @@ export class Color {
218
270
  }
219
271
  else {
220
272
  switch (max) {
221
- case el.red:
222
- hue = (el.green - el.blue) / delta / 6 + (el.green < el.blue ? 1 : 0);
223
- break;
273
+ case el.red:
274
+ hue = (el.green - el.blue) / delta / 6 + (el.green < el.blue ? 1 : 0);
275
+ break;
224
276
 
225
- case el.green:
226
- hue = (el.blue - el.red) / delta / 6 + 1 / 3;
227
- break;
277
+ case el.green:
278
+ hue = (el.blue - el.red) / delta / 6 + 1 / 3;
279
+ break;
228
280
 
229
- case el.blue:
230
- hue = (el.red - el.green) / delta / 6 + 2 / 3;
231
- break;
281
+ case el.blue:
282
+ hue = (el.red - el.green) / delta / 6 + 2 / 3;
283
+ break;
232
284
  }
233
285
  }
234
286
 
235
287
  return { hue, saturation, value, alpha: el.alpha };
236
288
  }
237
289
 
238
- getAlpha( ) {
290
+ /**
291
+ * return the number value of the color (no transparency)
292
+ */
293
+
294
+ toNumber(): number {
295
+ const _ = this.rgb;
296
+ return ((_[0] << 16) | (_[1] << 8) | _[2]) >>> 0;
297
+ }
298
+
299
+ /**
300
+ * Gets the alpha (transparency) value of the color.
301
+ *
302
+ * @returns The alpha value (0-1).
303
+ */
304
+
305
+ getAlpha() {
239
306
  return this.rgb[3];
240
307
  }
241
308
 
242
- setAlpha( a: number ): this {
243
- this.rgb[3] = clamp( a, 0, 1 );
309
+ /**
310
+ * Sets the alpha (transparency) value of the color.
311
+ *
312
+ * @param a - The new alpha value (0-1).
313
+ * @returns The current Color instance.
314
+ */
315
+ setAlpha(a: number): this {
316
+ this.rgb[3] = clamp(a, 0, 1);
244
317
  return this;
245
318
  }
246
319
 
247
- isInvalid( ) {
320
+ /**
321
+ * Checks if the color is invalid (e.g. failed parsing).
322
+ *
323
+ * @returns True if the color is invalid, false otherwise.
324
+ */
325
+ isInvalid() {
248
326
  return this.invalid;
249
327
  }
250
- }
328
+
329
+ /**
330
+ * Lightens the color by a given percentage.
331
+ *
332
+ * @param percent - The percentage to lighten (0-100).
333
+ * @returns The current Color instance.
334
+ */
335
+ lighten(percent: number) : this {
336
+
337
+ if (percent < 0) {
338
+ percent = 0;
339
+ }
340
+ else if (percent > 100) {
341
+ percent = 100;
342
+ }
343
+
344
+ const factor = percent / 100;
345
+
346
+ const adj = (value: number): number => {
347
+ value = (value + (255 - value) * factor) | 0;
348
+ if (value > 255) {
349
+ value = 255;
350
+ }
351
+ return value;
352
+ };
353
+
354
+ const _ = this.rgb;
355
+ this.rgb = [adj(_[0]), adj(_[1]), adj(_[2]), _[3]];
356
+
357
+ return this;
358
+ }
359
+ }
360
+
361
+
362
+
363
+
364
+ const CSS_COLORS: Record<string, number> = {
365
+ aliceblue: 0xF0F8FF,
366
+ antiquewhite: 0xFAEBD7,
367
+ aqua: 0x00FFFF,
368
+ aquamarine: 0x7FFFD4,
369
+ azure: 0xF0FFFF,
370
+ beige: 0xF5F5DC,
371
+ bisque: 0xFFE4C4,
372
+ black: 0x000000,
373
+ blanchedalmond: 0xFFEBCD,
374
+ blue: 0x0000FF,
375
+ blueviolet: 0x8A2BE2,
376
+ brown: 0xA52A2A,
377
+ burlywood: 0xDEB887,
378
+ cadetblue: 0x5F9EA0,
379
+ chartreuse: 0x7FFF00,
380
+ chocolate: 0xD2691E,
381
+ coral: 0xFF7F50,
382
+ cornflowerblue: 0x6495ED,
383
+ cornsilk: 0xFFF8DC,
384
+ crimson: 0xDC143C,
385
+ cyan: 0x00FFFF,
386
+ darkblue: 0x00008B,
387
+ darkcyan: 0x008B8B,
388
+ darkgoldenrod: 0xB8860B,
389
+ darkgray: 0xA9A9A9,
390
+ darkgreen: 0x006400,
391
+ darkgrey: 0xA9A9A9,
392
+ darkkhaki: 0xBDB76B,
393
+ darkmagenta: 0x8B008B,
394
+ darkolivegreen: 0x556B2F,
395
+ darkorange: 0xFF8C00,
396
+ darkorchid: 0x9932CC,
397
+ darkred: 0x8B0000,
398
+ darksalmon: 0xE9967A,
399
+ darkseagreen: 0x8FBC8F,
400
+ darkslateblue: 0x483D8B,
401
+ darkslategray: 0x2F4F4F,
402
+ darkslategrey: 0x2F4F4F,
403
+ darkturquoise: 0x00CED1,
404
+ darkviolet: 0x9400D3,
405
+ deeppink: 0xFF1493,
406
+ deepskyblue: 0x00BFFF,
407
+ dimgray: 0x696969,
408
+ dimgrey: 0x696969,
409
+ dodgerblue: 0x1E90FF,
410
+ firebrick: 0xB22222,
411
+ floralwhite: 0xFFFAF0,
412
+ forestgreen: 0x228B22,
413
+ fuchsia: 0xFF00FF,
414
+ gainsboro: 0xDCDCDC,
415
+ ghostwhite: 0xF8F8FF,
416
+ gold: 0xFFD700,
417
+ goldenrod: 0xDAA520,
418
+ gray: 0x808080,
419
+ green: 0x008000,
420
+ greenyellow: 0xADFF2F,
421
+ grey: 0x808080,
422
+ honeydew: 0xF0FFF0,
423
+ hotpink: 0xFF69B4,
424
+ indianred: 0xCD5C5C,
425
+ indigo: 0x4B0082,
426
+ ivory: 0xFFFFF0,
427
+ khaki: 0xF0E68C,
428
+ lavender: 0xE6E6FA,
429
+ lavenderblush: 0xFFF0F5,
430
+ lawngreen: 0x7CFC00,
431
+ lemonchiffon: 0xFFFACD,
432
+ lightblue: 0xADD8E6,
433
+ lightcoral: 0xF08080,
434
+ lightcyan: 0xE0FFFF,
435
+ lightgoldenrodyellow: 0xFAFAD2,
436
+ lightgray: 0xD3D3D3,
437
+ lightgreen: 0x90EE90,
438
+ lightgrey: 0xD3D3D3,
439
+ lightpink: 0xFFB6C1,
440
+ lightsalmon: 0xFFA07A,
441
+ lightseagreen: 0x20B2AA,
442
+ lightskyblue: 0x87CEFA,
443
+ lightslategray: 0x778899,
444
+ lightslategrey: 0x778899,
445
+ lightsteelblue: 0xB0C4DE,
446
+ lightyellow: 0xFFFFE0,
447
+ lime: 0x00FF00,
448
+ limegreen: 0x32CD32,
449
+ linen: 0xFAF0E6,
450
+ magenta: 0xFF00FF,
451
+ maroon: 0x800000,
452
+ mediumaquamarine: 0x66CDAA,
453
+ mediumblue: 0x0000CD,
454
+ mediumorchid: 0xBA55D3,
455
+ mediumpurple: 0x9370DB,
456
+ mediumseagreen: 0x3CB371,
457
+ mediumslateblue: 0x7B68EE,
458
+ mediumspringgreen: 0x00FA9A,
459
+ mediumturquoise: 0x48D1CC,
460
+ mediumvioletred: 0xC71585,
461
+ midnightblue: 0x191970,
462
+ mintcream: 0xF5FFFA,
463
+ mistyrose: 0xFFE4E1,
464
+ moccasin: 0xFFE4B5,
465
+ navajowhite: 0xFFDEAD,
466
+ navy: 0x000080,
467
+ oldlace: 0xFDF5E6,
468
+ olive: 0x808000,
469
+ olivedrab: 0x6B8E23,
470
+ orange: 0xFFA500,
471
+ orangered: 0xFF4500,
472
+ orchid: 0xDA70D6,
473
+ palegoldenrod: 0xEEE8AA,
474
+ palegreen: 0x98FB98,
475
+ paleturquoise: 0xAFEEEE,
476
+ palevioletred: 0xDB7093,
477
+ papayawhip: 0xFFEFD5,
478
+ peachpuff: 0xFFDAB9,
479
+ peru: 0xCD853F,
480
+ pink: 0xFFC0CB,
481
+ plum: 0xDDA0DD,
482
+ powderblue: 0xB0E0E6,
483
+ purple: 0x800080,
484
+ rebeccapurple: 0x663399,
485
+ red: 0xFF0000,
486
+ rosybrown: 0xBC8F8F,
487
+ royalblue: 0x4169E1,
488
+ saddlebrown: 0x8B4513,
489
+ salmon: 0xFA8072,
490
+ sandybrown: 0xF4A460,
491
+ seagreen: 0x2E8B57,
492
+ seashell: 0xFFF5EE,
493
+ sienna: 0xA0522D,
494
+ silver: 0xC0C0C0,
495
+ skyblue: 0x87CEEB,
496
+ slateblue: 0x6A5ACD,
497
+ slategray: 0x708090,
498
+ slategrey: 0x708090,
499
+ snow: 0xFFFAFA,
500
+ springgreen: 0x00FF7F,
501
+ steelblue: 0x4682B4,
502
+ tan: 0xD2B48C,
503
+ teal: 0x008080,
504
+ thistle: 0xD8BFD8,
505
+ tomato: 0xFF6347,
506
+ turquoise: 0x40E0D0,
507
+ violet: 0xEE82EE,
508
+ wheat: 0xF5DEB3,
509
+ white: 0xFFFFFF,
510
+ whitesmoke: 0xF5F5F5,
511
+ yellow: 0xFFFF00,
512
+ yellowgreen: 0x9ACD32
513
+ };