@lakuna/color 1.1.1 → 1.2.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 (368) hide show
  1. package/LICENSE +1 -1
  2. package/dist/{utility → convert}/adobeToXyz.d.ts +1 -1
  3. package/dist/convert/adobeToXyz.d.ts.map +1 -0
  4. package/dist/{utility → convert}/adobeToXyz.js +5 -3
  5. package/dist/convert/adobeToXyz.js.map +1 -0
  6. package/dist/{utility → convert}/cmyToCmyk.d.ts +1 -1
  7. package/dist/convert/cmyToCmyk.d.ts.map +1 -0
  8. package/dist/{utility → convert}/cmyToCmyk.js +0 -3
  9. package/dist/convert/cmyToCmyk.js.map +1 -0
  10. package/dist/{utility → convert}/cmyToRgb.d.ts +1 -1
  11. package/dist/{utility → convert}/cmyToRgb.d.ts.map +1 -1
  12. package/dist/{utility → convert}/cmyToRgb.js.map +1 -1
  13. package/dist/{utility → convert}/cmykToCmy.d.ts +1 -1
  14. package/dist/{utility → convert}/cmykToCmy.d.ts.map +1 -1
  15. package/dist/{utility → convert}/cmykToCmy.js +0 -1
  16. package/dist/convert/cmykToCmy.js.map +1 -0
  17. package/dist/{utility → convert}/hexToRgb.d.ts +1 -1
  18. package/dist/convert/hexToRgb.d.ts.map +1 -0
  19. package/dist/{utility → convert}/hexToRgb.js.map +1 -1
  20. package/dist/{utility → convert}/hslToRgb.d.ts +1 -1
  21. package/dist/convert/hslToRgb.d.ts.map +1 -0
  22. package/dist/{utility → convert}/hslToRgb.js +5 -6
  23. package/dist/convert/hslToRgb.js.map +1 -0
  24. package/dist/{utility → convert}/hsvToRgb.d.ts +1 -1
  25. package/dist/{utility → convert}/hsvToRgb.d.ts.map +1 -1
  26. package/dist/{utility → convert}/hsvToRgb.js +0 -2
  27. package/dist/convert/hsvToRgb.js.map +1 -0
  28. package/dist/{utility → convert}/hunterToXyz.d.ts +1 -1
  29. package/dist/convert/hunterToXyz.d.ts.map +1 -0
  30. package/dist/{utility → convert}/hunterToXyz.js +6 -7
  31. package/dist/convert/hunterToXyz.js.map +1 -0
  32. package/dist/convert/labToLch.d.ts +19 -0
  33. package/dist/convert/labToLch.d.ts.map +1 -0
  34. package/dist/convert/labToLch.js +12 -0
  35. package/dist/convert/labToLch.js.map +1 -0
  36. package/dist/{utility → convert}/labToXyz.d.ts +1 -1
  37. package/dist/convert/labToXyz.d.ts.map +1 -0
  38. package/dist/{utility → convert}/labToXyz.js +8 -5
  39. package/dist/convert/labToXyz.js.map +1 -0
  40. package/dist/convert/lchToLab.d.ts +19 -0
  41. package/dist/convert/lchToLab.d.ts.map +1 -0
  42. package/dist/convert/lchToLab.js +7 -0
  43. package/dist/convert/lchToLab.js.map +1 -0
  44. package/dist/{utility → convert}/luvToXyz.d.ts +1 -1
  45. package/dist/convert/luvToXyz.d.ts.map +1 -0
  46. package/dist/{utility → convert}/luvToXyz.js +4 -6
  47. package/dist/convert/luvToXyz.js.map +1 -0
  48. package/dist/{utility → convert}/rgbToCmy.d.ts +1 -1
  49. package/dist/{utility → convert}/rgbToCmy.d.ts.map +1 -1
  50. package/dist/{utility → convert}/rgbToCmy.js.map +1 -1
  51. package/dist/{utility → convert}/rgbToHex.d.ts.map +1 -1
  52. package/dist/{utility → convert}/rgbToHex.js +3 -1
  53. package/dist/convert/rgbToHex.js.map +1 -0
  54. package/dist/convert/rgbToHsi.d.ts +10 -0
  55. package/dist/convert/rgbToHsi.d.ts.map +1 -0
  56. package/dist/convert/rgbToHsi.js +36 -0
  57. package/dist/convert/rgbToHsi.js.map +1 -0
  58. package/dist/{utility → convert}/rgbToHsl.d.ts +1 -1
  59. package/dist/convert/rgbToHsl.d.ts.map +1 -0
  60. package/dist/convert/rgbToHsl.js +37 -0
  61. package/dist/convert/rgbToHsl.js.map +1 -0
  62. package/dist/{utility → convert}/rgbToHsv.d.ts +1 -1
  63. package/dist/convert/rgbToHsv.d.ts.map +1 -0
  64. package/dist/{utility → convert}/rgbToHsv.js +11 -11
  65. package/dist/convert/rgbToHsv.js.map +1 -0
  66. package/dist/{utility → convert}/rgbToXyz.d.ts +1 -1
  67. package/dist/convert/rgbToXyz.d.ts.map +1 -0
  68. package/dist/{utility → convert}/rgbToXyz.js +9 -3
  69. package/dist/convert/rgbToXyz.js.map +1 -0
  70. package/dist/{utility → convert}/xyzToAdobe.d.ts +1 -1
  71. package/dist/convert/xyzToAdobe.d.ts.map +1 -0
  72. package/dist/{utility → convert}/xyzToAdobe.js +5 -3
  73. package/dist/convert/xyzToAdobe.js.map +1 -0
  74. package/dist/{utility → convert}/xyzToHunter.d.ts +2 -2
  75. package/dist/convert/xyzToHunter.d.ts.map +1 -0
  76. package/dist/{utility → convert}/xyzToHunter.js +7 -8
  77. package/dist/convert/xyzToHunter.js.map +1 -0
  78. package/dist/{utility → convert}/xyzToLab.d.ts +1 -1
  79. package/dist/convert/xyzToLab.d.ts.map +1 -0
  80. package/dist/{utility → convert}/xyzToLab.js +9 -5
  81. package/dist/convert/xyzToLab.js.map +1 -0
  82. package/dist/{utility → convert}/xyzToLuv.d.ts +1 -1
  83. package/dist/convert/xyzToLuv.d.ts.map +1 -0
  84. package/dist/{utility → convert}/xyzToLuv.js +5 -7
  85. package/dist/convert/xyzToLuv.js.map +1 -0
  86. package/dist/{utility → convert}/xyzToRgb.d.ts +1 -1
  87. package/dist/convert/xyzToRgb.d.ts.map +1 -0
  88. package/dist/{utility → convert}/xyzToRgb.js +8 -3
  89. package/dist/convert/xyzToRgb.js.map +1 -0
  90. package/dist/{utility → convert}/xyzToYxy.d.ts +1 -1
  91. package/dist/{utility → convert}/xyzToYxy.d.ts.map +1 -1
  92. package/dist/{utility → convert}/xyzToYxy.js +0 -3
  93. package/dist/convert/xyzToYxy.js.map +1 -0
  94. package/dist/{utility → convert}/yxyToXyz.d.ts +1 -1
  95. package/dist/{utility → convert}/yxyToXyz.d.ts.map +1 -1
  96. package/dist/{utility → convert}/yxyToXyz.js +0 -3
  97. package/dist/convert/yxyToXyz.js.map +1 -0
  98. package/dist/delta/deltaC.d.ts.map +1 -0
  99. package/dist/delta/deltaC.js.map +1 -0
  100. package/dist/{utility → delta}/deltaCmc.d.ts +2 -2
  101. package/dist/delta/deltaCmc.d.ts.map +1 -0
  102. package/dist/{utility → delta}/deltaCmc.js +5 -8
  103. package/dist/delta/deltaCmc.js.map +1 -0
  104. package/dist/{utility → delta}/deltaE00.d.ts +2 -2
  105. package/dist/delta/deltaE00.d.ts.map +1 -0
  106. package/dist/{utility → delta}/deltaE00.js +13 -17
  107. package/dist/delta/deltaE00.js.map +1 -0
  108. package/dist/delta/deltaE76.d.ts.map +1 -0
  109. package/dist/delta/deltaE76.js.map +1 -0
  110. package/dist/{utility → delta}/deltaE94.d.ts +2 -2
  111. package/dist/delta/deltaE94.d.ts.map +1 -0
  112. package/dist/{utility → delta}/deltaE94.js +0 -6
  113. package/dist/delta/deltaE94.js.map +1 -0
  114. package/dist/delta/deltaH.d.ts.map +1 -0
  115. package/dist/{utility → delta}/deltaH.js +0 -4
  116. package/dist/delta/deltaH.js.map +1 -0
  117. package/dist/index.d.ts +41 -31
  118. package/dist/index.d.ts.map +1 -1
  119. package/dist/index.js +41 -30
  120. package/dist/index.js.map +1 -1
  121. package/dist/names/bang.d.ts +2 -2
  122. package/dist/names/bang.d.ts.map +1 -1
  123. package/dist/names/bang.js +471 -471
  124. package/dist/names/bang.js.map +1 -1
  125. package/dist/names/cne.d.ts +1 -1
  126. package/dist/names/cne.d.ts.map +1 -1
  127. package/dist/names/cne.js +843 -843
  128. package/dist/names/cne.js.map +1 -1
  129. package/dist/names/crayola.d.ts +1 -1
  130. package/dist/names/crayola.d.ts.map +1 -1
  131. package/dist/names/crayola.js +110 -110
  132. package/dist/names/crayola.js.map +1 -1
  133. package/dist/names/getName.d.ts.map +1 -1
  134. package/dist/names/getName.js +3 -3
  135. package/dist/names/getName.js.map +1 -1
  136. package/dist/names/hollasch.d.ts +1 -1
  137. package/dist/names/hollasch.d.ts.map +1 -1
  138. package/dist/names/hollasch.js +179 -179
  139. package/dist/names/hollasch.js.map +1 -1
  140. package/dist/names/nbs.d.ts +1 -1
  141. package/dist/names/nbs.d.ts.map +1 -1
  142. package/dist/names/nbs.js +266 -266
  143. package/dist/names/nbs.js.map +1 -1
  144. package/dist/names/ntc.d.ts +1 -1
  145. package/dist/names/ntc.d.ts.map +1 -1
  146. package/dist/names/ntc.js +1519 -1519
  147. package/dist/names/ntc.js.map +1 -1
  148. package/dist/names/resene.d.ts +1 -1
  149. package/dist/names/resene.d.ts.map +1 -1
  150. package/dist/names/resene.js +1331 -1331
  151. package/dist/names/resene.js.map +1 -1
  152. package/dist/names/tcapi.d.ts +1 -1
  153. package/dist/names/tcapi.d.ts.map +1 -1
  154. package/dist/names/tcapi.js +1840 -1840
  155. package/dist/names/tcapi.js.map +1 -1
  156. package/dist/names/x11.d.ts +1 -1
  157. package/dist/names/x11.d.ts.map +1 -1
  158. package/dist/names/x11.js +445 -445
  159. package/dist/names/x11.js.map +1 -1
  160. package/dist/names/xkcd.d.ts +1 -1
  161. package/dist/names/xkcd.d.ts.map +1 -1
  162. package/dist/names/xkcd.js +897 -897
  163. package/dist/names/xkcd.js.map +1 -1
  164. package/dist/palette/analogous.d.ts +28 -0
  165. package/dist/palette/analogous.d.ts.map +1 -0
  166. package/dist/palette/analogous.js +15 -0
  167. package/dist/palette/analogous.js.map +1 -0
  168. package/dist/palette/analogousLch.d.ts +19 -0
  169. package/dist/palette/analogousLch.d.ts.map +1 -0
  170. package/dist/palette/analogousLch.js +15 -0
  171. package/dist/palette/analogousLch.js.map +1 -0
  172. package/dist/palette/complement.d.ts +28 -0
  173. package/dist/palette/complement.d.ts.map +1 -0
  174. package/dist/palette/complement.js +15 -0
  175. package/dist/palette/complement.js.map +1 -0
  176. package/dist/palette/complementLch.d.ts +19 -0
  177. package/dist/palette/complementLch.d.ts.map +1 -0
  178. package/dist/palette/complementLch.js +15 -0
  179. package/dist/palette/complementLch.js.map +1 -0
  180. package/dist/palette/splitComplement.d.ts +28 -0
  181. package/dist/palette/splitComplement.d.ts.map +1 -0
  182. package/dist/palette/splitComplement.js +15 -0
  183. package/dist/palette/splitComplement.js.map +1 -0
  184. package/dist/palette/splitComplementLch.d.ts +19 -0
  185. package/dist/palette/splitComplementLch.d.ts.map +1 -0
  186. package/dist/palette/splitComplementLch.js +15 -0
  187. package/dist/palette/splitComplementLch.js.map +1 -0
  188. package/dist/types/Adobe.d.ts.map +1 -1
  189. package/dist/types/Cmy.d.ts.map +1 -1
  190. package/dist/types/Cmyk.d.ts.map +1 -1
  191. package/dist/types/Hsi.d.ts +15 -0
  192. package/dist/types/Hsi.d.ts.map +1 -0
  193. package/dist/types/Hsi.js +2 -0
  194. package/dist/types/Hsi.js.map +1 -0
  195. package/dist/types/Hsl.d.ts +1 -1
  196. package/dist/types/Hsl.d.ts.map +1 -1
  197. package/dist/types/Hsv.d.ts +1 -1
  198. package/dist/types/Hsv.d.ts.map +1 -1
  199. package/dist/types/Hunter.d.ts.map +1 -1
  200. package/dist/types/Lab.d.ts +2 -2
  201. package/dist/types/Lab.d.ts.map +1 -1
  202. package/dist/types/Lchab.d.ts +15 -0
  203. package/dist/types/Lchab.d.ts.map +1 -0
  204. package/dist/types/Lchab.js +2 -0
  205. package/dist/types/Lchab.js.map +1 -0
  206. package/dist/types/Lchuv.d.ts +15 -0
  207. package/dist/types/Lchuv.d.ts.map +1 -0
  208. package/dist/types/Lchuv.js +2 -0
  209. package/dist/types/Lchuv.js.map +1 -0
  210. package/dist/types/Luv.d.ts +1 -1
  211. package/dist/types/Luv.d.ts.map +1 -1
  212. package/dist/types/Rgb.d.ts.map +1 -1
  213. package/dist/types/Xyz.d.ts.map +1 -1
  214. package/dist/types/Yxy.d.ts.map +1 -1
  215. package/dist/utility/StandardIlluminant.d.ts.map +1 -1
  216. package/dist/utility/StandardIlluminant.js.map +1 -1
  217. package/dist/utility/contrast.d.ts.map +1 -1
  218. package/dist/utility/contrast.js.map +1 -1
  219. package/dist/utility/getReference.d.ts +2 -2
  220. package/dist/utility/getReference.d.ts.map +1 -1
  221. package/dist/utility/getReference.js +39 -39
  222. package/dist/utility/getReference.js.map +1 -1
  223. package/dist/utility/isWebSafe.d.ts +10 -0
  224. package/dist/utility/isWebSafe.d.ts.map +1 -0
  225. package/dist/utility/isWebSafe.js +11 -0
  226. package/dist/utility/isWebSafe.js.map +1 -0
  227. package/dist/utility/relativeLuminance.js.map +1 -1
  228. package/package.json +15 -15
  229. package/src/{utility → convert}/adobeToXyz.ts +10 -4
  230. package/src/{utility → convert}/cmyToCmyk.ts +5 -4
  231. package/src/{utility → convert}/cmyToRgb.ts +1 -1
  232. package/src/{utility → convert}/cmykToCmy.ts +1 -2
  233. package/src/{utility → convert}/hexToRgb.ts +1 -1
  234. package/src/{utility → convert}/hslToRgb.ts +9 -7
  235. package/src/{utility → convert}/hsvToRgb.ts +2 -3
  236. package/src/{utility → convert}/hunterToXyz.ts +11 -8
  237. package/src/convert/labToLch.ts +36 -0
  238. package/src/{utility → convert}/labToXyz.ts +11 -6
  239. package/src/convert/lchToLab.ts +30 -0
  240. package/src/{utility → convert}/luvToXyz.ts +9 -7
  241. package/src/{utility → convert}/rgbToCmy.ts +1 -1
  242. package/src/{utility → convert}/rgbToHex.ts +5 -1
  243. package/src/convert/rgbToHsi.ts +43 -0
  244. package/src/convert/rgbToHsl.ts +44 -0
  245. package/src/{utility → convert}/rgbToHsv.ts +14 -13
  246. package/src/{utility → convert}/rgbToXyz.ts +11 -4
  247. package/src/{utility → convert}/xyzToAdobe.ts +9 -4
  248. package/src/{utility → convert}/xyzToHunter.ts +12 -9
  249. package/src/{utility → convert}/xyzToLab.ts +12 -6
  250. package/src/{utility → convert}/xyzToLuv.ts +11 -9
  251. package/src/{utility → convert}/xyzToRgb.ts +10 -4
  252. package/src/{utility → convert}/xyzToYxy.ts +3 -4
  253. package/src/{utility → convert}/yxyToXyz.ts +3 -4
  254. package/src/{utility → delta}/deltaC.ts +0 -2
  255. package/src/{utility → delta}/deltaCmc.ts +12 -10
  256. package/src/{utility → delta}/deltaE00.ts +21 -18
  257. package/src/{utility → delta}/deltaE76.ts +0 -2
  258. package/src/{utility → delta}/deltaE94.ts +7 -8
  259. package/src/{utility → delta}/deltaH.ts +3 -6
  260. package/src/index.ts +47 -31
  261. package/src/names/bang.ts +476 -472
  262. package/src/names/cne.ts +848 -844
  263. package/src/names/crayola.ts +115 -111
  264. package/src/names/getName.ts +4 -3
  265. package/src/names/hollasch.ts +184 -180
  266. package/src/names/nbs.ts +271 -267
  267. package/src/names/ntc.ts +1524 -1520
  268. package/src/names/resene.ts +1336 -1332
  269. package/src/names/tcapi.ts +1845 -1841
  270. package/src/names/x11.ts +450 -446
  271. package/src/names/xkcd.ts +902 -898
  272. package/src/palette/analogous.ts +61 -0
  273. package/src/palette/analogousLch.ts +49 -0
  274. package/src/palette/complement.ts +65 -0
  275. package/src/palette/complementLch.ts +50 -0
  276. package/src/palette/splitComplement.ts +61 -0
  277. package/src/palette/splitComplementLch.ts +48 -0
  278. package/src/types/Adobe.ts +3 -0
  279. package/src/types/Cmy.ts +3 -0
  280. package/src/types/Cmyk.ts +4 -0
  281. package/src/types/Hsi.ts +20 -0
  282. package/src/types/Hsl.ts +4 -1
  283. package/src/types/Hsv.ts +4 -1
  284. package/src/types/Hunter.ts +3 -0
  285. package/src/types/Lab.ts +5 -2
  286. package/src/types/Lchab.ts +20 -0
  287. package/src/types/Lchuv.ts +20 -0
  288. package/src/types/Luv.ts +4 -1
  289. package/src/types/Rgb.ts +3 -0
  290. package/src/types/Xyz.ts +3 -0
  291. package/src/types/Yxy.ts +3 -0
  292. package/src/utility/StandardIlluminant.ts +40 -40
  293. package/src/utility/contrast.ts +1 -0
  294. package/src/utility/getReference.ts +42 -41
  295. package/src/utility/isWebSafe.ts +14 -0
  296. package/src/utility/relativeLuminance.ts +1 -1
  297. package/dist/types/Lch.d.ts +0 -16
  298. package/dist/types/Lch.d.ts.map +0 -1
  299. package/dist/types/Lch.js +0 -2
  300. package/dist/types/Lch.js.map +0 -1
  301. package/dist/utility/adobeToXyz.d.ts.map +0 -1
  302. package/dist/utility/adobeToXyz.js.map +0 -1
  303. package/dist/utility/cmyToCmyk.d.ts.map +0 -1
  304. package/dist/utility/cmyToCmyk.js.map +0 -1
  305. package/dist/utility/cmykToCmy.js.map +0 -1
  306. package/dist/utility/deltaC.d.ts.map +0 -1
  307. package/dist/utility/deltaC.js.map +0 -1
  308. package/dist/utility/deltaCmc.d.ts.map +0 -1
  309. package/dist/utility/deltaCmc.js.map +0 -1
  310. package/dist/utility/deltaE00.d.ts.map +0 -1
  311. package/dist/utility/deltaE00.js.map +0 -1
  312. package/dist/utility/deltaE76.d.ts.map +0 -1
  313. package/dist/utility/deltaE76.js.map +0 -1
  314. package/dist/utility/deltaE94.d.ts.map +0 -1
  315. package/dist/utility/deltaE94.js.map +0 -1
  316. package/dist/utility/deltaH.d.ts.map +0 -1
  317. package/dist/utility/deltaH.js.map +0 -1
  318. package/dist/utility/hexToRgb.d.ts.map +0 -1
  319. package/dist/utility/hslToRgb.d.ts.map +0 -1
  320. package/dist/utility/hslToRgb.js.map +0 -1
  321. package/dist/utility/hsvToRgb.js.map +0 -1
  322. package/dist/utility/hunterToXyz.d.ts.map +0 -1
  323. package/dist/utility/hunterToXyz.js.map +0 -1
  324. package/dist/utility/labToLch.d.ts +0 -11
  325. package/dist/utility/labToLch.d.ts.map +0 -1
  326. package/dist/utility/labToLch.js +0 -19
  327. package/dist/utility/labToLch.js.map +0 -1
  328. package/dist/utility/labToXyz.d.ts.map +0 -1
  329. package/dist/utility/labToXyz.js.map +0 -1
  330. package/dist/utility/lchToLab.d.ts +0 -11
  331. package/dist/utility/lchToLab.d.ts.map +0 -1
  332. package/dist/utility/lchToLab.js +0 -14
  333. package/dist/utility/lchToLab.js.map +0 -1
  334. package/dist/utility/luvToXyz.d.ts.map +0 -1
  335. package/dist/utility/luvToXyz.js.map +0 -1
  336. package/dist/utility/rgbToHex.js.map +0 -1
  337. package/dist/utility/rgbToHsl.d.ts.map +0 -1
  338. package/dist/utility/rgbToHsl.js +0 -31
  339. package/dist/utility/rgbToHsl.js.map +0 -1
  340. package/dist/utility/rgbToHsv.d.ts.map +0 -1
  341. package/dist/utility/rgbToHsv.js.map +0 -1
  342. package/dist/utility/rgbToXyz.d.ts.map +0 -1
  343. package/dist/utility/rgbToXyz.js.map +0 -1
  344. package/dist/utility/xyzToAdobe.d.ts.map +0 -1
  345. package/dist/utility/xyzToAdobe.js.map +0 -1
  346. package/dist/utility/xyzToHunter.d.ts.map +0 -1
  347. package/dist/utility/xyzToHunter.js.map +0 -1
  348. package/dist/utility/xyzToLab.d.ts.map +0 -1
  349. package/dist/utility/xyzToLab.js.map +0 -1
  350. package/dist/utility/xyzToLuv.d.ts.map +0 -1
  351. package/dist/utility/xyzToLuv.js.map +0 -1
  352. package/dist/utility/xyzToRgb.d.ts.map +0 -1
  353. package/dist/utility/xyzToRgb.js.map +0 -1
  354. package/dist/utility/xyzToYxy.js.map +0 -1
  355. package/dist/utility/yxyToXyz.js.map +0 -1
  356. package/src/types/Lch.ts +0 -18
  357. package/src/utility/labToLch.ts +0 -24
  358. package/src/utility/lchToLab.ts +0 -18
  359. package/src/utility/rgbToHsl.ts +0 -38
  360. /package/dist/{utility → convert}/cmyToRgb.js +0 -0
  361. /package/dist/{utility → convert}/hexToRgb.js +0 -0
  362. /package/dist/{utility → convert}/rgbToCmy.js +0 -0
  363. /package/dist/{utility → convert}/rgbToHex.d.ts +0 -0
  364. /package/dist/{utility → delta}/deltaC.d.ts +0 -0
  365. /package/dist/{utility → delta}/deltaC.js +0 -0
  366. /package/dist/{utility → delta}/deltaE76.d.ts +0 -0
  367. /package/dist/{utility → delta}/deltaE76.js +0 -0
  368. /package/dist/{utility → delta}/deltaH.d.ts +0 -0
@@ -0,0 +1,61 @@
1
+ import type Hsi from "../types/Hsi.js";
2
+ import type Hsl from "../types/Hsl.js";
3
+ import type Hsv from "../types/Hsv.js";
4
+
5
+ /** Number of degrees in a circle. */
6
+ const d = 360;
7
+
8
+ /**
9
+ * Determine the analogous colors of the given color.
10
+ * @param color - The color to find the analogues of in HSI.
11
+ * @param subdivisions - The number of slices to divide the color wheel into.
12
+ * @returns The analogues of the given color.
13
+ * @public
14
+ */
15
+ export default function analogous(
16
+ color: Hsi,
17
+ subdivisions?: number
18
+ ): [[number, number, number] & Hsi, [number, number, number] & Hsi];
19
+ /**
20
+ * Determine the analogous colors of the given color.
21
+ * @param color - The color to find the analogues of in HSL.
22
+ * @param subdivisions - The number of slices to divide the color wheel into.
23
+ * @returns The analogues of the given color.
24
+ * @public
25
+ */
26
+ export default function analogous(
27
+ color: Hsl,
28
+ subdivisions?: number
29
+ ): [[number, number, number] & Hsl, [number, number, number] & Hsl];
30
+ /**
31
+ * Determine the analogous colors of the given color.
32
+ * @param color - The color to find the analogues of in HSV.
33
+ * @param subdivisions - The number of slices to divide the color wheel into.
34
+ * @returns The analogues of the given color.
35
+ * @public
36
+ */
37
+ export default function analogous(
38
+ color: Hsv,
39
+ subdivisions?: number
40
+ ): [[number, number, number] & Hsv, [number, number, number] & Hsv];
41
+ export default function analogous(
42
+ color: Hsi | Hsl | Hsv,
43
+ subdivisions = 12
44
+ ):
45
+ | [[number, number, number] & Hsi, [number, number, number] & Hsi]
46
+ | [[number, number, number] & Hsl, [number, number, number] & Hsl]
47
+ | [[number, number, number] & Hsv, [number, number, number] & Hsv] {
48
+ const s = color[1];
49
+
50
+ const x = color[2];
51
+
52
+ const hueAngle = color[0] * d;
53
+ const deltaAngle = d / subdivisions;
54
+ const underAngle = hueAngle - deltaAngle;
55
+ const overAngle = hueAngle + deltaAngle;
56
+
57
+ return [
58
+ [(underAngle > d ? underAngle - d : underAngle) / d, s, x],
59
+ [(overAngle > d ? overAngle - d : overAngle) / d, s, x]
60
+ ];
61
+ }
@@ -0,0 +1,49 @@
1
+ import type Lchab from "../types/Lchab.js";
2
+ import type Lchuv from "../types/Lchuv.js";
3
+
4
+ /** Number of degrees in a circle. */
5
+ const d = 360;
6
+
7
+ /**
8
+ * Determine the analogous colors of the given color.
9
+ * @param color - The color to find the analogues of in CIE-L\*Ch(ab).
10
+ * @param subdivisions - The number of slices to divide the color wheel into.
11
+ * @returns The analogues of the given color.
12
+ * @public
13
+ */
14
+ export default function analogousLch(
15
+ color: Lchab,
16
+ subdivisions?: number
17
+ ): [[number, number, number] & Lchab, [number, number, number] & Lchab];
18
+ /**
19
+ * Determine the analogous colors of the given color.
20
+ * @param color - The color to find the analogues of in CIE-L\*Ch(uv).
21
+ * @param subdivisions - The number of slices to divide the color wheel into.
22
+ * @returns The analogues of the given color.
23
+ * @public
24
+ */
25
+ export default function analogousLch(
26
+ color: Lchuv,
27
+ subdivisions?: number
28
+ ): [[number, number, number] & Lchuv, [number, number, number] & Lchuv];
29
+ export default function analogousLch(
30
+ color: Lchab | Lchuv,
31
+ subdivisions = 12
32
+ ):
33
+ | [[number, number, number] & Lchab, [number, number, number] & Lchab]
34
+ | [[number, number, number] & Lchuv, [number, number, number] & Lchuv] {
35
+ const l = color[0];
36
+
37
+ const c = color[1];
38
+
39
+ const h = color[2];
40
+
41
+ const deltaAngle = d / subdivisions;
42
+ const underAngle = h - deltaAngle;
43
+ const overAngle = h + deltaAngle;
44
+
45
+ return [
46
+ [l, c, (underAngle > d ? underAngle - d : underAngle) / d],
47
+ [l, c, (overAngle > d ? overAngle - d : overAngle) / d]
48
+ ];
49
+ }
@@ -0,0 +1,65 @@
1
+ import type Hsi from "../types/Hsi.js";
2
+ import type Hsl from "../types/Hsl.js";
3
+ import type Hsv from "../types/Hsv.js";
4
+
5
+ /** Number of degrees in a circle. */
6
+ const d = 360;
7
+
8
+ /**
9
+ * Determine the complementary color(s) of the given color.
10
+ * @param color - The color to find the complement(s) of in HSI.
11
+ * @param n - The number of complements to find. This can be `1` for a complementary color, `2` for triadic colors, `3` for tetradic colors, and so on.
12
+ * @returns The complements of the given color.
13
+ * @public
14
+ */
15
+ export default function complement(
16
+ color: Hsi,
17
+ n?: number
18
+ ): ([number, number, number] & Hsi)[];
19
+ /**
20
+ * Determine the complementary color(s) of the given color.
21
+ * @param color - The color to find the complement(s) of in HSL.
22
+ * @param n - The number of complements to find. This can be `1` for a complementary color, `2` for triadic colors, `3` for tetradic colors, and so on.
23
+ * @returns The complements of the given color.
24
+ * @public
25
+ */
26
+ export default function complement(
27
+ color: Hsl,
28
+ n?: number
29
+ ): ([number, number, number] & Hsl)[];
30
+ /**
31
+ * Determine the complementary color(s) of the given color.
32
+ * @param color - The color to find the complement(s) of in HSV.
33
+ * @param n - The number of complements to find. This can be `1` for a complementary color, `2` for triadic colors, `3` for tetradic colors, and so on.
34
+ * @returns The complements of the given color.
35
+ * @public
36
+ */
37
+ export default function complement(
38
+ color: Hsv,
39
+ n?: number
40
+ ): ([number, number, number] & Hsv)[];
41
+ export default function complement(
42
+ color: Hsi | Hsl | Hsv,
43
+ n = 1
44
+ ):
45
+ | ([number, number, number] & Hsi)[]
46
+ | ([number, number, number] & Hsl)[]
47
+ | ([number, number, number] & Hsv)[] {
48
+ const s = color[1];
49
+
50
+ const x = color[2];
51
+
52
+ const hueAngle = color[0] * d;
53
+ const deltaAngle = d / (n + 1);
54
+
55
+ const out:
56
+ | ([number, number, number] & Hsi)[]
57
+ | ([number, number, number] & Hsl)[]
58
+ | ([number, number, number] & Hsv)[] = [];
59
+ for (let i = 1; i <= n; i++) {
60
+ const angle = hueAngle + deltaAngle * i;
61
+ out.push([(angle > d ? angle - d : angle) / d, s, x]);
62
+ }
63
+
64
+ return out;
65
+ }
@@ -0,0 +1,50 @@
1
+ import type Lchab from "../types/Lchab.js";
2
+ import type Lchuv from "../types/Lchuv.js";
3
+
4
+ /** Number of degrees in a circle. */
5
+ const d = 360;
6
+
7
+ /**
8
+ * Determine the complementary color(s) of the given color.
9
+ * @param color - The color to find the complement(s) of in CIE-L\*Ch(ab).
10
+ * @param n - The number of complements to find. This can be `1` for a complementary color, `2` for triadic colors, `3` for tetradic colors, and so on.
11
+ * @returns The complements of the given color.
12
+ * @public
13
+ */
14
+ export default function complementLch(
15
+ color: Lchab,
16
+ n?: number
17
+ ): ([number, number, number] & Lchab)[];
18
+ /**
19
+ * Determine the complementary color(s) of the given color.
20
+ * @param color - The color to find the complement(s) of in CIE-L\*Ch(uv).
21
+ * @param n - The number of complements to find. This can be `1` for a complementary color, `2` for triadic colors, `3` for tetradic colors, and so on.
22
+ * @returns The complements of the given color.
23
+ * @public
24
+ */
25
+ export default function complementLch(
26
+ color: Lchuv,
27
+ n?: number
28
+ ): ([number, number, number] & Lchuv)[];
29
+ export default function complementLch(
30
+ color: Lchab | Lchuv,
31
+ n = 1
32
+ ): ([number, number, number] & Lchab)[] | ([number, number, number] & Lchuv)[] {
33
+ const l = color[0];
34
+
35
+ const c = color[1];
36
+
37
+ const h = color[2];
38
+
39
+ const deltaAngle = d / (n + 1);
40
+
41
+ const out:
42
+ | ([number, number, number] & Lchab)[]
43
+ | ([number, number, number] & Lchuv)[] = [];
44
+ for (let i = 1; i <= n; i++) {
45
+ const angle = h + deltaAngle * i;
46
+ out.push([l, c, (angle > d ? angle - d : angle) / d]);
47
+ }
48
+
49
+ return out;
50
+ }
@@ -0,0 +1,61 @@
1
+ import type Hsi from "../types/Hsi.js";
2
+ import type Hsl from "../types/Hsl.js";
3
+ import type Hsv from "../types/Hsv.js";
4
+
5
+ /** Number of degrees in a circle. */
6
+ const d = 360;
7
+
8
+ /**
9
+ * Determine the split complementary colors of the given color.
10
+ * @param color - The color to find the split complements of in HSI.
11
+ * @param subdivisions - The number of slices to divide the color wheel into.
12
+ * @returns The complements of the given color.
13
+ * @public
14
+ */
15
+ export default function splitComplement(
16
+ color: Hsi,
17
+ subdivisions?: number
18
+ ): [[number, number, number] & Hsi, [number, number, number] & Hsi];
19
+ /**
20
+ * Determine the split complementary colors of the given color.
21
+ * @param color - The color to find the split complements of in HSL.
22
+ * @param subdivisions - The number of slices to divide the color wheel into.
23
+ * @returns The complements of the given color.
24
+ * @public
25
+ */
26
+ export default function splitComplement(
27
+ color: Hsl,
28
+ subdivisions?: number
29
+ ): [[number, number, number] & Hsl, [number, number, number] & Hsl];
30
+ /**
31
+ * Determine the split complementary colors of the given color.
32
+ * @param color - The color to find the split complements of in HSV.
33
+ * @param subdivisions - The number of slices to divide the color wheel into.
34
+ * @returns The complements of the given color.
35
+ * @public
36
+ */
37
+ export default function splitComplement(
38
+ color: Hsv,
39
+ subdivisions?: number
40
+ ): [[number, number, number] & Hsv, [number, number, number] & Hsv];
41
+ export default function splitComplement(
42
+ color: Hsi | Hsl | Hsv,
43
+ subdivisions = 12
44
+ ):
45
+ | [[number, number, number] & Hsi, [number, number, number] & Hsi]
46
+ | [[number, number, number] & Hsl, [number, number, number] & Hsl]
47
+ | [[number, number, number] & Hsv, [number, number, number] & Hsv] {
48
+ const s = color[1];
49
+
50
+ const x = color[2];
51
+
52
+ const deltaAngle = d / subdivisions;
53
+ const oppositeAngle = color[0] * d + d / 2;
54
+ const underAngle = oppositeAngle - deltaAngle;
55
+ const overAngle = oppositeAngle + deltaAngle;
56
+
57
+ return [
58
+ [(underAngle > d ? underAngle - d : underAngle) / d, s, x],
59
+ [(overAngle > d ? overAngle - d : overAngle) / d, s, x]
60
+ ];
61
+ }
@@ -0,0 +1,48 @@
1
+ import type Lchab from "../types/Lchab.js";
2
+ import type Lchuv from "../types/Lchuv.js";
3
+
4
+ /** Number of degrees in a circle. */
5
+ const d = 360;
6
+
7
+ /**
8
+ * Determine the split complementary colors of the given color.
9
+ * @param color - The color to find the split complements of in CIE-L\*Ch(ab).
10
+ * @param subdivisions - The number of slices to divide the color wheel into.
11
+ * @returns The complements of the given color.
12
+ * @public
13
+ */
14
+ export default function splitComplementLch(
15
+ color: Lchab,
16
+ subdivisions?: number
17
+ ): [[number, number, number] & Lchab, [number, number, number] & Lchab];
18
+ /**
19
+ * Determine the split complementary colors of the given color.
20
+ * @param color - The color to find the split complements of in CIE-L\*Ch(uv).
21
+ * @param subdivisions - The number of slices to divide the color wheel into.
22
+ * @returns The complements of the given color.
23
+ * @public
24
+ */
25
+ export default function splitComplementLch(
26
+ color: Lchuv,
27
+ subdivisions?: number
28
+ ): [[number, number, number] & Lchuv, [number, number, number] & Lchuv];
29
+ export default function splitComplementLch(
30
+ color: Lchab | Lchuv,
31
+ subdivisions = 12
32
+ ):
33
+ | [[number, number, number] & Lchab, [number, number, number] & Lchab]
34
+ | [[number, number, number] & Lchuv, [number, number, number] & Lchuv] {
35
+ const l = color[0];
36
+
37
+ const c = color[1];
38
+
39
+ const deltaAngle = d / subdivisions;
40
+ const oppositeAngle = color[2] + d / 2;
41
+ const underAngle = oppositeAngle - deltaAngle;
42
+ const overAngle = oppositeAngle + deltaAngle;
43
+
44
+ return [
45
+ [l, c, (underAngle > d ? underAngle - d : underAngle) / d],
46
+ [l, c, (overAngle > d ? overAngle - d : overAngle) / d]
47
+ ];
48
+ }
@@ -7,11 +7,14 @@ import type { Color } from "./Color.js";
7
7
  */
8
8
  export default interface Adobe extends Color {
9
9
  /** The red channel of this color in the range `[0x00,0xff]`. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
11
  0: number;
11
12
 
12
13
  /** The green channel of this color in the range `[0x00,0xff]`. */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
15
  1: number;
14
16
 
15
17
  /** The blue channel of this color in the range `[0x00,0xff]`. */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16
19
  2: number;
17
20
  }
package/src/types/Cmy.ts CHANGED
@@ -7,11 +7,14 @@ import type { Color } from "./Color.js";
7
7
  */
8
8
  export default interface Cmy extends Color {
9
9
  /** The cyan channel of this color in the range `[0,1]`. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
11
  0: number;
11
12
 
12
13
  /** The magenta channel of this color in the range `[0,1]`. */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
15
  1: number;
14
16
 
15
17
  /** The yellow channel of this color in the range `[0,1]`. */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16
19
  2: number;
17
20
  }
package/src/types/Cmyk.ts CHANGED
@@ -7,14 +7,18 @@ import type { Color } from "./Color.js";
7
7
  */
8
8
  export default interface Cmyk extends Color {
9
9
  /** The cyan channel of this color in the range `[0,1]`. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
11
  0: number;
11
12
 
12
13
  /** The magenta channel of this color in the range `[0,1]`. */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
15
  1: number;
14
16
 
15
17
  /** The yellow channel of this color in the range `[0,1]`. */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16
19
  2: number;
17
20
 
18
21
  /** The key (black) channel of this color in the range `[0,1]`. */
22
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19
23
  3: number;
20
24
  }
@@ -0,0 +1,20 @@
1
+ import type { Color } from "./Color.js";
2
+
3
+ /**
4
+ * An HSI representation of a color. Commonly used in computer vision applications.
5
+ * @see {@link https://en.wikipedia.org/wiki/HSL_and_HSV | HSL and HSV}
6
+ * @public
7
+ */
8
+ export default interface Hsi extends Color {
9
+ /** The hue channel of this color in the range `[0,1]`. Multiply this value by 360 to get the hue angle in degrees. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
11
+ 0: number;
12
+
13
+ /** The saturation channel of this color in the range `[0,1]`. */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
15
+ 1: number;
16
+
17
+ /** The intensity channel of this color in the range `[0,1]`. */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19
+ 2: number;
20
+ }
package/src/types/Hsl.ts CHANGED
@@ -6,12 +6,15 @@ import type { Color } from "./Color.js";
6
6
  * @public
7
7
  */
8
8
  export default interface Hsl extends Color {
9
- /** The hue channel of this color in the range `[0,1]`. */
9
+ /** The hue channel of this color in the range `[0,1]`. Multiply this value by 360 to get the hue angle in degrees. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
11
  0: number;
11
12
 
12
13
  /** The saturation channel of this color in the range `[0,1]`. */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
15
  1: number;
14
16
 
15
17
  /** The lightness channel of this color in the range `[0,1]`. */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16
19
  2: number;
17
20
  }
package/src/types/Hsv.ts CHANGED
@@ -6,12 +6,15 @@ import type { Color } from "./Color.js";
6
6
  * @public
7
7
  */
8
8
  export default interface Hsv extends Color {
9
- /** The hue channel of this color in the range `[0,1]`. */
9
+ /** The hue channel of this color in the range `[0,1]`. Multiply this value by 360 to get the hue angle in degrees. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
11
  0: number;
11
12
 
12
13
  /** The saturation channel of this color in the range `[0,1]`. */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
15
  1: number;
14
16
 
15
17
  /** The value (brightness) channel of this color in the range `[0,1]`. */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16
19
  2: number;
17
20
  }
@@ -7,11 +7,14 @@ import type { Color } from "./Color.js";
7
7
  */
8
8
  export default interface Hunter extends Color {
9
9
  /** The L (lightness) value of this color in the range `[0,100]` (lighter values are whiter). */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
11
  0: number;
11
12
 
12
13
  /** The a opponent color axis value of this color. The positive direction represents redness, while the negative direction represents greenness. */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
15
  1: number;
14
16
 
15
17
  /** The b opponent color axis value of this color. The positive direction represents yellowness, while the negative direction represents blueness. */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16
19
  2: number;
17
20
  }
package/src/types/Lab.ts CHANGED
@@ -1,17 +1,20 @@
1
1
  import type { Color } from "./Color.js";
2
2
 
3
3
  /**
4
- * A CIELAB (L*a*b*) representation of a color. Intended to be a perceptually uniform space. Derived from CIEXYZ. Colors are defined relative to a standard observer. Compared to CIELUV, CIELAB is considered better for reflective surface colors.
4
+ * A CIELAB (L\*a\*b\* or CIE-L\*ab) representation of a color. Intended to be a perceptually uniform space. Derived from CIEXYZ. Colors are defined relative to a standard observer. Compared to CIELUV, CIELAB is considered better for reflective surface colors.
5
5
  * @see {@link https://en.wikipedia.org/wiki/CIELAB_color_space | CIELAB color space}
6
6
  * @public
7
7
  */
8
8
  export default interface Lab extends Color {
9
- /** The L* (perceptual brightness) value of this color in the range `[0,100]`. */
9
+ /** The L* (luminance or perceptual brightness) value of this color in the range `[0,100]`. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
11
  0: number;
11
12
 
12
13
  /** The a* value of this color. Forms a Cartesian coordinate pair with b* to represent the four unique colors of human vision (red, green, blue, and yellow). */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
15
  1: number;
14
16
 
15
17
  /** The b* value of this color. Forms a Cartesian coordinate pair with a* to represent the four unique colors of human vision (red, green, blue, and yellow). */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16
19
  2: number;
17
20
  }
@@ -0,0 +1,20 @@
1
+ import type { Color } from "./Color.js";
2
+
3
+ /**
4
+ * A CIELCh (CIEHLC or CIE-L\*Ch(ab)) representation of a color. Intended to be a perceptually uniform space. Colors are defined relative to a standard observer.
5
+ * @see {@link https://en.wikipedia.org/wiki/CIELAB_color_space | CIELAB color space}
6
+ * @public
7
+ */
8
+ export default interface Lchab extends Color {
9
+ /** The L* (luminance or perceptual brightness) value of this color in the range `[0,100]`. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
11
+ 0: number;
12
+
13
+ /** The C* (chroma/chromaticity or relative saturation) value of this color. Forms a polar coordinate pair with h° to represent the four unique colors of human vision (red, green, blue, and yellow). */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
15
+ 1: number;
16
+
17
+ /** The h° (hue angle) value of this color. Forms a polar coordinate pair with C* to represent the four unique colors of human vision (red, green, blue, and yellow). */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19
+ 2: number;
20
+ }
@@ -0,0 +1,20 @@
1
+ import type { Color } from "./Color.js";
2
+
3
+ /**
4
+ * A CIELCh (CIEHLC or CIE-L\*Ch(uv)) representation of a color. Intended to be a perceptually uniform space. Colors are defined relative to a standard observer.
5
+ * @see {@link https://en.wikipedia.org/wiki/CIELUV | CIELUV}
6
+ * @public
7
+ */
8
+ export default interface Lchuv extends Color {
9
+ /** The L* (luminance or perceptual brightness) value of this color in the range `[0,100]`. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
11
+ 0: number;
12
+
13
+ /** The C* (chroma/chromaticity or relative saturation) value of this color. Forms a polar coordinate pair with h° to represent the four unique colors of human vision (red, green, blue, and yellow). */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
15
+ 1: number;
16
+
17
+ /** The h° (hue angle) value of this color. Forms a polar coordinate pair with C* to represent the four unique colors of human vision (red, green, blue, and yellow). */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
19
+ 2: number;
20
+ }
package/src/types/Luv.ts CHANGED
@@ -1,17 +1,20 @@
1
1
  import type { Color } from "./Color.js";
2
2
 
3
3
  /**
4
- * A CIELUV (CIE 1976 L*,u*,v*) representation of a color. Intended to be a perceptually uniform space. Derived from CIEXYZ. Colors are defined relative to a standard observer. Compared to CIELAB, CIELUV is considered better for emissive, self-illuminated colors (such as those on a monitor).
4
+ * A CIELUV (CIE 1976 L\*,u\*,v\* or CIE-L\*uv) representation of a color. Intended to be a perceptually uniform space. Derived from CIEXYZ. Colors are defined relative to a standard observer. Compared to CIELAB, CIELUV is considered better for emissive, self-illuminated colors (such as those on a monitor).
5
5
  * @see {@link https://en.wikipedia.org/wiki/CIELUV | CIELUV}
6
6
  * @public
7
7
  */
8
8
  export default interface Luv extends Color {
9
9
  /** The L* (perceptual brightness) value of this color in the range `[0,100]`. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
11
  0: number;
11
12
 
12
13
  /** The u* value of this color. Forms a Cartesian coordinate pair with v* to represent the four unique colors of human vision (red, green, blue, and yellow). */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
15
  1: number;
14
16
 
15
17
  /** The v* value of this color. Forms a Cartesian coordinate pair with u* to represent the four unique colors of human vision (red, green, blue, and yellow). */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16
19
  2: number;
17
20
  }
package/src/types/Rgb.ts CHANGED
@@ -7,11 +7,14 @@ import type { Color } from "./Color.js";
7
7
  */
8
8
  export default interface Rgb extends Color {
9
9
  /** The red channel of this color in the range `[0x00,0xff]`. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
11
  0: number;
11
12
 
12
13
  /** The green channel of this color in the range `[0x00,0xff]`. */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
15
  1: number;
14
16
 
15
17
  /** The blue channel of this color in the range `[0x00,0xff]`. */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16
19
  2: number;
17
20
  }
package/src/types/Xyz.ts CHANGED
@@ -7,11 +7,14 @@ import type { Color } from "./Color.js";
7
7
  */
8
8
  export default interface Xyz extends Color {
9
9
  /** The X value of this color. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
11
  0: number;
11
12
 
12
13
  /** The Y value of this color. */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
15
  1: number;
14
16
 
15
17
  /** The Z value of this color. */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16
19
  2: number;
17
20
  }
package/src/types/Yxy.ts CHANGED
@@ -7,11 +7,14 @@ import type { Color } from "./Color.js";
7
7
  */
8
8
  export default interface Yxy extends Color {
9
9
  /** The Y value of this color in the range `[0,100]`. */
10
+ // eslint-disable-next-line @typescript-eslint/naming-convention
10
11
  0: number;
11
12
 
12
13
  /** The x value of this color. */
14
+ // eslint-disable-next-line @typescript-eslint/naming-convention
13
15
  1: number;
14
16
 
15
17
  /** The y value of this color. */
18
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16
19
  2: number;
17
20
  }