@kaeawc/auto-mobile 0.0.90 → 0.0.92

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 (280) hide show
  1. package/README.md +7 -0
  2. package/README.md.backup +7 -0
  3. package/dist/build-info.json +12 -11
  4. package/dist/schemas/README.md +16 -0
  5. package/dist/schemas/prototype-icon-names.json +302 -0
  6. package/dist/schemas/prototype-platform-permissions.json +75 -0
  7. package/dist/schemas/test-plan.schema.json +2 -2
  8. package/dist/src/chunk-09442h7v.js +4 -0
  9. package/dist/src/chunk-0dfnyfkh.js +5 -0
  10. package/dist/src/chunk-0e4gm1kj.js +5 -0
  11. package/dist/src/chunk-0eb8576f.js +4 -0
  12. package/dist/src/chunk-0rjm4nx7.js +5 -0
  13. package/dist/src/chunk-0w1spptt.js +6 -0
  14. package/dist/src/chunk-1zmh2eak.js +4 -0
  15. package/dist/src/chunk-28k63ha3.js +5 -0
  16. package/dist/src/chunk-2d4wmp8b.js +4 -0
  17. package/dist/src/chunk-2e6s75qv.js +78 -0
  18. package/dist/src/chunk-2v7tw1nj.js +5 -0
  19. package/dist/src/chunk-32jpxz2y.js +323 -0
  20. package/dist/src/chunk-34zxqcmq.js +5 -0
  21. package/dist/src/chunk-3jmvqygr.js +238 -0
  22. package/dist/src/chunk-3swvfhqt.js +5 -0
  23. package/dist/src/chunk-44bt78m9.js +5 -0
  24. package/dist/src/chunk-488vt2bp.js +4 -0
  25. package/dist/src/chunk-4fgdhcwx.js +5 -0
  26. package/dist/src/chunk-4jp2se4w.js +4 -0
  27. package/dist/src/chunk-4pfftt07.js +5 -0
  28. package/dist/src/chunk-4vhr9e4t.js +4 -0
  29. package/dist/src/chunk-4xd6zs3y.js +15 -0
  30. package/dist/src/chunk-51567pg8.js +4 -0
  31. package/dist/src/chunk-5agqsfev.js +4 -0
  32. package/dist/src/chunk-5d706gmr.js +4 -0
  33. package/dist/src/chunk-5kd4rqk7.js +5 -0
  34. package/dist/src/chunk-5s645vr4.js +4 -0
  35. package/dist/src/chunk-61t538bm.js +4 -0
  36. package/dist/src/chunk-6d3mmqxt.js +54 -0
  37. package/dist/src/chunk-6hyt398x.js +5 -0
  38. package/dist/src/chunk-6mnr8kpm.js +4 -0
  39. package/dist/src/chunk-6pg7bqck.js +4 -0
  40. package/dist/src/chunk-79q5xsdc.js +42 -0
  41. package/dist/src/chunk-7bdgand3.js +4 -0
  42. package/dist/src/chunk-84cp9dw5.js +4 -0
  43. package/dist/src/chunk-86f2h5ww.js +5 -0
  44. package/dist/src/chunk-8cghfzb2.js +19 -0
  45. package/dist/src/chunk-8en08r7q.js +5 -0
  46. package/dist/src/chunk-950qcq1e.js +10 -0
  47. package/dist/src/chunk-9rkfyt6q.js +5 -0
  48. package/dist/src/chunk-9tf2p9y9.js +5 -0
  49. package/dist/src/chunk-9y5bcy28.js +6 -0
  50. package/dist/src/chunk-a2sc4jm0.js +5 -0
  51. package/dist/src/chunk-a4k9rt7z.js +5 -0
  52. package/dist/src/chunk-aa5ng3d1.js +4 -0
  53. package/dist/src/chunk-ajsrz473.js +5 -0
  54. package/dist/src/chunk-b3h0a6ca.js +4 -0
  55. package/dist/src/chunk-b4cxdzwy.js +20 -0
  56. package/dist/src/chunk-b6a737qt.js +4 -0
  57. package/dist/src/chunk-bn64x5z5.js +5 -0
  58. package/dist/src/chunk-bvh649za.js +12 -0
  59. package/dist/src/chunk-c9nk1r78.js +5 -0
  60. package/dist/src/chunk-c9tyfg4j.js +26 -0
  61. package/dist/src/chunk-cfsdfqnm.js +4 -0
  62. package/dist/src/chunk-cxyf04jc.js +7 -0
  63. package/dist/src/chunk-d57432wq.js +4 -0
  64. package/dist/src/chunk-da08tx5v.js +4 -0
  65. package/dist/src/chunk-eka89q3k.js +4 -0
  66. package/dist/src/chunk-f2tc08m2.js +4 -0
  67. package/dist/src/chunk-f8tnk179.js +5 -0
  68. package/dist/src/chunk-f9s1kkhx.js +5 -0
  69. package/dist/src/chunk-fbp8a4rx.js +4 -0
  70. package/dist/src/chunk-fd2z0sze.js +4 -0
  71. package/dist/src/chunk-fk927f4q.js +54 -0
  72. package/dist/src/chunk-fxmr3a0f.js +4 -0
  73. package/dist/src/chunk-gaqwhd44.js +4 -0
  74. package/dist/src/chunk-ggtd5x5a.js +5 -0
  75. package/dist/src/chunk-gndcfrm7.js +4 -0
  76. package/dist/src/chunk-h3n4adc6.js +310 -0
  77. package/dist/src/chunk-h5pjbb83.js +4 -0
  78. package/dist/src/chunk-hgnnh302.js +4 -0
  79. package/dist/src/chunk-hmke8nhx.js +5 -0
  80. package/dist/src/chunk-j2bx12hn.js +4 -0
  81. package/dist/src/chunk-j70y1a2g.js +4 -0
  82. package/dist/src/chunk-jdqvcq0a.js +5 -0
  83. package/dist/src/chunk-jhnbfj19.js +55 -0
  84. package/dist/src/chunk-js1jpyxp.js +6 -0
  85. package/dist/src/chunk-kbjq0qvb.js +4 -0
  86. package/dist/src/chunk-kfwx57xd.js +4 -0
  87. package/dist/src/chunk-km0dy5vc.js +71 -0
  88. package/dist/src/chunk-kzwctna2.js +4 -0
  89. package/dist/src/chunk-m9ehyehy.js +4 -0
  90. package/dist/src/chunk-mct91p1f.js +4 -0
  91. package/dist/src/chunk-mf9spd4g.js +5 -0
  92. package/dist/src/chunk-mgrcansb.js +4 -0
  93. package/dist/src/chunk-mqc1d0eb.js +6 -0
  94. package/dist/src/chunk-n1zmpk0z.js +4 -0
  95. package/dist/src/chunk-ncyjf63g.js +4 -0
  96. package/dist/src/chunk-nr64d21q.js +973 -0
  97. package/dist/src/chunk-nwm2pq5v.js +168 -0
  98. package/dist/src/chunk-pm06b05d.js +9 -0
  99. package/dist/src/chunk-q50s00ry.js +4 -0
  100. package/dist/src/chunk-qv2918jt.js +4 -0
  101. package/dist/src/chunk-qwye1958.js +14 -0
  102. package/dist/src/chunk-r0f1q783.js +5 -0
  103. package/dist/src/chunk-r14wwk37.js +18 -0
  104. package/dist/src/chunk-r20pe1nv.js +5 -0
  105. package/dist/src/chunk-r8z9pfve.js +5 -0
  106. package/dist/src/chunk-rdpgkjf6.js +4 -0
  107. package/dist/src/chunk-rkr0dks9.js +5 -0
  108. package/dist/src/chunk-rn84t3sf.js +11 -0
  109. package/dist/src/chunk-s123kn7n.js +4 -0
  110. package/dist/src/chunk-s1zq65ny.js +4 -0
  111. package/dist/src/chunk-s73qn3fx.js +4 -0
  112. package/dist/src/chunk-sjn0nj4p.js +5 -0
  113. package/dist/src/chunk-sns0c35v.js +7 -0
  114. package/dist/src/chunk-stfzjr9y.js +8 -0
  115. package/dist/src/chunk-sz1a7p43.js +4 -0
  116. package/dist/src/chunk-t4dr5c8v.js +8 -0
  117. package/dist/src/chunk-tc8k9c1j.js +4 -0
  118. package/dist/src/chunk-teznhase.js +4 -0
  119. package/dist/src/chunk-ty9xgmz4.js +4 -0
  120. package/dist/src/chunk-tyazf3sk.js +145 -0
  121. package/dist/src/chunk-v6npjrjm.js +5 -0
  122. package/dist/src/chunk-v90es00d.js +4 -0
  123. package/dist/src/chunk-vbvtzkwz.js +5 -0
  124. package/dist/src/chunk-vefd8qee.js +8 -0
  125. package/dist/src/chunk-vs9r72ta.js +17 -0
  126. package/dist/src/chunk-w2mwa0jk.js +4 -0
  127. package/dist/src/chunk-w7zsh13a.js +9 -0
  128. package/dist/src/chunk-w88k0bgr.js +4 -0
  129. package/dist/src/chunk-wry6skrm.js +4 -0
  130. package/dist/src/chunk-wzdt0enk.js +4 -0
  131. package/dist/src/chunk-xhhv854c.js +4 -0
  132. package/dist/src/chunk-y58270hd.js +4 -0
  133. package/dist/src/chunk-yk0hmbex.js +4 -0
  134. package/dist/src/chunk-ympy4fdz.js +28 -0
  135. package/dist/src/chunk-yw436axy.js +4 -0
  136. package/dist/src/chunk-z04jrpjy.js +5 -0
  137. package/dist/src/chunk-z2xznczw.js +4 -0
  138. package/dist/src/chunk-z4xnrgps.js +4 -0
  139. package/dist/src/chunk-z7csyszv.js +4 -0
  140. package/dist/src/chunk-z8t0v07j.js +11 -0
  141. package/dist/src/chunk-z916af47.js +228 -0
  142. package/dist/src/chunk-zcr8he8q.js +5 -0
  143. package/dist/src/chunk-zd9vmkzn.js +9 -0
  144. package/dist/src/chunk-zg67wjkh.js +5 -0
  145. package/dist/src/chunk-zj939v0h.js +5 -0
  146. package/dist/src/chunk-zkdjwtc1.js +4 -0
  147. package/dist/src/chunk-zkv5kzt6.js +4 -0
  148. package/dist/src/daemon/processEntry.js +4 -0
  149. package/dist/src/index.js +4 -2797
  150. package/dist/src/runtime/bunRuntimeGuard.js +4 -0
  151. package/dist/src/utils/workers/iosBundleExtractWorker.js +2 -3
  152. package/node_modules/strtok3/lib/BufferSizeError.js +1 -1
  153. package/node_modules/strtok3/lib/TokenWriter.js +151 -0
  154. package/node_modules/strtok3/lib/core.js +1 -0
  155. package/node_modules/strtok3/package.json +2 -2
  156. package/node_modules/token-types/LICENSE.txt +9 -9
  157. package/node_modules/token-types/{lib → dist/lib}/index.js +21 -3
  158. package/node_modules/token-types/package.json +81 -81
  159. package/package.json +10 -10
  160. package/schemas/README.md +16 -0
  161. package/schemas/prototype-icon-names.json +302 -0
  162. package/schemas/prototype-platform-permissions.json +75 -0
  163. package/schemas/test-plan.schema.json +2 -2
  164. package/node_modules/@borewit/text-codec/README.md +0 -87
  165. package/node_modules/@jimp/diff/node_modules/pixelmatch/README.md +0 -110
  166. package/node_modules/@jimp/diff/node_modules/pixelmatch/node_modules/pngjs/README.md +0 -433
  167. package/node_modules/@jimp/file-ops/dist/browser/index.js +0 -8
  168. package/node_modules/@jimp/js-png/README.md +0 -35
  169. package/node_modules/@jimp/js-png/src/__image_snapshots__/index-node-test-ts-png-should-use-png-options-1-snap.png +0 -0
  170. package/node_modules/@jimp/js-png/src/output.png +0 -0
  171. package/node_modules/@jimp/js-png/vitest.config.browser.mjs +0 -3
  172. package/node_modules/@jimp/plugin-resize/README.md +0 -12
  173. package/node_modules/@jimp/plugin-resize/vitest.config.browser.mjs +0 -3
  174. package/node_modules/@tokenizer/inflate/README.md +0 -114
  175. package/node_modules/@tokenizer/token/README.md +0 -19
  176. package/node_modules/await-to-js/README.md +0 -82
  177. package/node_modules/debug/README.md +0 -481
  178. package/node_modules/exif-parser/README.md +0 -83
  179. package/node_modules/file-type/readme.md +0 -667
  180. package/node_modules/ieee754/README.md +0 -51
  181. package/node_modules/mime/README.md +0 -178
  182. package/node_modules/ms/readme.md +0 -59
  183. package/node_modules/parse-bmfont-xml/README.md +0 -74
  184. package/node_modules/parse-bmfont-xml/lib/browser.js +0 -85
  185. package/node_modules/parse-bmfont-xml/node_modules/xml2js/README.md +0 -507
  186. package/node_modules/pngjs/README.md +0 -287
  187. package/node_modules/sax/README.md +0 -228
  188. package/node_modules/strtok3/README.md +0 -736
  189. package/node_modules/tinycolor2/README.md +0 -492
  190. package/node_modules/tinycolor2/cjs/test.js +0 -2191
  191. package/node_modules/tinycolor2/cjs/test_template.js +0 -26
  192. package/node_modules/tinycolor2/deno_asserts@0.168.0.mjs +0 -807
  193. package/node_modules/tinycolor2/esm/test.js +0 -2189
  194. package/node_modules/tinycolor2/esm/test_template.js +0 -24
  195. package/node_modules/tinycolor2/tinycolor.js +0 -1191
  196. package/node_modules/token-types/README.md +0 -120
  197. package/node_modules/uint8array-extras/readme.md +0 -318
  198. package/node_modules/xml-parse-from-string/README.md +0 -35
  199. package/node_modules/xmlbuilder/README.md +0 -86
  200. package/node_modules/zod/README.md +0 -208
  201. package/node_modules/zod/v4/locales/ar.d.cts +0 -4
  202. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  203. package/node_modules/zod/v4/locales/az.d.cts +0 -4
  204. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  205. package/node_modules/zod/v4/locales/be.d.cts +0 -4
  206. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  207. package/node_modules/zod/v4/locales/ca.d.cts +0 -4
  208. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  209. package/node_modules/zod/v4/locales/cs.d.cts +0 -4
  210. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  211. package/node_modules/zod/v4/locales/de.d.cts +0 -4
  212. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  213. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  214. package/node_modules/zod/v4/locales/en.d.ts +0 -5
  215. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  216. package/node_modules/zod/v4/locales/eo.d.ts +0 -5
  217. package/node_modules/zod/v4/locales/es.d.cts +0 -4
  218. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  219. package/node_modules/zod/v4/locales/fa.d.cts +0 -4
  220. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  221. package/node_modules/zod/v4/locales/fi.d.cts +0 -4
  222. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  223. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
  224. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  225. package/node_modules/zod/v4/locales/fr.d.cts +0 -4
  226. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  227. package/node_modules/zod/v4/locales/he.d.cts +0 -4
  228. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  229. package/node_modules/zod/v4/locales/hu.d.cts +0 -4
  230. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  231. package/node_modules/zod/v4/locales/id.d.cts +0 -4
  232. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  233. package/node_modules/zod/v4/locales/index.d.cts +0 -39
  234. package/node_modules/zod/v4/locales/index.d.ts +0 -39
  235. package/node_modules/zod/v4/locales/it.d.cts +0 -4
  236. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  237. package/node_modules/zod/v4/locales/ja.d.cts +0 -4
  238. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  239. package/node_modules/zod/v4/locales/kh.d.cts +0 -4
  240. package/node_modules/zod/v4/locales/kh.d.ts +0 -4
  241. package/node_modules/zod/v4/locales/ko.d.cts +0 -4
  242. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  243. package/node_modules/zod/v4/locales/mk.d.cts +0 -4
  244. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  245. package/node_modules/zod/v4/locales/ms.d.cts +0 -4
  246. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  247. package/node_modules/zod/v4/locales/nl.d.cts +0 -4
  248. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  249. package/node_modules/zod/v4/locales/no.d.cts +0 -4
  250. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  251. package/node_modules/zod/v4/locales/ota.d.cts +0 -4
  252. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  253. package/node_modules/zod/v4/locales/pl.d.cts +0 -4
  254. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  255. package/node_modules/zod/v4/locales/ps.d.cts +0 -4
  256. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  257. package/node_modules/zod/v4/locales/pt.d.cts +0 -4
  258. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  259. package/node_modules/zod/v4/locales/ru.d.cts +0 -4
  260. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  261. package/node_modules/zod/v4/locales/sl.d.cts +0 -4
  262. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  263. package/node_modules/zod/v4/locales/sv.d.cts +0 -4
  264. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  265. package/node_modules/zod/v4/locales/ta.d.cts +0 -4
  266. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  267. package/node_modules/zod/v4/locales/th.d.cts +0 -4
  268. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  269. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  270. package/node_modules/zod/v4/locales/tr.d.ts +0 -5
  271. package/node_modules/zod/v4/locales/ua.d.cts +0 -4
  272. package/node_modules/zod/v4/locales/ua.d.ts +0 -4
  273. package/node_modules/zod/v4/locales/ur.d.cts +0 -4
  274. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  275. package/node_modules/zod/v4/locales/vi.d.cts +0 -4
  276. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  277. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
  278. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  279. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
  280. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
@@ -1,492 +0,0 @@
1
- # TinyColor
2
-
3
- ## JavaScript color tooling
4
-
5
- TinyColor is a small, fast library for color manipulation and conversion in JavaScript. It allows many forms of input, while providing color conversions and other color utility functions. It has no dependencies.
6
-
7
- ## Including in node
8
-
9
- `tinycolor` can be installed from npm:
10
-
11
- npm install tinycolor2
12
-
13
- Then it can be used in your script like so:
14
-
15
- ```js
16
- var tinycolor = require("tinycolor2");
17
- var color = tinycolor("red");
18
- ```
19
-
20
- Or in a module like so:
21
-
22
- ```js
23
- import tinycolor from "tinycolor2";
24
- var color = tinycolor("red");
25
- ```
26
-
27
- ## Including in a browser
28
-
29
- The package can be bundled from npm, but if you prefer to download it locally you have two choices:
30
-
31
- ### ESM
32
-
33
- It can be used as a module by downloading [npm/esm/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/esm/tinycolor.js) or using https://esm.sh/tinycolor2.
34
-
35
- ```html
36
- <script type='module'>
37
- import tinycolor from "https://esm.sh/tinycolor2";
38
- var color = tinycolor("red");
39
- </script>
40
- ```
41
-
42
- ### UMD
43
-
44
- You can use it directly in a script tag by downloading the UMD file from [npm/cjs/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/cjs/tinycolor.js):
45
-
46
- ```html
47
- <script type='text/javascript' src='tinycolor.js'></script>
48
- <script type='text/javascript'>
49
- var color = tinycolor("red");
50
- </script>
51
- ```
52
-
53
- ## Usage
54
-
55
- Call `tinycolor(input)` or `new tinycolor(input)`, and you will have an object with the following properties. See Accepted String Input and Accepted Object Input below for more information about what is accepted.
56
-
57
- ## Accepted String Input
58
-
59
- The string parsing is very permissive. It is meant to make typing a color as input as easy as possible. All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value).
60
-
61
- HSL and HSV both require either 0%-100% or 0-1 for the `S`/`L`/`V` properties. The `H` (hue) can have values between 0%-100% or 0-360.
62
-
63
- RGB input requires either 0-255 or 0%-100%.
64
-
65
- If you call `tinycolor.fromRatio`, RGB and Hue input can also accept 0-1.
66
-
67
- Here are some examples of string input:
68
-
69
- ### Hex, 8-digit (RGBA) Hex
70
- ```js
71
- tinycolor("#000");
72
- tinycolor("000");
73
- tinycolor("#369C");
74
- tinycolor("369C");
75
- tinycolor("#f0f0f6");
76
- tinycolor("f0f0f6");
77
- tinycolor("#f0f0f688");
78
- tinycolor("f0f0f688");
79
- ```
80
- ### RGB, RGBA
81
- ```js
82
- tinycolor("rgb (255, 0, 0)");
83
- tinycolor("rgb 255 0 0");
84
- tinycolor("rgba (255, 0, 0, .5)");
85
- tinycolor({ r: 255, g: 0, b: 0 });
86
- tinycolor.fromRatio({ r: 1, g: 0, b: 0 });
87
- tinycolor.fromRatio({ r: .5, g: .5, b: .5 });
88
- ```
89
- ### HSL, HSLA
90
- ```js
91
- tinycolor("hsl(0, 100%, 50%)");
92
- tinycolor("hsla(0, 100%, 50%, .5)");
93
- tinycolor("hsl(0, 100%, 50%)");
94
- tinycolor("hsl 0 1.0 0.5");
95
- tinycolor({ h: 0, s: 1, l: .5 });
96
- tinycolor.fromRatio({ h: 1, s: 0, l: 0 });
97
- tinycolor.fromRatio({ h: .5, s: .5, l: .5 });
98
- ```
99
- ### HSV, HSVA
100
- ```js
101
- tinycolor("hsv(0, 100%, 100%)");
102
- tinycolor("hsva(0, 100%, 100%, .5)");
103
- tinycolor("hsv (0 100% 100%)");
104
- tinycolor("hsv 0 1 1");
105
- tinycolor({ h: 0, s: 100, v: 100 });
106
- tinycolor.fromRatio({ h: 1, s: 0, v: 0 });
107
- tinycolor.fromRatio({ h: .5, s: .5, v: .5 });
108
- ```
109
- ### Named
110
-
111
- Case insenstive names are accepted, using the [list of colors in the CSS spec](https://www.w3.org/TR/css-color-4/#named-colors).
112
-
113
- ```js
114
- tinycolor("RED");
115
- tinycolor("blanchedalmond");
116
- tinycolor("darkblue");
117
- ```
118
- ### Accepted Object Input
119
-
120
- If you are calling this from code, you may want to use object input. Here are some examples of the different types of accepted object inputs:
121
-
122
- { r: 255, g: 0, b: 0 }
123
- { r: 255, g: 0, b: 0, a: .5 }
124
- { h: 0, s: 100, l: 50 }
125
- { h: 0, s: 100, v: 100 }
126
-
127
- ## Methods
128
-
129
- ### getFormat
130
-
131
- Returns the format used to create the tinycolor instance
132
- ```js
133
- var color = tinycolor("red");
134
- color.getFormat(); // "name"
135
- color = tinycolor({r:255, g:255, b:255});
136
- color.getFormat(); // "rgb"
137
- ```
138
-
139
- ### getOriginalInput
140
-
141
- Returns the input passed into the constructor used to create the tinycolor instance
142
- ```js
143
- var color = tinycolor("red");
144
- color.getOriginalInput(); // "red"
145
- color = tinycolor({r:255, g:255, b:255});
146
- color.getOriginalInput(); // "{r: 255, g: 255, b: 255}"
147
- ```
148
-
149
- ### isValid
150
-
151
- Return a boolean indicating whether the color was successfully parsed. Note: if the color is not valid then it will act like `black` when being used with other methods.
152
- ```js
153
- var color1 = tinycolor("red");
154
- color1.isValid(); // true
155
- color1.toHexString(); // "#ff0000"
156
-
157
- var color2 = tinycolor("not a color");
158
- color2.isValid(); // false
159
- color2.toString(); // "#000000"
160
- ```
161
- ### getBrightness
162
-
163
- Returns the perceived brightness of a color, from `0-255`, as defined by [Web Content Accessibility Guidelines (Version 1.0)](http://www.w3.org/TR/AERT#color-contrast).
164
- ```js
165
- var color1 = tinycolor("#fff");
166
- color1.getBrightness(); // 255
167
-
168
- var color2 = tinycolor("#000");
169
- color2.getBrightness(); // 0
170
- ```
171
- ### isLight
172
-
173
- Return a boolean indicating whether the color's perceived brightness is light.
174
- ```js
175
- var color1 = tinycolor("#fff");
176
- color1.isLight(); // true
177
-
178
- var color2 = tinycolor("#000");
179
- color2.isLight(); // false
180
- ```
181
- ### isDark
182
-
183
- Return a boolean indicating whether the color's perceived brightness is dark.
184
- ```js
185
- var color1 = tinycolor("#fff");
186
- color1.isDark(); // false
187
-
188
- var color2 = tinycolor("#000");
189
- color2.isDark(); // true
190
- ```
191
- ### getLuminance
192
-
193
- Returns the perceived luminance of a color, from `0-1` as defined by [Web Content Accessibility Guidelines (Version 2.0).](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef)
194
- ```js
195
- var color1 = tinycolor("#fff");
196
- color1.getLuminance(); // 1
197
-
198
- var color2 = tinycolor("#000");
199
- color2.getLuminance(); // 0
200
- ```
201
- ### getAlpha
202
-
203
- Returns the alpha value of a color, from `0-1`.
204
- ```js
205
- var color1 = tinycolor("rgba(255, 0, 0, .5)");
206
- color1.getAlpha(); // 0.5
207
-
208
- var color2 = tinycolor("rgb(255, 0, 0)");
209
- color2.getAlpha(); // 1
210
-
211
- var color3 = tinycolor("transparent");
212
- color3.getAlpha(); // 0
213
- ```
214
- ### setAlpha
215
-
216
- Sets the alpha value on a current color. Accepted range is in between `0-1`.
217
- ```js
218
- var color = tinycolor("red");
219
- color.getAlpha(); // 1
220
- color.setAlpha(.5);
221
- color.getAlpha(); // .5
222
- color.toRgbString(); // "rgba(255, 0, 0, .5)"
223
- ```
224
- ### String Representations
225
-
226
- The following methods will return a property for the `alpha` value, which can be ignored: `toHsv`, `toHsl`, `toRgb`
227
-
228
- ### toHsv
229
- ```js
230
- var color = tinycolor("red");
231
- color.toHsv(); // { h: 0, s: 1, v: 1, a: 1 }
232
- ```
233
- ### toHsvString
234
- ```js
235
- var color = tinycolor("red");
236
- color.toHsvString(); // "hsv(0, 100%, 100%)"
237
- color.setAlpha(0.5);
238
- color.toHsvString(); // "hsva(0, 100%, 100%, 0.5)"
239
- ```
240
- ### toHsl
241
- ```js
242
- var color = tinycolor("red");
243
- color.toHsl(); // { h: 0, s: 1, l: 0.5, a: 1 }
244
- ```
245
- ### toHslString
246
- ```js
247
- var color = tinycolor("red");
248
- color.toHslString(); // "hsl(0, 100%, 50%)"
249
- color.setAlpha(0.5);
250
- color.toHslString(); // "hsla(0, 100%, 50%, 0.5)"
251
- ```
252
- ### toHex
253
- ```js
254
- var color = tinycolor("red");
255
- color.toHex(); // "ff0000"
256
- ```
257
- ### toHexString
258
- ```js
259
- var color = tinycolor("red");
260
- color.toHexString(); // "#ff0000"
261
- ```
262
- ### toHex8
263
- ```js
264
- var color = tinycolor("red");
265
- color.toHex8(); // "ff0000ff"
266
- ```
267
- ### toHex8String
268
- ```js
269
- var color = tinycolor("red");
270
- color.toHex8String(); // "#ff0000ff"
271
- ```
272
- ### toRgb
273
- ```js
274
- var color = tinycolor("red");
275
- color.toRgb(); // { r: 255, g: 0, b: 0, a: 1 }
276
- ```
277
- ### toRgbString
278
- ```js
279
- var color = tinycolor("red");
280
- color.toRgbString(); // "rgb(255, 0, 0)"
281
- color.setAlpha(0.5);
282
- color.toRgbString(); // "rgba(255, 0, 0, 0.5)"
283
- ```
284
- ### toPercentageRgb
285
- ```js
286
- var color = tinycolor("red");
287
- color.toPercentageRgb() // { r: "100%", g: "0%", b: "0%", a: 1 }
288
- ```
289
- ### toPercentageRgbString
290
- ```js
291
- var color = tinycolor("red");
292
- color.toPercentageRgbString(); // "rgb(100%, 0%, 0%)"
293
- color.setAlpha(0.5);
294
- color.toPercentageRgbString(); // "rgba(100%, 0%, 0%, 0.5)"
295
- ```
296
- ### toName
297
- ```js
298
- var color = tinycolor("red");
299
- color.toName(); // "red"
300
- ```
301
- ### toFilter
302
- ```
303
- var color = tinycolor("red");
304
- color.toFilter(); // "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)"
305
- ```
306
- ### toString
307
-
308
- Print to a string, depending on the input format. You can also override this by passing one of `"rgb", "prgb", "hex6", "hex3", "hex8", "name", "hsl", "hsv"` into the function.
309
- ```js
310
- var color1 = tinycolor("red");
311
- color1.toString(); // "red"
312
- color1.toString("hsv"); // "hsv(0, 100%, 100%)"
313
-
314
- var color2 = tinycolor("rgb(255, 0, 0)");
315
- color2.toString(); // "rgb(255, 0, 0)"
316
- color2.setAlpha(.5);
317
- color2.toString(); // "rgba(255, 0, 0, 0.5)"
318
- ```
319
- ### Color Modification
320
-
321
- These methods manipulate the current color, and return it for chaining. For instance:
322
- ```js
323
- tinycolor("red").lighten().desaturate().toHexString() // "#f53d3d"
324
- ```
325
- ### lighten
326
-
327
- `lighten: function(amount = 10) -> TinyColor`. Lighten the color a given amount, from 0 to 100. Providing 100 will always return white.
328
- ```js
329
- tinycolor("#f00").lighten().toString(); // "#ff3333"
330
- tinycolor("#f00").lighten(100).toString(); // "#ffffff"
331
- ```
332
- ### brighten
333
-
334
- `brighten: function(amount = 10) -> TinyColor`. Brighten the color a given amount, from 0 to 100.
335
- ```js
336
- tinycolor("#f00").brighten().toString(); // "#ff1919"
337
- ```
338
- ### darken
339
-
340
- `darken: function(amount = 10) -> TinyColor`. Darken the color a given amount, from 0 to 100. Providing 100 will always return black.
341
- ```js
342
- tinycolor("#f00").darken().toString(); // "#cc0000"
343
- tinycolor("#f00").darken(100).toString(); // "#000000"
344
- ```
345
- ### desaturate
346
-
347
- `desaturate: function(amount = 10) -> TinyColor`. Desaturate the color a given amount, from 0 to 100. Providing 100 will is the same as calling `greyscale`.
348
- ```js
349
- tinycolor("#f00").desaturate().toString(); // "#f20d0d"
350
- tinycolor("#f00").desaturate(100).toString(); // "#808080"
351
- ```
352
- ### saturate
353
-
354
- `saturate: function(amount = 10) -> TinyColor`. Saturate the color a given amount, from 0 to 100.
355
- ```js
356
- tinycolor("hsl(0, 10%, 50%)").saturate().toString(); // "hsl(0, 20%, 50%)"
357
- ```
358
- ### greyscale
359
-
360
- `greyscale: function() -> TinyColor`. Completely desaturates a color into greyscale. Same as calling `desaturate(100)`.
361
- ```js
362
- tinycolor("#f00").greyscale().toString(); // "#808080"
363
- ```
364
- ### spin
365
-
366
- `spin: function(amount = 0) -> TinyColor`. Spin the hue a given amount, from -360 to 360. Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).
367
- ```js
368
- tinycolor("#f00").spin(180).toString(); // "#00ffff"
369
- tinycolor("#f00").spin(-90).toString(); // "#7f00ff"
370
- tinycolor("#f00").spin(90).toString(); // "#80ff00"
371
-
372
- // spin(0) and spin(360) do nothing
373
- tinycolor("#f00").spin(0).toString(); // "#ff0000"
374
- tinycolor("#f00").spin(360).toString(); // "#ff0000"
375
- ```
376
- ### Color Combinations
377
-
378
- Combination functions return an array of TinyColor objects unless otherwise noted.
379
-
380
- ### analogous
381
-
382
- `analogous: function(, results = 6, slices = 30) -> array<TinyColor>`.
383
- ```js
384
- var colors = tinycolor("#f00").analogous();
385
-
386
- colors.map(function(t) { return t.toHexString(); }); // [ "#ff0000", "#ff0066", "#ff0033", "#ff0000", "#ff3300", "#ff6600" ]
387
- ```
388
- ### monochromatic
389
-
390
- `monochromatic: function(, results = 6) -> array<TinyColor>`.
391
- ```js
392
- var colors = tinycolor("#f00").monochromatic();
393
-
394
- colors.map(function(t) { return t.toHexString(); }); // [ "#ff0000", "#2a0000", "#550000", "#800000", "#aa0000", "#d40000" ]
395
- ```
396
- ### splitcomplement
397
-
398
- `splitcomplement: function() -> array<TinyColor>`.
399
- ```js
400
- var colors = tinycolor("#f00").splitcomplement();
401
-
402
- colors.map(function(t) { return t.toHexString(); }); // [ "#ff0000", "#ccff00", "#0066ff" ]
403
- ```
404
- ### triad
405
-
406
- `triad: function() -> array<TinyColor>`.
407
- ```js
408
- var colors = tinycolor("#f00").triad();
409
-
410
- colors.map(function(t) { return t.toHexString(); }); // [ "#ff0000", "#00ff00", "#0000ff" ]
411
- ```
412
- ### tetrad
413
-
414
- `tetrad: function() -> array<TinyColor>`.
415
- ```js
416
- var colors = tinycolor("#f00").tetrad();
417
-
418
- colors.map(function(t) { return t.toHexString(); }); // [ "#ff0000", "#80ff00", "#00ffff", "#7f00ff" ]
419
-
420
- ```
421
- ### complement
422
-
423
- `complement: function() -> TinyColor`.
424
- ```js
425
- tinycolor("#f00").complement().toHexString(); // "#00ffff"
426
- ```
427
- ## Color Utilities
428
- ```js
429
- tinycolor.equals(color1, color2)
430
- tinycolor.mix(color1, color2, amount = 50)
431
- ```
432
- ### random
433
-
434
- Returns a random color.
435
- ```js
436
- var color = tinycolor.random();
437
- color.toRgb(); // "{r: 145, g: 40, b: 198, a: 1}"
438
- ```
439
-
440
- ### Readability
441
-
442
- TinyColor assesses readability based on the [Web Content Accessibility Guidelines (Version 2.0)](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).
443
-
444
- #### readability
445
-
446
- `readability: function(TinyColor, TinyColor) -> Object`.
447
- Returns the contrast ratio between two colors.
448
- ```js
449
- tinycolor.readability("#000", "#000"); // 1
450
- tinycolor.readability("#000", "#111"); // 1.1121078324840545
451
- tinycolor.readability("#000", "#fff"); // 21
452
- ```
453
- Use the values in your own calculations, or use one of the convenience functions below.
454
-
455
- #### isReadable
456
-
457
- `isReadable: function(TinyColor, TinyColor, Object) -> Boolean`. Ensure that foreground and background color combinations meet WCAG guidelines. `Object` is optional, defaulting to `{level: "AA",size: "small"}`. `level` can be `"AA"` or "AAA" and `size` can be `"small"` or `"large"`.
458
-
459
- Here are links to read more about the [AA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) and [AAA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html) requirements.
460
- ```js
461
- tinycolor.isReadable("#000", "#111", {}); // false
462
- tinycolor.isReadable("#ff0088", "#5c1a72",{level:"AA",size:"small"}); //false
463
- tinycolor.isReadable("#ff0088", "#5c1a72",{level:"AA",size:"large"}), //true
464
- ```
465
- #### mostReadable
466
-
467
- `mostReadable: function(TinyColor, [TinyColor, Tinycolor ...], Object) -> Boolean`.
468
- Given a base color and a list of possible foreground or background colors for that base, returns the most readable color.
469
- If none of the colors in the list is readable, `mostReadable` will return the better of black or white if `includeFallbackColors:true`.
470
- ```js
471
- tinycolor.mostReadable("#000", ["#f00", "#0f0", "#00f"]).toHexString(); // "#00ff00"
472
- tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
473
- tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
474
- tinycolor.mostReadable("#ff0088", ["#2e0c3a"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString() // "#2e0c3a",
475
- tinycolor.mostReadable("#ff0088", ["#2e0c3a"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString() // "#000000",
476
- ```
477
- See [index.html](https://github.com/bgrins/TinyColor/blob/master/index.html) in the project for a demo.
478
-
479
- ## Common operations
480
-
481
- ### clone
482
-
483
- `clone: function() -> TinyColor`.
484
- Instantiate a new TinyColor object with the same color. Any changes to the new one won't affect the old one.
485
- ```js
486
- var color1 = tinycolor("#F00");
487
- var color2 = color1.clone();
488
- color2.setAlpha(.5);
489
-
490
- color1.toString(); // "#ff0000"
491
- color2.toString(); // "rgba(255, 0, 0, 0.5)"
492
- ```