/js/~source/Uize.Color.xSvgColors.js

http://github.com/UIZE/UIZE-JavaScript-Framework · JavaScript · 326 lines · 137 code · 5 blank · 184 comment · 0 complexity · 97a53814dc5553135cc01c5f7a32b830 MD5 · raw file

  1. /*______________
  2. | ______ | U I Z E J A V A S C R I P T F R A M E W O R K
  3. | / / | ---------------------------------------------------
  4. | / O / | MODULE : Uize.Color.xSvgColors Object Extension
  5. | / / / |
  6. | / / / /| | ONLINE : http://www.uize.com
  7. | /____/ /__/_| | COPYRIGHT : (c)2009-2012 UIZE
  8. | /___ | LICENSE : Available under MIT License or GNU General Public License
  9. |_______________| http://www.uize.com/license.html
  10. */
  11. /*ScruncherSettings Mappings="=" LineCompacting="TRUE"*/
  12. /* Module Meta Data
  13. type: Extension
  14. importance: 2
  15. codeCompleteness: 100
  16. testCompleteness: 0
  17. docCompleteness: 100
  18. */
  19. /*?
  20. Introduction
  21. The =Uize.Color.xSvgColors= extension module extends the =Uize.Color= object by adding SVG 1.0 / CSS 3 color definitions to the =Uize.Color.colors= object.
  22. *DEVELOPERS:* `Chris van Rensburg`
  23. Using the Colors
  24. When you extend the =Uize.Color= object using the =Uize.Color.xSvgColors= extension module, it will then be possible to use the names of the colors defined in this extension when creating instances of the =Uize.Color= object, or when setting the color of =Uize.Color= instances using the =from= instance method.
  25. EXAMPLE
  26. ..............................................
  27. Uize.Color ('#ffebcd');
  28. Uize.Color ('BlanchedAlmond');
  29. Uize.Color (Uize.Color.colors.blanchedalmond);
  30. ..............................................
  31. Each of the above three statements would create a new instance of the =Uize.Color= object initialized to the SVG color "BlanchedAlmond". And because the =Uize.Color= module is used by other modules, such as the =Uize.Fx= module, it is possible to use color names when specifying the values of color CSS style properties for fade effects, as in...
  32. .............................................................................
  33. Uize.Fx.fadeStyle ('myNodeId',{color:'DarkMagenta'},{color:'LavenderBlush'});
  34. .............................................................................
  35. */
  36. Uize.module ({
  37. name:'Uize.Color.xSvgColors',
  38. builder:function (_Uize_Color) {
  39. _Uize_Color.defineColors ({
  40. aliceblue: 15792383, // 0xf0f8ff
  41. antiquewhite: 16444375, // 0xfaebd7
  42. aquamarine: 8388564, // 0x7fffd4
  43. azure: 15794175, // 0xf0ffff
  44. beige: 16119260, // 0xf5f5dc
  45. bisque: 16770244, // 0xffe4c4
  46. blanchedalmond: 16772045, // 0xffebcd
  47. blueviolet: 9055202, // 0x8a2be2
  48. brown: 10824234, // 0xa52a2a
  49. burlywood: 14596231, // 0xdeb887
  50. cadetblue: 6266528, // 0x5f9ea0
  51. chartreuse: 8388352, // 0x7fff00
  52. chocolate: 13789470, // 0xd2691e
  53. coral: 16744272, // 0xff7f50
  54. cornflowerblue: 6591981, // 0x6495ed
  55. cornsilk: 16775388, // 0xfff8dc
  56. crimson: 14423100, // 0xdc143c
  57. cyan: 65535, // 0x00ffff
  58. darkblue: 139, // 0x00008b
  59. darkcyan: 35723, // 0x008b8b
  60. darkgoldenrod: 12092939, // 0xb8860b
  61. darkgray: 11119017, // 0xa9a9a9
  62. darkgreen: 25600, // 0x006400
  63. darkgrey: 11119017, // 0xa9a9a9
  64. darkkhaki: 12433259, // 0xbdb76b
  65. darkmagenta: 9109643, // 0x8b008b
  66. darkolivegreen: 5597999, // 0x556b2f
  67. darkorange: 16747520, // 0xff8c00
  68. darkorchid: 10040012, // 0x9932cc
  69. darkred: 9109504, // 0x8b0000
  70. darksalmon: 15308410, // 0xe9967a
  71. darkseagreen: 9419919, // 0x8fbc8f
  72. darkslateblue: 4734347, // 0x483d8b
  73. darkslategray: 3100495, // 0x2f4f4f
  74. darkslategrey: 3100495, // 0x2f4f4f
  75. darkturquoise: 52945, // 0x00ced1
  76. darkviolet: 9699539, // 0x9400d3
  77. deeppink: 16716947, // 0xff1493
  78. deepskyblue: 49151, // 0x00bfff
  79. dimgray: 6908265, // 0x696969
  80. dimgrey: 6908265, // 0x696969
  81. dodgerblue: 2003199, // 0x1e90ff
  82. firebrick: 11674146, // 0xb22222
  83. floralwhite: 16775920, // 0xfffaf0
  84. forestgreen: 2263842, // 0x228b22
  85. gainsboro: 14474460, // 0xdcdcdc
  86. ghostwhite: 16316671, // 0xf8f8ff
  87. gold: 16766720, // 0xffd700
  88. goldenrod: 14329120, // 0xdaa520
  89. greenyellow: 11403055, // 0xadff2f
  90. grey: 8421504, // 0x808080
  91. honeydew: 15794160, // 0xf0fff0
  92. hotpink: 16738740, // 0xff69b4
  93. indianred: 13458524, // 0xcd5c5c
  94. indigo: 4915330, // 0x4b0082
  95. ivory: 16777200, // 0xfffff0
  96. khaki: 15787660, // 0xf0e68c
  97. lavender: 15132410, // 0xe6e6fa
  98. lavenderblush: 16773365, // 0xfff0f5
  99. lawngreen: 8190976, // 0x7cfc00
  100. lemonchiffon: 16775885, // 0xfffacd
  101. lightblue: 11393254, // 0xadd8e6
  102. lightcoral: 15761536, // 0xf08080
  103. lightcyan: 14745599, // 0xe0ffff
  104. lightgoldenrodyellow: 16448210, // 0xfafad2
  105. lightgray: 13882323, // 0xd3d3d3
  106. lightgreen: 9498256, // 0x90ee90
  107. lightgrey: 13882323, // 0xd3d3d3
  108. lightpink: 16758465, // 0xffb6c1
  109. lightsalmon: 16752762, // 0xffa07a
  110. lightseagreen: 2142890, // 0x20b2aa
  111. lightskyblue: 8900346, // 0x87cefa
  112. lightslategray: 7833753, // 0x778899
  113. lightslategrey: 7833753, // 0x778899
  114. lightsteelblue: 11584734, // 0xb0c4de
  115. lightyellow: 16777184, // 0xffffe0
  116. limegreen: 3329330, // 0x32cd32
  117. linen: 16445670, // 0xfaf0e6
  118. magenta: 16711935, // 0xff00ff
  119. mediumaquamarine: 6737322, // 0x66cdaa
  120. mediumblue: 205, // 0x0000cd
  121. mediumorchid: 12211667, // 0xba55d3
  122. mediumpurple: 9662683, // 0x9370db
  123. mediumseagreen: 3978097, // 0x3cb371
  124. mediumslateblue: 8087790, // 0x7b68ee
  125. mediumspringgreen: 64154, // 0x00fa9a
  126. mediumturquoise: 4772300, // 0x48d1cc
  127. mediumvioletred: 13047173, // 0xc71585
  128. midnightblue: 1644912, // 0x191970
  129. mintcream: 16121850, // 0xf5fffa
  130. mistyrose: 16770273, // 0xffe4e1
  131. moccasin: 16770229, // 0xffe4b5
  132. navajowhite: 16768685, // 0xffdead
  133. oldlace: 16643558, // 0xfdf5e6
  134. olivedrab: 7048739, // 0x6b8e23
  135. orangered: 16729344, // 0xff4500
  136. orchid: 14315734, // 0xda70d6
  137. palegoldenrod: 15657130, // 0xeee8aa
  138. palegreen: 10025880, // 0x98fb98
  139. paleturquoise: 11529966, // 0xafeeee
  140. palevioletred: 14381203, // 0xdb7093
  141. papayawhip: 16773077, // 0xffefd5
  142. peachpuff: 16767673, // 0xffdab9
  143. peru: 13468991, // 0xcd853f
  144. pink: 16761035, // 0xffc0cb
  145. plum: 14524637, // 0xdda0dd
  146. powderblue: 11591910, // 0xb0e0e6
  147. rosybrown: 12357519, // 0xbc8f8f
  148. royalblue: 4286945, // 0x4169e1
  149. saddlebrown: 9127187, // 0x8b4513
  150. salmon: 16416882, // 0xfa8072
  151. sandybrown: 16032864, // 0xf4a460
  152. seagreen: 3050327, // 0x2e8b57
  153. seashell: 16774638, // 0xfff5ee
  154. sienna: 10506797, // 0xa0522d
  155. skyblue: 8900331, // 0x87ceeb
  156. slateblue: 6970061, // 0x6a5acd
  157. slategray: 7372944, // 0x708090
  158. slategrey: 7372944, // 0x708090
  159. snow: 16775930, // 0xfffafa
  160. springgreen: 65407, // 0x00ff7f
  161. steelblue: 4620980, // 0x4682b4
  162. tan: 13808780, // 0xd2b48c
  163. thistle: 14204888, // 0xd8bfd8
  164. tomato: 16737095, // 0xff6347
  165. turquoise: 4251856, // 0x40e0d0
  166. violet: 15631086, // 0xee82ee
  167. wheat: 16113331, // 0xf5deb3
  168. whitesmoke: 16119285, // 0xf5f5f5
  169. yellowgreen: 10145074 // 0x9acd32
  170. });
  171. /*?
  172. The SVG 1.0 Colors
  173. The =Uize.Color.xSvgColors= module defines over a hundred additional colors, as listed in the table below.
  174. This is in addition to the seventeen standard CSS 2.1 colors defined in the =Uize.Color= module, which are =white=, =silver=, =gray=, =black=, =navy=, =blue=, =aqua=, =teal=, =green=, =olive=, =lime=, =maroon=, =red=, =orange=, =yellow=, =purple=, and =fuchsia=.
  175. .........................................
  176. << table >>
  177. title: SVG 1.0 COLORS
  178. data
  179. :| COLOR NAME | HEX VALUE |
  180. :| aliceblue | #f0f8ff |
  181. :| antiquewhite | #faebd7 |
  182. :| aquamarine | #7fffd4 |
  183. :| azure | #f0ffff |
  184. :| beige | #f5f5dc |
  185. :| bisque | #ffe4c4 |
  186. :| blanchedalmond | #ffebcd |
  187. :| blueviolet | #8a2be2 |
  188. :| brown | #a52a2a |
  189. :| burlywood | #deb887 |
  190. :| cadetblue | #5f9ea0 |
  191. :| chartreuse | #7fff00 |
  192. :| chocolate | #d2691e |
  193. :| coral | #ff7f50 |
  194. :| cornflowerblue | #6495ed |
  195. :| cornsilk | #fff8dc |
  196. :| crimson | #dc143c |
  197. :| cyan | #00ffff |
  198. :| darkblue | #00008b |
  199. :| darkcyan | #008b8b |
  200. :| darkgoldenrod | #b8860b |
  201. :| darkgray | #a9a9a9 |
  202. :| darkgreen | #006400 |
  203. :| darkgrey | #a9a9a9 |
  204. :| darkkhaki | #bdb76b |
  205. :| darkmagenta | #8b008b |
  206. :| darkolivegreen | #556b2f |
  207. :| darkorange | #ff8c00 |
  208. :| darkorchid | #9932cc |
  209. :| darkred | #8b0000 |
  210. :| darksalmon | #e9967a |
  211. :| darkseagreen | #8fbc8f |
  212. :| darkslateblue | #483d8b |
  213. :| darkslategray | #2f4f4f |
  214. :| darkslategrey | #2f4f4f |
  215. :| darkturquoise | #00ced1 |
  216. :| darkviolet | #9400d3 |
  217. :| deeppink | #ff1493 |
  218. :| deepskyblue | #00bfff |
  219. :| dimgray | #696969 |
  220. :| dimgrey | #696969 |
  221. :| dodgerblue | #1e90ff |
  222. :| firebrick | #b22222 |
  223. :| floralwhite | #fffaf0 |
  224. :| forestgreen | #228b22 |
  225. :| gainsboro | #dcdcdc |
  226. :| ghostwhite | #f8f8ff |
  227. :| gold | #ffd700 |
  228. :| goldenrod | #daa520 |
  229. :| greenyellow | #adff2f |
  230. :| grey | #808080 |
  231. :| honeydew | #f0fff0 |
  232. :| hotpink | #ff69b4 |
  233. :| indianred | #cd5c5c |
  234. :| indigo | #4b0082 |
  235. :| ivory | #fffff0 |
  236. :| khaki | #f0e68c |
  237. :| lavender | #e6e6fa |
  238. :| lavenderblush | #fff0f5 |
  239. :| lawngreen | #7cfc00 |
  240. :| lemonchiffon | #fffacd |
  241. :| lightblue | #add8e6 |
  242. :| lightcoral | #f08080 |
  243. :| lightcyan | #e0ffff |
  244. :| lightgoldenrodyellow | #fafad2 |
  245. :| lightgray | #d3d3d3 |
  246. :| lightgreen | #90ee90 |
  247. :| lightgrey | #d3d3d3 |
  248. :| lightpink | #ffb6c1 |
  249. :| lightsalmon | #ffa07a |
  250. :| lightseagreen | #20b2aa |
  251. :| lightskyblue | #87cefa |
  252. :| lightslategray | #778899 |
  253. :| lightslategrey | #778899 |
  254. :| lightsteelblue | #b0c4de |
  255. :| lightyellow | #ffffe0 |
  256. :| limegreen | #32cd32 |
  257. :| linen | #faf0e6 |
  258. :| magenta | #ff00ff |
  259. :| mediumaquamarine | #66cdaa |
  260. :| mediumblue | #0000cd |
  261. :| mediumorchid | #ba55d3 |
  262. :| mediumpurple | #9370db |
  263. :| mediumseagreen | #3cb371 |
  264. :| mediumslateblue | #7b68ee |
  265. :| mediumspringgreen | #00fa9a |
  266. :| mediumturquoise | #48d1cc |
  267. :| mediumvioletred | #c71585 |
  268. :| midnightblue | #191970 |
  269. :| mintcream | #f5fffa |
  270. :| mistyrose | #ffe4e1 |
  271. :| moccasin | #ffe4b5 |
  272. :| navajowhite | #ffdead |
  273. :| oldlace | #fdf5e6 |
  274. :| olivedrab | #6b8e23 |
  275. :| orangered | #ff4500 |
  276. :| orchid | #da70d6 |
  277. :| palegoldenrod | #eee8aa |
  278. :| palegreen | #98fb98 |
  279. :| paleturquoise | #afeeee |
  280. :| palevioletred | #db7093 |
  281. :| papayawhip | #ffefd5 |
  282. :| peachpuff | #ffdab9 |
  283. :| peru | #cd853f |
  284. :| pink | #ffc0cb |
  285. :| plum | #dda0dd |
  286. :| powderblue | #b0e0e6 |
  287. :| rosybrown | #bc8f8f |
  288. :| royalblue | #4169e1 |
  289. :| saddlebrown | #8b4513 |
  290. :| salmon | #fa8072 |
  291. :| sandybrown | #f4a460 |
  292. :| seagreen | #2e8b57 |
  293. :| seashell | #fff5ee |
  294. :| sienna | #a0522d |
  295. :| skyblue | #87ceeb |
  296. :| slateblue | #6a5acd |
  297. :| slategray | #708090 |
  298. :| slategrey | #708090 |
  299. :| snow | #fffafa |
  300. :| springgreen | #00ff7f |
  301. :| steelblue | #4682b4 |
  302. :| tan | #d2b48c |
  303. :| thistle | #d8bfd8 |
  304. :| tomato | #ff6347 |
  305. :| turquoise | #40e0d0 |
  306. :| violet | #ee82ee |
  307. :| wheat | #f5deb3 |
  308. :| whitesmoke | #f5f5f5 |
  309. :| yellowgreen | #9acd32 |
  310. .........................................
  311. */
  312. }
  313. });