plotboilerplate 1.24.0 → 1.26.0

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 (222) hide show
  1. package/README.md +14 -1
  2. package/dist/index.esm.js +433 -162
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.esm.min.js +1 -1
  5. package/dist/index.esm.min.js.map +1 -1
  6. package/dist/plotboilerplate.browser.min.js +1 -1
  7. package/dist/plotboilerplate.browser.min.js.map +1 -1
  8. package/dist/plotboilerplate.js +12312 -12041
  9. package/dist/plotboilerplate.min.js +1 -1
  10. package/package.json +9 -5
  11. package/src/cjs/Bounds.d.ts +79 -25
  12. package/src/cjs/Bounds.js +102 -29
  13. package/src/cjs/Bounds.js.map +1 -1
  14. package/src/cjs/CircleSector.d.ts +3 -0
  15. package/src/cjs/CircleSector.js +28 -1
  16. package/src/cjs/CircleSector.js.map +1 -1
  17. package/src/cjs/PlotBoilerplate.d.ts +37 -6
  18. package/src/cjs/PlotBoilerplate.js +222 -116
  19. package/src/cjs/PlotBoilerplate.js.map +1 -1
  20. package/src/cjs/Polygon.d.ts +26 -7
  21. package/src/cjs/Polygon.js +56 -10
  22. package/src/cjs/Polygon.js.map +1 -1
  23. package/src/cjs/Triangle.js +2 -2
  24. package/src/cjs/Triangle.js.map +1 -1
  25. package/src/cjs/Vertex.d.ts +15 -3
  26. package/src/cjs/Vertex.js +18 -1
  27. package/src/cjs/Vertex.js.map +1 -1
  28. package/src/cjs/drawutilssvg.d.ts +2 -1
  29. package/src/cjs/drawutilssvg.js +9 -3
  30. package/src/cjs/drawutilssvg.js.map +1 -1
  31. package/src/cjs/interfaces/core.d.ts +28 -0
  32. package/src/cjs/interfaces/core.js +2 -0
  33. package/src/cjs/interfaces/core.js.map +1 -1
  34. package/src/cjs/utils/LissajousFigure.d.ts +34 -0
  35. package/src/cjs/utils/LissajousFigure.js +100 -0
  36. package/src/cjs/utils/LissajousFigure.js.map +1 -0
  37. package/src/cjs/utils/PerlinNoise.d.ts +19 -0
  38. package/src/cjs/utils/PerlinNoise.js +352 -0
  39. package/src/cjs/utils/PerlinNoise.js.map +1 -0
  40. package/src/cjs/utils/SVGPathUtils.d.ts +22 -0
  41. package/src/cjs/utils/SVGPathUtils.js +45 -0
  42. package/src/cjs/utils/SVGPathUtils.js.map +1 -0
  43. package/src/cjs/utils/algorithms/pixelCornersToRoundPaths.d.ts +23 -0
  44. package/src/cjs/utils/algorithms/pixelCornersToRoundPaths.js +270 -0
  45. package/src/cjs/utils/algorithms/pixelCornersToRoundPaths.js.map +1 -0
  46. package/src/cjs/utils/datastructures/Color.d.ts +147 -1
  47. package/src/cjs/utils/datastructures/Color.js +385 -41
  48. package/src/cjs/utils/datastructures/Color.js.map +1 -1
  49. package/src/cjs/utils/datastructures/ColorGradient.d.ts +79 -0
  50. package/src/cjs/utils/datastructures/ColorGradient.js +171 -0
  51. package/src/cjs/utils/datastructures/ColorGradient.js.map +1 -0
  52. package/src/cjs/utils/datastructures/DataGrid2d.d.ts +6 -0
  53. package/src/cjs/utils/datastructures/DataGrid2dArrayMatrix.d.ts +88 -0
  54. package/src/cjs/utils/datastructures/DataGrid2dArrayMatrix.js +155 -0
  55. package/src/cjs/utils/datastructures/DataGrid2dArrayMatrix.js.map +1 -0
  56. package/src/cjs/utils/datastructures/DataGrid2dListAdapter.d.ts +1 -7
  57. package/src/cjs/utils/datastructures/DataGrid2dListAdapter.js +3 -3
  58. package/src/cjs/utils/datastructures/DataGrid2dListAdapter.js.map +1 -1
  59. package/src/cjs/utils/datastructures/GeometryMesh.d.ts +49 -0
  60. package/src/cjs/utils/datastructures/GeometryMesh.js +58 -0
  61. package/src/cjs/utils/datastructures/GeometryMesh.js.map +1 -0
  62. package/src/cjs/utils/detectDarkMode.js +16 -7
  63. package/src/cjs/utils/detectDarkMode.js.map +1 -1
  64. package/src/cjs/utils/dom/components/ColorGradientPicker.d.ts +246 -0
  65. package/src/cjs/utils/dom/components/ColorGradientPicker.js +667 -0
  66. package/src/cjs/utils/dom/components/ColorGradientPicker.js.map +1 -0
  67. package/src/cjs/utils/dom/components/ColorGradientPickerJSX.d.ts +129 -0
  68. package/src/cjs/utils/dom/components/ColorGradientPickerJSX.js +520 -0
  69. package/src/cjs/utils/dom/components/ColorGradientPickerJSX.js.map +1 -0
  70. package/src/cjs/utils/dom/components/ColorGradientSelector.d.ts +118 -0
  71. package/src/cjs/utils/dom/components/ColorGradientSelector.js +327 -0
  72. package/src/cjs/utils/dom/components/ColorGradientSelector.js.map +1 -0
  73. package/src/cjs/utils/dom/components/Test.d.ts +7 -0
  74. package/src/cjs/utils/dom/components/Test.js +30 -0
  75. package/src/cjs/utils/dom/components/Test.js.map +1 -0
  76. package/src/cjs/utils/dom/guiSizeToggler.js +1 -1
  77. package/src/cjs/utils/dom/guiSizeToggler.js.map +1 -1
  78. package/src/cjs/utils/helpers/BezierPathInteractionHelper.d.ts +9 -3
  79. package/src/cjs/utils/helpers/BezierPathInteractionHelper.js +20 -13
  80. package/src/cjs/utils/helpers/BezierPathInteractionHelper.js.map +1 -1
  81. package/src/cjs/utils/helpers/CircleHelper.d.ts +10 -1
  82. package/src/cjs/utils/helpers/CircleHelper.js +13 -2
  83. package/src/cjs/utils/helpers/CircleHelper.js.map +1 -1
  84. package/src/cjs/utils/helpers/CircleSectorHelper.d.ts +2 -2
  85. package/src/cjs/utils/helpers/CircleSectorHelper.js +1 -0
  86. package/src/cjs/utils/helpers/CircleSectorHelper.js.map +1 -1
  87. package/src/cjs/utils/helpers/TriangleHelper.d.ts +57 -0
  88. package/src/cjs/utils/helpers/TriangleHelper.js +83 -0
  89. package/src/cjs/utils/helpers/TriangleHelper.js.map +1 -0
  90. package/src/cjs/utils/helpers/VEllipseHelper.d.ts +6 -4
  91. package/src/cjs/utils/helpers/VEllipseHelper.js +4 -2
  92. package/src/cjs/utils/helpers/VEllipseHelper.js.map +1 -1
  93. package/src/cjs/utils/helpers/VEllipseSectorHelper.d.ts +3 -2
  94. package/src/cjs/utils/helpers/VEllipseSectorHelper.js +1 -0
  95. package/src/cjs/utils/helpers/VEllipseSectorHelper.js.map +1 -1
  96. package/src/cjs/utils/parsers/LinearColorGradientParser.d.ts +78 -0
  97. package/src/cjs/utils/parsers/LinearColorGradientParser.js +224 -0
  98. package/src/cjs/utils/parsers/LinearColorGradientParser.js.map +1 -0
  99. package/src/cjs/utils/parsers/svg/types.d.ts +8 -8
  100. package/src/createDemoDrawables.js +1 -0
  101. package/src/esm/Bounds.d.ts +79 -25
  102. package/src/esm/Bounds.js +102 -29
  103. package/src/esm/Bounds.js.map +1 -1
  104. package/src/esm/CircleSector.d.ts +3 -0
  105. package/src/esm/CircleSector.js +28 -1
  106. package/src/esm/CircleSector.js.map +1 -1
  107. package/src/esm/PlotBoilerplate.d.ts +37 -6
  108. package/src/esm/PlotBoilerplate.js +222 -116
  109. package/src/esm/PlotBoilerplate.js.map +1 -1
  110. package/src/esm/Polygon.d.ts +26 -7
  111. package/src/esm/Polygon.js +53 -10
  112. package/src/esm/Polygon.js.map +1 -1
  113. package/src/esm/Triangle.js +2 -2
  114. package/src/esm/Triangle.js.map +1 -1
  115. package/src/esm/Vertex.d.ts +15 -3
  116. package/src/esm/Vertex.js +18 -1
  117. package/src/esm/Vertex.js.map +1 -1
  118. package/src/esm/drawutilssvg.d.ts +2 -1
  119. package/src/esm/drawutilssvg.js +9 -3
  120. package/src/esm/drawutilssvg.js.map +1 -1
  121. package/src/esm/interfaces/core.d.ts +28 -0
  122. package/src/esm/interfaces/core.js +2 -0
  123. package/src/esm/interfaces/core.js.map +1 -1
  124. package/src/esm/utils/LissajousFigure.d.ts +34 -0
  125. package/src/esm/utils/LissajousFigure.js +95 -0
  126. package/src/esm/utils/LissajousFigure.js.map +1 -0
  127. package/src/esm/utils/PerlinNoise.d.ts +19 -0
  128. package/src/esm/utils/PerlinNoise.js +346 -0
  129. package/src/esm/utils/PerlinNoise.js.map +1 -0
  130. package/src/esm/utils/SVGPathUtils.d.ts +22 -0
  131. package/src/esm/utils/SVGPathUtils.js +42 -0
  132. package/src/esm/utils/SVGPathUtils.js.map +1 -0
  133. package/src/esm/utils/algorithms/pixelCornersToRoundPaths.d.ts +23 -0
  134. package/src/esm/utils/algorithms/pixelCornersToRoundPaths.js +266 -0
  135. package/src/esm/utils/algorithms/pixelCornersToRoundPaths.js.map +1 -0
  136. package/src/esm/utils/datastructures/Color.d.ts +147 -1
  137. package/src/esm/utils/datastructures/Color.js +386 -42
  138. package/src/esm/utils/datastructures/Color.js.map +1 -1
  139. package/src/esm/utils/datastructures/ColorGradient.d.ts +79 -0
  140. package/src/esm/utils/datastructures/ColorGradient.js +166 -0
  141. package/src/esm/utils/datastructures/ColorGradient.js.map +1 -0
  142. package/src/esm/utils/datastructures/DataGrid2d.d.ts +6 -0
  143. package/src/esm/utils/datastructures/DataGrid2dArrayMatrix.d.ts +88 -0
  144. package/src/esm/utils/datastructures/DataGrid2dArrayMatrix.js +150 -0
  145. package/src/esm/utils/datastructures/DataGrid2dArrayMatrix.js.map +1 -0
  146. package/src/esm/utils/datastructures/DataGrid2dListAdapter.d.ts +1 -7
  147. package/src/esm/utils/datastructures/DataGrid2dListAdapter.js +3 -3
  148. package/src/esm/utils/datastructures/DataGrid2dListAdapter.js.map +1 -1
  149. package/src/esm/utils/datastructures/GeometryMesh.d.ts +49 -0
  150. package/src/esm/utils/datastructures/GeometryMesh.js +53 -0
  151. package/src/esm/utils/datastructures/GeometryMesh.js.map +1 -0
  152. package/src/esm/utils/detectDarkMode.js +16 -7
  153. package/src/esm/utils/detectDarkMode.js.map +1 -1
  154. package/src/esm/utils/dom/components/ColorGradientPicker.d.ts +246 -0
  155. package/src/esm/utils/dom/components/ColorGradientPicker.js +743 -0
  156. package/src/esm/utils/dom/components/ColorGradientPicker.js.map +1 -0
  157. package/src/esm/utils/dom/components/ColorGradientPickerJSX.d.ts +129 -0
  158. package/src/esm/utils/dom/components/ColorGradientPickerJSX.js +582 -0
  159. package/src/esm/utils/dom/components/ColorGradientPickerJSX.js.map +1 -0
  160. package/src/esm/utils/dom/components/ColorGradientSelector.d.ts +118 -0
  161. package/src/esm/utils/dom/components/ColorGradientSelector.js +339 -0
  162. package/src/esm/utils/dom/components/ColorGradientSelector.js.map +1 -0
  163. package/src/esm/utils/dom/components/Test.d.ts +7 -0
  164. package/src/esm/utils/dom/components/Test.js +26 -0
  165. package/src/esm/utils/dom/components/Test.js.map +1 -0
  166. package/src/esm/utils/dom/guiSizeToggler.js +1 -1
  167. package/src/esm/utils/dom/guiSizeToggler.js.map +1 -1
  168. package/src/esm/utils/helpers/BezierPathInteractionHelper.d.ts +9 -3
  169. package/src/esm/utils/helpers/BezierPathInteractionHelper.js +20 -13
  170. package/src/esm/utils/helpers/BezierPathInteractionHelper.js.map +1 -1
  171. package/src/esm/utils/helpers/CircleHelper.d.ts +10 -1
  172. package/src/esm/utils/helpers/CircleHelper.js +13 -2
  173. package/src/esm/utils/helpers/CircleHelper.js.map +1 -1
  174. package/src/esm/utils/helpers/CircleSectorHelper.d.ts +2 -2
  175. package/src/esm/utils/helpers/CircleSectorHelper.js +1 -0
  176. package/src/esm/utils/helpers/CircleSectorHelper.js.map +1 -1
  177. package/src/esm/utils/helpers/TriangleHelper.d.ts +57 -0
  178. package/src/esm/utils/helpers/TriangleHelper.js +78 -0
  179. package/src/esm/utils/helpers/TriangleHelper.js.map +1 -0
  180. package/src/esm/utils/helpers/VEllipseHelper.d.ts +6 -4
  181. package/src/esm/utils/helpers/VEllipseHelper.js +4 -2
  182. package/src/esm/utils/helpers/VEllipseHelper.js.map +1 -1
  183. package/src/esm/utils/helpers/VEllipseSectorHelper.d.ts +3 -2
  184. package/src/esm/utils/helpers/VEllipseSectorHelper.js +1 -0
  185. package/src/esm/utils/helpers/VEllipseSectorHelper.js.map +1 -1
  186. package/src/esm/utils/parsers/LinearColorGradientParser.d.ts +78 -0
  187. package/src/esm/utils/parsers/LinearColorGradientParser.js +217 -0
  188. package/src/esm/utils/parsers/LinearColorGradientParser.js.map +1 -0
  189. package/src/esm/utils/parsers/svg/types.d.ts +8 -8
  190. package/src/external.d.ts +9 -0
  191. package/src/ts/Bounds.ts +107 -22
  192. package/src/ts/CircleSector.ts +39 -6
  193. package/src/ts/PlotBoilerplate.ts +233 -105
  194. package/src/ts/Polygon.ts +68 -14
  195. package/src/ts/Triangle.ts +2 -2
  196. package/src/ts/Vertex.ts +21 -3
  197. package/src/ts/drawutilssvg.ts +8 -3
  198. package/src/ts/interfaces/core.ts +31 -0
  199. package/src/ts/utils/LissajousFigure.ts +110 -0
  200. package/src/ts/utils/PerlinNoise.ts +368 -0
  201. package/src/ts/utils/SVGPathUtils.ts +55 -0
  202. package/src/ts/utils/algorithms/pixelCornersToRoundPaths.ts +379 -0
  203. package/src/ts/utils/datastructures/Color.ts +423 -44
  204. package/src/ts/utils/datastructures/ColorGradient.ts +196 -0
  205. package/src/ts/utils/datastructures/DataGrid2d.ts +7 -0
  206. package/src/ts/utils/datastructures/DataGrid2dArrayMatrix.ts +182 -0
  207. package/src/ts/utils/datastructures/DataGrid2dListAdapter.ts +4 -11
  208. package/src/ts/utils/datastructures/GeometryMesh.ts +79 -0
  209. package/src/ts/utils/detectDarkMode.ts +17 -8
  210. package/src/ts/utils/dom/components/ColorGradientPicker.tsx +889 -0
  211. package/src/ts/utils/dom/components/ColorGradientSelector.tsx +452 -0
  212. package/src/ts/utils/dom/components/Test.tsx +44 -0
  213. package/src/ts/utils/dom/components/_ColorGradientPicker_raw.ts_ +392 -0
  214. package/src/ts/utils/dom/guiSizeToggler.ts +1 -1
  215. package/src/ts/utils/helpers/BezierPathInteractionHelper.ts +25 -15
  216. package/src/ts/utils/helpers/CircleHelper.ts +17 -3
  217. package/src/ts/utils/helpers/CircleSectorHelper.ts +4 -2
  218. package/src/ts/utils/helpers/TriangleHelper.ts +102 -0
  219. package/src/ts/utils/helpers/VEllipseHelper.ts +6 -4
  220. package/src/ts/utils/helpers/VEllipseSectorHelper.ts +3 -2
  221. package/src/ts/utils/parsers/LinearColorGradientParser.ts +297 -0
  222. package/src/ts/utils/parsers/svg/types.ts +8 -8
@@ -18,7 +18,12 @@
18
18
  * @modified 2022-05-11 Fixed the `interpolate` function.
19
19
  * @modified 2023-01-23 Added `Color.set(Color)` function to set all values (r,g,b,h,s,l,a) simultanoeusly.
20
20
  * @modified 2024-03-10 Fixed some NaN type check for Typescript 5 compatibility.
21
- * @version 0.0.13
21
+ * @modified 2025-08-08 Fixed an issue in the static `makeRGB` method: values in [0..1] are now correctly reconized (1.0 was excluded).
22
+ * @modified 2025-08-08 Added static color instances (singletons): Color.Red, Color.Gold, Color.Yellow, Color.Green, Color.LimeGreen, Color.Blue, Color.MediumBlue, Color.Purple.
23
+ * @modified 2025-09-01 Adding all standard web colors. Source: https://en.wikipedia.org/wiki/Web_colors
24
+ * @modified 2025-09-01 Modifying the `Sanitizer.RGB` helper method: recognoizing 0 to 255 as valid values (not only 1 to 255).
25
+ * @modified 2025-09-01 Modifying the `Color.parse` method: recognizing CSS color strings now.
26
+ * @version 0.0.14
22
27
  **/
23
28
  /**
24
29
  * @classdesc A color class, inspired by neolitec's Javascript class.
@@ -256,7 +261,7 @@ export class Color {
256
261
  // }
257
262
  saturate(v) {
258
263
  // if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
259
- if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN(v = parseInt(v))) {
264
+ if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
260
265
  this.s += (1 - this.s) * (v / 100);
261
266
  }
262
267
  else if ("number" == typeof v) {
@@ -281,7 +286,7 @@ export class Color {
281
286
  }
282
287
  desaturate(v) {
283
288
  // if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
284
- if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN(v = parseInt(v))) {
289
+ if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
285
290
  this.s -= v / 100;
286
291
  }
287
292
  else if ("number" == typeof v) {
@@ -325,7 +330,7 @@ export class Color {
325
330
  // }
326
331
  lighten(v) {
327
332
  // if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
328
- if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN(v = parseInt(v))) {
333
+ if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
329
334
  this.l += (1 - this.l) * (v / 100);
330
335
  }
331
336
  else if ("number" == typeof v) {
@@ -350,7 +355,7 @@ export class Color {
350
355
  }
351
356
  darken(v) {
352
357
  // if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
353
- if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN(v = parseInt(v))) {
358
+ if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
354
359
  this.l -= this.l * (v / 100);
355
360
  }
356
361
  else if ("number" == typeof v) {
@@ -375,7 +380,7 @@ export class Color {
375
380
  }
376
381
  fadein(v) {
377
382
  // if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
378
- if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN(v = parseInt(v))) {
383
+ if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
379
384
  this.a += (1 - this.a) * (v / 100);
380
385
  }
381
386
  else if ("number" == typeof v) {
@@ -401,7 +406,7 @@ export class Color {
401
406
  }
402
407
  fadeout(v) {
403
408
  // if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) {
404
- if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN(v = parseInt(v))) {
409
+ if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
405
410
  this.a -= v / 100;
406
411
  }
407
412
  else if ("number" == typeof v) {
@@ -426,15 +431,16 @@ export class Color {
426
431
  }
427
432
  spin(v) {
428
433
  // if ("string" == typeof v && v.indexOf("%") > -1 && (v = parseInt(v)) != NaN) this.h += v / 100;
429
- if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN(v = parseInt(v))) {
434
+ if ("string" == typeof v && v.indexOf("%") > -1 && !Number.isNaN((v = parseInt(v)))) {
430
435
  this.h += v / 100;
431
436
  }
432
437
  else if ("number" == typeof v) {
433
438
  // range 360
434
439
  this.h += v / 360;
435
440
  }
436
- else
441
+ else {
437
442
  throw new Error("error: bad modifier format (percent or number)");
443
+ }
438
444
  if (this.h > 1)
439
445
  this.h = 1;
440
446
  else if (this.h < 0)
@@ -445,14 +451,15 @@ export class Color {
445
451
  static makeRGB(...args) {
446
452
  const c = new Color();
447
453
  let sanitized;
448
- if (arguments.length < 3 || arguments.length > 4)
454
+ if (args.length < 3 || args.length > 4) {
449
455
  throw new Error("error: 3 or 4 arguments");
450
- sanitized = Color.Sanitizer.RGB(arguments[0], arguments[1], arguments[2]);
456
+ }
457
+ sanitized = Color.Sanitizer.RGB(args[0], args[1], args[2]);
451
458
  c.r = sanitized[0];
452
459
  c.g = sanitized[1];
453
460
  c.b = sanitized[2];
454
- if (arguments.length == 4) {
455
- c.a = arguments[3];
461
+ if (args.length == 4) {
462
+ c.a = args[3];
456
463
  }
457
464
  else {
458
465
  c.a = 1.0;
@@ -463,16 +470,19 @@ export class Color {
463
470
  static makeHSL(...args) {
464
471
  const c = new Color();
465
472
  let sanitized;
466
- if (arguments.length < 3 || arguments.length > 4)
473
+ if (args.length < 3 || args.length > 4) {
467
474
  throw new Error("error: 3 or 4 arguments");
468
- sanitized = Color.Sanitizer.HSL(arguments[0], arguments[1], arguments[2]);
475
+ }
476
+ sanitized = Color.Sanitizer.HSL(args[0], args[1], args[2]);
469
477
  c.h = sanitized[0];
470
478
  c.s = sanitized[1];
471
479
  c.l = sanitized[2];
472
- if (arguments.length == 4)
473
- c.a = arguments[3];
474
- else
480
+ if (args.length == 4) {
481
+ c.a = typeof args[3] === "string" ? Number.parseFloat(args[3]) : args[3];
482
+ }
483
+ else {
475
484
  c.a = 1.0;
485
+ }
476
486
  Color.Converter.HSLToRGB(c);
477
487
  return c;
478
488
  }
@@ -480,8 +490,9 @@ export class Color {
480
490
  var c = new Color(), sanitized;
481
491
  // Edit Ika 2018-0308
482
492
  // Allow leading '#'
483
- if (value && value.startsWith("#"))
493
+ if (value && value.startsWith("#")) {
484
494
  value = value.substr(1);
495
+ }
485
496
  Color.Validator.checkHEX(value);
486
497
  if (value.length == 3) {
487
498
  sanitized = Color.Sanitizer.RGB(parseInt(value.substr(0, 1) + value.substr(0, 1), 16), parseInt(value.substr(1, 1) + value.substr(1, 1), 16), parseInt(value.substr(2, 1) + value.substr(2, 1), 16));
@@ -489,8 +500,9 @@ export class Color {
489
500
  else if (value.length == 6) {
490
501
  sanitized = Color.Sanitizer.RGB(parseInt(value.substr(0, 2), 16), parseInt(value.substr(2, 2), 16), parseInt(value.substr(4, 2), 16));
491
502
  }
492
- else
503
+ else {
493
504
  throw new Error("error: 3 or 6 arguments");
505
+ }
494
506
  c.r = sanitized[0];
495
507
  c.g = sanitized[1];
496
508
  c.b = sanitized[2];
@@ -514,8 +526,9 @@ export class Color {
514
526
  if ((str = str.trim().toLowerCase()).length == 0) {
515
527
  return null;
516
528
  }
517
- if (str.startsWith("#"))
529
+ if (str.startsWith("#")) {
518
530
  return Color.makeHEX(str.substring(1, str.length));
531
+ }
519
532
  if (str.startsWith("rgb")) {
520
533
  var parts = str.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(\d*(?:\.\d+\s*)?)\)$/);
521
534
  if (!parts) {
@@ -530,9 +543,23 @@ export class Color {
530
543
  return Color.makeRGB(parts[1], parts[2], parts[3], Number(parts[4]));
531
544
  }
532
545
  }
533
- else {
534
- throw "Unrecognized color format (1): " + str;
546
+ // Try to locate by CSS color name
547
+ const keys = Object.keys(Color.CSS_COLORS);
548
+ const cssColorKey = keys.reduce((prevKey, curKey) => {
549
+ if (curKey && curKey.toLowerCase() === str.toLowerCase()) {
550
+ return curKey;
551
+ }
552
+ return prevKey;
553
+ }, null);
554
+ if (cssColorKey) {
555
+ const cssColor = Color.CSS_COLORS[cssColorKey];
556
+ // console.log("cssColor?", cssColor, str, cssColorKey);
557
+ if (cssColor) {
558
+ // console.log("CONSTRUCTOR?", cssColor.constructor);
559
+ return cssColor.clone();
560
+ }
535
561
  }
562
+ throw "Unrecognized color format (1): " + str;
536
563
  }
537
564
  /**
538
565
  * Create a clone of this color (RGB).
@@ -573,17 +600,17 @@ export class Color {
573
600
  }
574
601
  } // END class
575
602
  Color.Sanitizer = {
576
- RGB: function (...args) {
603
+ RGB: (...args) => {
577
604
  var o = [];
578
- if (arguments.length == 0) {
605
+ if (args.length == 0) {
579
606
  return [];
580
607
  }
581
608
  // const allAreFrac = Color.testFrac( arguments );
582
- for (var i = 0; i < arguments.length; i++) {
583
- var c = arguments[i];
609
+ for (var i = 0; i < args.length; i++) {
610
+ var c = args[i];
584
611
  if ("string" == typeof c && c.indexOf("%") > -1) {
585
612
  // if ((c = parseInt(c)) == NaN) throw new Error("Bad format");
586
- if (Number.isNaN(c = parseInt(c))) {
613
+ if (Number.isNaN((c = parseInt(c)))) {
587
614
  throw new Error("Bad format");
588
615
  }
589
616
  if (c < 0 || c > 100)
@@ -592,18 +619,18 @@ Color.Sanitizer = {
592
619
  }
593
620
  else {
594
621
  // if ("string" == typeof c && (c = parseInt(c)) == NaN) {
595
- if ("string" == typeof c && Number.isNaN(c = parseInt(c))) {
622
+ if ("string" == typeof c && Number.isNaN((c = parseInt(c)))) {
596
623
  throw new Error("Bad format");
597
624
  }
598
625
  if (c < 0) {
599
626
  throw new Error("Bad format");
600
627
  }
601
628
  //else if( allAreFrac ) o[i] = c; // c >= 0 && c <= 1 (all)
602
- else if (c >= 0 && c < 1) {
629
+ else if (c >= 0 && c <= 1) {
603
630
  o[i] = c;
604
631
  }
605
632
  // else if(c >= 0.0 && c <= 1.0) o[i] = c;
606
- else if (c >= 1 && c < 256) {
633
+ else if (c >= 0 && c < 256) {
607
634
  o[i] = c / 255;
608
635
  }
609
636
  // ???
@@ -615,11 +642,12 @@ Color.Sanitizer = {
615
642
  return o;
616
643
  },
617
644
  HSL: function (...args) {
618
- if (arguments.length < 3 || arguments.length > 4)
645
+ if (args.length < 3 || args.length > 4) {
619
646
  throw new Error("3 or 4 arguments required");
620
- var h = arguments[0], s = arguments[1], l = arguments[2];
647
+ }
648
+ var h = args[0], s = args[1], l = args[2];
621
649
  // if ("string" == typeof h && (h = parseFloat(h)) == NaN) throw new Error("Bad format for hue");
622
- if ("string" == typeof h && Number.isNaN(h = parseFloat(h))) {
650
+ if ("string" == typeof h && Number.isNaN((h = parseFloat(h)))) {
623
651
  throw new Error("Bad format for hue");
624
652
  }
625
653
  if (h < 0 || h > 360)
@@ -628,26 +656,36 @@ Color.Sanitizer = {
628
656
  h /= 360;
629
657
  if ("string" == typeof s && s.indexOf("%") > -1) {
630
658
  // if ((s = parseInt(s)) == NaN) throw new Error("Bad format for saturation");
631
- if (Number.isNaN(s = parseInt(s))) {
659
+ if (Number.isNaN((s = parseInt(s)))) {
632
660
  throw new Error("Bad format for saturation");
633
661
  }
634
- if (s < 0 || s > 100)
662
+ if (s < 0 || s > 100) {
635
663
  throw new Error("Bad format for saturation");
664
+ }
636
665
  s /= 100;
637
666
  }
638
- else if (s < 0 || s > 1)
639
- throw new Error("Bad format for saturation");
667
+ else {
668
+ s = typeof s === "string" ? Number.parseFloat(s) : s;
669
+ if (s < 0 || s > 1) {
670
+ throw new Error("Bad format for saturation");
671
+ }
672
+ }
640
673
  if ("string" == typeof l && l.indexOf("%") > -1) {
641
674
  // if ((l = parseInt(l)) == NaN) throw new Error("Bad format for lightness");
642
- if (Number.isNaN(l = parseInt(l))) {
675
+ if (Number.isNaN((l = parseInt(l)))) {
643
676
  throw new Error("Bad format for lightness");
644
677
  }
645
- if (l < 0 || l > 100)
678
+ if (l < 0 || l > 100) {
646
679
  throw new Error("Bad format for lightness");
680
+ }
647
681
  l /= 100;
648
682
  }
649
- else if (l < 0 || l > 1)
650
- throw new Error("Bad format for lightness");
683
+ else {
684
+ l = typeof l === "string" ? Number.parseFloat(l) : l;
685
+ if (l < 0 || l > 1) {
686
+ throw new Error("Bad format for lightness");
687
+ }
688
+ }
651
689
  return [h, s, l];
652
690
  }
653
691
  }; // ENd sanitizer
@@ -735,4 +773,310 @@ Color.Converter = {
735
773
  return p;
736
774
  }
737
775
  };
776
+ // Source
777
+ // https://en.wikipedia.org/wiki/Web_colors
778
+ // Pink colors
779
+ Color.MediumVioletRed = Color.makeRGB(199, 21, 133);
780
+ Color.DeepPink = Color.makeRGB(255, 20, 147);
781
+ Color.PaleVioletRed = Color.makeRGB(219, 112, 147);
782
+ Color.HotPink = Color.makeRGB(255, 105, 180);
783
+ Color.LightPink = Color.makeRGB(255, 182, 193);
784
+ Color.Pink = Color.makeRGB(255, 192, 203);
785
+ // Red colors
786
+ Color.DarkRed = Color.makeRGB(139, 0, 0);
787
+ Color.Red = Color.makeRGB(255, 0, 0);
788
+ Color.Firebrick = Color.makeRGB(178, 34, 34);
789
+ Color.Crimson = Color.makeRGB(220, 20, 60);
790
+ Color.IndianRed = Color.makeRGB(205, 92, 92);
791
+ Color.LightCoral = Color.makeRGB(240, 128, 128);
792
+ Color.Salmon = Color.makeRGB(250, 128, 114);
793
+ Color.DarkSalmon = Color.makeRGB(233, 150, 122);
794
+ Color.LightSalmon = Color.makeRGB(255, 160, 122);
795
+ // Orange colors
796
+ Color.OrangeRed = Color.makeRGB(255, 69, 0);
797
+ Color.Tomato = Color.makeRGB(255, 99, 71);
798
+ Color.DarkOrange = Color.makeRGB(255, 140, 0);
799
+ Color.Coral = Color.makeRGB(255, 127, 80);
800
+ Color.Orange = Color.makeRGB(255, 165, 0);
801
+ // Yellow colors
802
+ Color.DarkKhaki = Color.makeRGB(189, 183, 107);
803
+ Color.Gold = Color.makeRGB(255, 215, 0);
804
+ Color.Khaki = Color.makeRGB(240, 230, 140);
805
+ Color.PeachPuff = Color.makeRGB(255, 218, 185);
806
+ Color.Yellow = Color.makeRGB(255, 255, 0);
807
+ Color.PaleGoldenrod = Color.makeRGB(238, 232, 170);
808
+ Color.Moccasin = Color.makeRGB(255, 228, 181);
809
+ Color.PapayaWhip = Color.makeRGB(255, 239, 213);
810
+ Color.LightGoldenrodYellow = Color.makeRGB(250, 250, 210);
811
+ Color.LemonChiffon = Color.makeRGB(255, 250, 205);
812
+ Color.LightYellow = Color.makeRGB(255, 255, 224);
813
+ // Brown colors
814
+ Color.Maroon = Color.makeRGB(128, 0, 0);
815
+ Color.Brown = Color.makeRGB(165, 42, 42);
816
+ Color.SaddleBrown = Color.makeRGB(139, 69, 19);
817
+ Color.Sienna = Color.makeRGB(160, 82, 45);
818
+ Color.Chocolate = Color.makeRGB(210, 105, 30);
819
+ Color.DarkGoldenrod = Color.makeRGB(184, 134, 11);
820
+ Color.Peru = Color.makeRGB(205, 133, 63);
821
+ Color.RosyBrown = Color.makeRGB(188, 143, 143);
822
+ Color.Goldenrod = Color.makeRGB(218, 165, 32);
823
+ Color.SandyBrown = Color.makeRGB(244, 164, 96);
824
+ Color.Tan = Color.makeRGB(210, 180, 140);
825
+ Color.Burlywood = Color.makeRGB(222, 184, 135);
826
+ Color.Wheat = Color.makeRGB(245, 222, 179);
827
+ Color.NavajoWhite = Color.makeRGB(255, 222, 173);
828
+ Color.Bisque = Color.makeRGB(255, 228, 196);
829
+ Color.BlanchedAlmond = Color.makeRGB(255, 235, 205);
830
+ Color.Cornsilk = Color.makeRGB(255, 248, 220);
831
+ // Purple, violet, and magenta colors
832
+ Color.Indigo = Color.makeRGB(75, 0, 130);
833
+ Color.Purple = Color.makeRGB(128, 0, 128);
834
+ Color.DarkMagenta = Color.makeRGB(139, 0, 139);
835
+ Color.DarkViolet = Color.makeRGB(148, 0, 211);
836
+ Color.DarkSlateBlue = Color.makeRGB(72, 61, 139);
837
+ Color.BlueViolet = Color.makeRGB(138, 43, 226);
838
+ Color.DarkOrchid = Color.makeRGB(153, 50, 204);
839
+ Color.Fuchsia = Color.makeRGB(255, 0, 255);
840
+ Color.Magenta = Color.makeRGB(255, 0, 255);
841
+ Color.SlateBlue = Color.makeRGB(106, 90, 205);
842
+ Color.MediumSlateBlue = Color.makeRGB(123, 104, 238);
843
+ Color.MediumOrchid = Color.makeRGB(186, 85, 211);
844
+ Color.MediumPurple = Color.makeRGB(147, 112, 219);
845
+ Color.Orchid = Color.makeRGB(218, 112, 214);
846
+ Color.Violet = Color.makeRGB(238, 130, 238);
847
+ Color.Plum = Color.makeRGB(221, 160, 221);
848
+ Color.Thistle = Color.makeRGB(216, 191, 216);
849
+ Color.Lavender = Color.makeRGB(230, 230, 250);
850
+ // Blue colors
851
+ Color.MidnightBlue = Color.makeRGB(25, 25, 112);
852
+ Color.Navy = Color.makeRGB(0, 0, 128);
853
+ Color.DarkBlue = Color.makeRGB(0, 0, 139);
854
+ Color.MediumBlue = Color.makeRGB(0, 0, 205);
855
+ Color.Blue = Color.makeRGB(0, 0, 255);
856
+ Color.RoyalBlue = Color.makeRGB(65, 105, 225);
857
+ Color.SteelBlue = Color.makeRGB(70, 130, 180);
858
+ Color.DodgerBlue = Color.makeRGB(30, 144, 255);
859
+ Color.DeepSkyBlue = Color.makeRGB(0, 191, 255);
860
+ Color.CornflowerBlue = Color.makeRGB(100, 149, 237);
861
+ Color.SkyBlue = Color.makeRGB(135, 206, 235);
862
+ Color.LightSkyBlue = Color.makeRGB(135, 206, 250);
863
+ Color.LightSteelBlue = Color.makeRGB(176, 196, 222);
864
+ Color.LightBlue = Color.makeRGB(173, 216, 230);
865
+ Color.PowderBlue = Color.makeRGB(176, 224, 230);
866
+ // Cyan colors
867
+ Color.Teal = Color.makeRGB(0, 128, 128);
868
+ Color.DarkCyan = Color.makeRGB(0, 139, 139);
869
+ Color.LightSeaGreen = Color.makeRGB(32, 178, 170);
870
+ Color.CadetBlue = Color.makeRGB(95, 158, 160);
871
+ Color.DarkTurquoise = Color.makeRGB(0, 206, 209);
872
+ Color.MediumTurquoise = Color.makeRGB(72, 209, 204);
873
+ Color.Turquoise = Color.makeRGB(64, 224, 208);
874
+ Color.Aqua = Color.makeRGB(0, 255, 255);
875
+ Color.Cyan = Color.makeRGB(0, 255, 255);
876
+ Color.Aquamarine = Color.makeRGB(127, 255, 212);
877
+ Color.PaleTurquoise = Color.makeRGB(175, 238, 238);
878
+ Color.LightCyan = Color.makeRGB(224, 255, 255);
879
+ // Green colors
880
+ Color.DarkGreen = Color.makeRGB(0, 100, 0);
881
+ Color.Green = Color.makeRGB(0, 128, 0);
882
+ Color.DarkOliveGreen = Color.makeRGB(85, 107, 47);
883
+ Color.ForestGreen = Color.makeRGB(34, 139, 34);
884
+ Color.SeaGreen = Color.makeRGB(46, 139, 87);
885
+ Color.Olive = Color.makeRGB(128, 128, 0);
886
+ Color.OliveDrab = Color.makeRGB(107, 142, 35);
887
+ Color.MediumSeaGreen = Color.makeRGB(60, 179, 113);
888
+ Color.LimeGreen = Color.makeRGB(50, 205, 50);
889
+ Color.Lime = Color.makeRGB(0, 255, 0);
890
+ Color.SpringGreen = Color.makeRGB(0, 255, 127);
891
+ Color.MediumSpringGreen = Color.makeRGB(0, 250, 154);
892
+ Color.DarkSeaGreen = Color.makeRGB(143, 188, 143);
893
+ Color.MediumAquamarine = Color.makeRGB(102, 205, 170);
894
+ Color.YellowGreen = Color.makeRGB(154, 205, 50);
895
+ Color.LawnGreen = Color.makeRGB(124, 252, 0);
896
+ Color.Chartreuse = Color.makeRGB(127, 255, 0);
897
+ Color.LightGreen = Color.makeRGB(144, 238, 144);
898
+ Color.GreenYellow = Color.makeRGB(173, 255, 47);
899
+ Color.PaleGreen = Color.makeRGB(152, 251, 152);
900
+ // White colors
901
+ Color.MistyRose = Color.makeRGB(255, 228, 225);
902
+ Color.AntiqueWhite = Color.makeRGB(250, 235, 215);
903
+ Color.Linen = Color.makeRGB(250, 240, 230);
904
+ Color.Beige = Color.makeRGB(245, 245, 220);
905
+ Color.WhiteSmoke = Color.makeRGB(245, 245, 245);
906
+ Color.LavenderBlush = Color.makeRGB(255, 240, 245);
907
+ Color.OldLace = Color.makeRGB(253, 245, 230);
908
+ Color.AliceBlue = Color.makeRGB(240, 248, 255);
909
+ Color.Seashell = Color.makeRGB(255, 245, 238);
910
+ Color.GhostWhite = Color.makeRGB(248, 248, 255);
911
+ Color.Honeydew = Color.makeRGB(240, 255, 240);
912
+ Color.FloralWhite = Color.makeRGB(255, 250, 240);
913
+ Color.Azure = Color.makeRGB(240, 255, 255);
914
+ Color.MintCream = Color.makeRGB(245, 255, 250);
915
+ Color.Snow = Color.makeRGB(255, 250, 250);
916
+ Color.Ivory = Color.makeRGB(255, 255, 240);
917
+ Color.White = Color.makeRGB(255, 255, 255);
918
+ // Gray and black colors
919
+ Color.Black = Color.makeRGB(0, 0, 0);
920
+ Color.DarkSlateGray = Color.makeRGB(47, 79, 79);
921
+ Color.DimGray = Color.makeRGB(105, 105, 105);
922
+ Color.SlateGray = Color.makeRGB(112, 128, 144);
923
+ Color.Gray = Color.makeRGB(128, 128, 128);
924
+ Color.LightSlateGray = Color.makeRGB(119, 136, 153);
925
+ Color.DarkGray = Color.makeRGB(169, 169, 169);
926
+ Color.Silver = Color.makeRGB(192, 192, 192);
927
+ Color.LightGray = Color.makeRGB(211, 211, 211);
928
+ Color.Gainsboro = Color.makeRGB(220, 220, 220);
929
+ Color.CSS_COLORS = {
930
+ // Pink Color.XYZ,lors
931
+ MediumVioletRed: Color.MediumVioletRed,
932
+ DeepPink: Color.DeepPink,
933
+ PaleVioletRed: Color.PaleVioletRed,
934
+ HotPink: Color.HotPink,
935
+ LightPink: Color.LightPink,
936
+ Pink: Color.Pink,
937
+ // Red Color.XYZ,lors
938
+ DarkRed: Color.DarkRed,
939
+ Red: Color.Red,
940
+ Firebrick: Color.Firebrick,
941
+ Crimson: Color.Crimson,
942
+ IndianRed: Color.IndianRed,
943
+ LightCoral: Color.LightCoral,
944
+ Salmon: Color.Salmon,
945
+ DarkSalmon: Color.DarkSalmon,
946
+ LightSalmon: Color.LightSalmon,
947
+ // Orange Color.XYZ,lors
948
+ OrangeRed: Color.OrangeRed,
949
+ Tomato: Color.Tomato,
950
+ DarkOrange: Color.DarkOrange,
951
+ Coral: Color.Coral,
952
+ Orange: Color.Orange,
953
+ // Yellow Color.XYZ,lors
954
+ DarkKhaki: Color.DarkKhaki,
955
+ Gold: Color.Gold,
956
+ Khaki: Color.Khaki,
957
+ PeachPuff: Color.PeachPuff,
958
+ Yellow: Color.Yellow,
959
+ PaleGoldenrod: Color.PaleGoldenrod,
960
+ Moccasin: Color.Moccasin,
961
+ PapayaWhip: Color.PapayaWhip,
962
+ LightGoldenrodYellow: Color.LightGoldenrodYellow,
963
+ LemonChiffon: Color.LemonChiffon,
964
+ LightYellow: Color.LightYellow,
965
+ // Brown Color.XYZ,lors
966
+ Maroon: Color.Maroon,
967
+ Brown: Color.Brown,
968
+ SaddleBrown: Color.SaddleBrown,
969
+ Sienna: Color.Sienna,
970
+ Chocolate: Color.Chocolate,
971
+ DarkGoldenrod: Color.DarkGoldenrod,
972
+ Peru: Color.Peru,
973
+ RosyBrown: Color.RosyBrown,
974
+ Goldenrod: Color.Goldenrod,
975
+ SandyBrown: Color.SandyBrown,
976
+ Tan: Color.Tan,
977
+ Burlywood: Color.Burlywood,
978
+ Wheat: Color.Wheat,
979
+ NavajoWhite: Color.NavajoWhite,
980
+ Bisque: Color.Bisque,
981
+ BlanchedAlmond: Color.BlanchedAlmond,
982
+ Cornsilk: Color.Cornsilk,
983
+ // Purple, violet, and magenta Color.XYZ,lors
984
+ Indigo: Color.Indigo,
985
+ Purple: Color.Purple,
986
+ DarkMagenta: Color.DarkMagenta,
987
+ DarkViolet: Color.DarkViolet,
988
+ DarkSlateBlue: Color.DarkSlateBlue,
989
+ BlueViolet: Color.BlueViolet,
990
+ DarkOrchid: Color.DarkOrchid,
991
+ Fuchsia: Color.Fuchsia,
992
+ Magenta: Color.Magenta,
993
+ SlateBlue: Color.SlateBlue,
994
+ MediumSlateBlue: Color.MediumSlateBlue,
995
+ MediumOrchid: Color.MediumOrchid,
996
+ MediumPurple: Color.MediumPurple,
997
+ Orchid: Color.Orchid,
998
+ Violet: Color.Violet,
999
+ Plum: Color.Plum,
1000
+ Thistle: Color.Thistle,
1001
+ Lavender: Color.Lavender,
1002
+ // Blue Colors
1003
+ MidnightBlue: Color.MidnightBlue,
1004
+ Navy: Color.Navy,
1005
+ DarkBlue: Color.DarkBlue,
1006
+ MediumBlue: Color.MediumBlue,
1007
+ Blue: Color.Blue,
1008
+ RoyalBlue: Color.RoyalBlue,
1009
+ SteelBlue: Color.SteelBlue,
1010
+ DodgerBlue: Color.DodgerBlue,
1011
+ DeepSkyBlue: Color.DeepSkyBlue,
1012
+ CornflowerBlue: Color.CornflowerBlue,
1013
+ SkyBlue: Color.SkyBlue,
1014
+ LightSkyBlue: Color.LightSkyBlue,
1015
+ LightSteelBlue: Color.LightSteelBlue,
1016
+ LightBlue: Color.LightBlue,
1017
+ PowderBlue: Color.PowderBlue,
1018
+ // Coyan Colors
1019
+ Teal: Color.Teal,
1020
+ DarkCyan: Color.DarkCyan,
1021
+ LightSeaGreen: Color.LightSeaGreen,
1022
+ CadetBlue: Color.CadetBlue,
1023
+ DarkTurquoise: Color.DarkTurquoise,
1024
+ MediumTurquoise: Color.MediumTurquoise,
1025
+ Turquoise: Color.Turquoise,
1026
+ Aqua: Color.Aqua,
1027
+ Cyan: Color.Cyan,
1028
+ Aquamarine: Color.Aquamarine,
1029
+ PaleTurquoise: Color.PaleTurquoise,
1030
+ LightCyan: Color.LightCyan,
1031
+ // Green Colors
1032
+ DarkGreen: Color.DarkGreen,
1033
+ Green: Color.Green,
1034
+ DarkOliveGreen: Color.DarkOliveGreen,
1035
+ ForestGreen: Color.ForestGreen,
1036
+ SeaGreen: Color.SeaGreen,
1037
+ Olive: Color.Olive,
1038
+ OliveDrab: Color.OliveDrab,
1039
+ MediumSeaGreen: Color.MediumSeaGreen,
1040
+ LimeGreen: Color.LimeGreen,
1041
+ Lime: Color.Lime,
1042
+ SpringGreen: Color.SpringGreen,
1043
+ MediumSpringGreen: Color.MediumSpringGreen,
1044
+ DarkSeaGreen: Color.DarkSeaGreen,
1045
+ MediumAquamarine: Color.MediumAquamarine,
1046
+ YellowGreen: Color.YellowGreen,
1047
+ LawnGreen: Color.LawnGreen,
1048
+ Chartreuse: Color.Chartreuse,
1049
+ LightGreen: Color.LightGreen,
1050
+ GreenYellow: Color.GreenYellow,
1051
+ PaleGreen: Color.PaleGreen,
1052
+ // White Color.XYZ,lors
1053
+ MistyRose: Color.MistyRose,
1054
+ AntiqueWhite: Color.AntiqueWhite,
1055
+ Linen: Color.Linen,
1056
+ Beige: Color.Beige,
1057
+ WhiteSmoke: Color.WhiteSmoke,
1058
+ LavenderBlush: Color.LavenderBlush,
1059
+ OldLace: Color.OldLace,
1060
+ AliceBlue: Color.AliceBlue,
1061
+ Seashell: Color.Seashell,
1062
+ GhostWhite: Color.GhostWhite,
1063
+ Honeydew: Color.Honeydew,
1064
+ FloralWhite: Color.FloralWhite,
1065
+ Azure: Color.Azure,
1066
+ MintCream: Color.MintCream,
1067
+ Snow: Color.Snow,
1068
+ Ivory: Color.Ivory,
1069
+ White: Color.White,
1070
+ // Gray and black Color.XYZ,lors
1071
+ Black: Color.Black,
1072
+ DarkSlateGray: Color.DarkSlateGray,
1073
+ DimGray: Color.DimGray,
1074
+ SlateGray: Color.SlateGray,
1075
+ Gray: Color.Gray,
1076
+ LightSlateGray: Color.LightSlateGray,
1077
+ DarkGray: Color.DarkGray,
1078
+ Silver: Color.Silver,
1079
+ LightGray: Color.LightGray,
1080
+ Gainsboro: Color.Gainsboro
1081
+ };
738
1082
  //# sourceMappingURL=Color.js.map