index.bundle.js 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. /* Convert between RGB and Hue
  4. /* ========================================================================== */
  5. function rgb2hue(rgbR, rgbG, rgbB) {
  6. var fallbackhue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
  7. var value = rgb2value(rgbR, rgbG, rgbB);
  8. var whiteness = rgb2whiteness(rgbR, rgbG, rgbB);
  9. var delta = value - whiteness;
  10. if (delta) {
  11. // calculate segment
  12. var segment = value === rgbR ? (rgbG - rgbB) / delta : value === rgbG ? (rgbB - rgbR) / delta : (rgbR - rgbG) / delta;
  13. // calculate shift
  14. var shift = value === rgbR ? segment < 0 ? 360 / 60 : 0 / 60 : value === rgbG ? 120 / 60 : 240 / 60;
  15. // calculate hue
  16. var hue = (segment + shift) * 60;
  17. return hue;
  18. } else {
  19. // otherwise return the fallback hue
  20. return fallbackhue;
  21. }
  22. }
  23. function hue2rgb(t1, t2, hue) {
  24. // calculate the ranged hue
  25. var rhue = hue < 0 ? hue + 360 : hue > 360 ? hue - 360 : hue;
  26. // calculate the rgb value
  27. var rgb = rhue * 6 < 360 ? t1 + (t2 - t1) * rhue / 60 : rhue * 2 < 360 ? t2 : rhue * 3 < 720 ? t1 + (t2 - t1) * (240 - rhue) / 60 : t1;
  28. return rgb;
  29. }
  30. /* RGB tooling
  31. /* ========================================================================== */
  32. function rgb2value(rgbR, rgbG, rgbB) {
  33. var value = Math.max(rgbR, rgbG, rgbB);
  34. return value;
  35. }
  36. function rgb2whiteness(rgbR, rgbG, rgbB) {
  37. var whiteness = Math.min(rgbR, rgbG, rgbB);
  38. return whiteness;
  39. }
  40. /* Math matrix
  41. /* ========================================================================== */
  42. function matrix(params, mats) {
  43. return mats.map(function (mat) {
  44. return mat.reduce(function (acc, value, index) {
  45. return acc + params[index] * value;
  46. }, 0);
  47. });
  48. }
  49. /* D50 reference white
  50. /* ========================================================================== */
  51. var wd50X = 96.42;
  52. var wd50Y = 100;
  53. var wd50Z = 82.49;
  54. var epsilon = Math.pow(6, 3) / Math.pow(29, 3);
  55. /* Kappa
  56. /* ========================================================================== */
  57. var kappa = Math.pow(29, 3) / Math.pow(3, 3);
  58. /* Convert between RGB and HSL
  59. /* ========================================================================== */
  60. function rgb2hsl(rgbR, rgbG, rgbB, fallbackhue) {
  61. var hslH = rgb2hue(rgbR, rgbG, rgbB, fallbackhue);
  62. var hslV = rgb2value(rgbR, rgbG, rgbB);
  63. var hslW = rgb2whiteness(rgbR, rgbG, rgbB);
  64. // calculate value/whiteness delta
  65. var hslD = hslV - hslW;
  66. // calculate lightness
  67. var hslL = (hslV + hslW) / 2;
  68. // calculate saturation
  69. var hslS = hslD === 0 ? 0 : hslD / (100 - Math.abs(2 * hslL - 100)) * 100;
  70. return [hslH, hslS, hslL];
  71. }
  72. function hsl2rgb(hslH, hslS, hslL) {
  73. // calcuate t2
  74. var t2 = hslL <= 50 ? hslL * (hslS + 100) / 100 : hslL + hslS - hslL * hslS / 100;
  75. // calcuate t1
  76. var t1 = hslL * 2 - t2;
  77. // calculate rgb
  78. var _ref = [hue2rgb(t1, t2, hslH + 120), hue2rgb(t1, t2, hslH), hue2rgb(t1, t2, hslH - 120)],
  79. rgbR = _ref[0],
  80. rgbG = _ref[1],
  81. rgbB = _ref[2];
  82. return [rgbR, rgbG, rgbB];
  83. }
  84. /*
  85. References
  86. ----------
  87. - https://www.w3.org/TR/css-color-3/#hsl-color
  88. - https://www.w3.org/TR/css-color-4/#hsl-to-rgb
  89. - https://www.rapidtables.com/convert/color/rgb-to-hsl.html
  90. - https://www.rapidtables.com/convert/color/hsl-to-rgb.html
  91. /* ========================================================================== */
  92. var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
  93. /* Convert between RGB and HWB
  94. /* ========================================================================== */
  95. function rgb2hwb(rgbR, rgbG, rgbB, fallbackhue) {
  96. var hwbH = rgb2hue(rgbR, rgbG, rgbB, fallbackhue);
  97. var hwbW = rgb2whiteness(rgbR, rgbG, rgbB);
  98. var hwbV = rgb2value(rgbR, rgbG, rgbB);
  99. var hwbB = 100 - hwbV;
  100. return [hwbH, hwbW, hwbB];
  101. }
  102. function hwb2rgb(hwbH, hwbW, hwbB, fallbackhue) {
  103. var _hsl2rgb$map = hsl2rgb(hwbH, 100, 50, fallbackhue).map(function (v) {
  104. return v * (100 - hwbW - hwbB) / 100 + hwbW;
  105. }),
  106. _hsl2rgb$map2 = _slicedToArray(_hsl2rgb$map, 3),
  107. rgbR = _hsl2rgb$map2[0],
  108. rgbG = _hsl2rgb$map2[1],
  109. rgbB = _hsl2rgb$map2[2];
  110. return [rgbR, rgbG, rgbB];
  111. }
  112. /*
  113. References
  114. ----------
  115. - https://www.w3.org/TR/css-color-4/#hwb-to-rgb
  116. - http://alvyray.com/Papers/CG/hwb2rgb.htm
  117. /* ========================================================================== */
  118. var _slicedToArray$1 = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
  119. /* Convert between RGB and HSV
  120. /* ========================================================================== */
  121. function rgb2hsv(rgbR, rgbG, rgbB, fallbackhue) {
  122. var hsvV = rgb2value(rgbR, rgbG, rgbB);
  123. var hsvW = rgb2whiteness(rgbR, rgbG, rgbB);
  124. var hsvH = rgb2hue(rgbR, rgbG, rgbB, fallbackhue);
  125. // calculate saturation
  126. var hsvS = hsvV === hsvW ? 0 : (hsvV - hsvW) / hsvV * 100;
  127. return [hsvH, hsvS, hsvV];
  128. }
  129. function hsv2rgb(hsvH, hsvS, hsvV) {
  130. var rgbI = Math.floor(hsvH / 60);
  131. // calculate rgb parts
  132. var rgbF = hsvH / 60 - rgbI & 1 ? hsvH / 60 - rgbI : 1 - hsvH / 60 - rgbI;
  133. var rgbM = hsvV * (100 - hsvS) / 100;
  134. var rgbN = hsvV * (100 - hsvS * rgbF) / 100;
  135. var _ref = rgbI === 5 ? [hsvV, rgbM, rgbN] : rgbI === 4 ? [rgbN, rgbM, hsvV] : rgbI === 3 ? [rgbM, rgbN, hsvV] : rgbI === 2 ? [rgbM, hsvV, rgbN] : rgbI === 1 ? [rgbN, hsvV, rgbM] : [hsvV, rgbN, rgbM],
  136. _ref2 = _slicedToArray$1(_ref, 3),
  137. rgbR = _ref2[0],
  138. rgbG = _ref2[1],
  139. rgbB = _ref2[2];
  140. return [rgbR, rgbG, rgbB];
  141. }
  142. /*
  143. References
  144. ----------
  145. - http://alvyray.com/Papers/CG/hsv2rgb.htm
  146. /* ========================================================================== */
  147. var _slicedToArray$2 = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
  148. /* Convert between RGB and XYZ
  149. /* ========================================================================== */
  150. function rgb2xyz(rgbR, rgbG, rgbB) {
  151. var _map = [rgbR, rgbG, rgbB].map(function (v) {
  152. return v > 4.045 ? Math.pow((v + 5.5) / 105.5, 2.4) * 100 : v / 12.92;
  153. }),
  154. _map2 = _slicedToArray$2(_map, 3),
  155. lrgbR = _map2[0],
  156. lrgbB = _map2[1],
  157. lrgbG = _map2[2];
  158. var _matrix = matrix([lrgbR, lrgbB, lrgbG], [[0.4124564, 0.3575761, 0.1804375], [0.2126729, 0.7151522, 0.0721750], [0.0193339, 0.1191920, 0.9503041]]),
  159. _matrix2 = _slicedToArray$2(_matrix, 3),
  160. xyzX = _matrix2[0],
  161. xyzY = _matrix2[1],
  162. xyzZ = _matrix2[2];
  163. return [xyzX, xyzY, xyzZ];
  164. }
  165. function xyz2rgb(xyzX, xyzY, xyzZ) {
  166. var _matrix3 = matrix([xyzX, xyzY, xyzZ], [[3.2404542, -1.5371385, -0.4985314], [-0.9692660, 1.8760108, 0.0415560], [0.0556434, -0.2040259, 1.0572252]]),
  167. _matrix4 = _slicedToArray$2(_matrix3, 3),
  168. lrgbR = _matrix4[0],
  169. lrgbB = _matrix4[1],
  170. lrgbG = _matrix4[2];
  171. var _map3 = [lrgbR, lrgbB, lrgbG].map(function (v) {
  172. return v > 0.31308 ? 1.055 * Math.pow(v / 100, 1 / 2.4) * 100 - 5.5 : 12.92 * v;
  173. }),
  174. _map4 = _slicedToArray$2(_map3, 3),
  175. rgbR = _map4[0],
  176. rgbG = _map4[1],
  177. rgbB = _map4[2];
  178. return [rgbR, rgbG, rgbB];
  179. }
  180. /*
  181. References
  182. ----------
  183. - https://www.w3.org/TR/css-color-4/#rgb-to-lab
  184. - https://www.w3.org/TR/css-color-4/#color-conversion-code
  185. /* ========================================================================== */
  186. /* Convert between HSL and HSV
  187. /* ========================================================================== */
  188. function hsl2hsv(hslH, hslS, hslL) {
  189. var hsv1 = hslS * (hslL < 50 ? hslL : 100 - hslL) / 100;
  190. var hsvS = hsv1 === 0 ? 0 : 2 * hsv1 / (hslL + hsv1) * 100;
  191. var hsvV = hslL + hsv1;
  192. return [hslH, hsvS, hsvV];
  193. }
  194. function hsv2hsl(hsvH, hsvS, hsvV) {
  195. var hslL = (200 - hsvS) * hsvV / 100;
  196. var hslS = hslL === 0 || hslL === 200 ? 0 : hsvS * hsvV / 100 / (hslL <= 100 ? hslL : 200 - hslL) * 100,
  197. hslV = hslL * 5 / 10;
  198. return [hsvH, hslS, hslV];
  199. }
  200. /*
  201. References
  202. ----------
  203. - https://gist.github.com/defims/0ca2ef8832833186ed396a2f8a204117
  204. /* ========================================================================== */
  205. /* Convert between HWB and HSV
  206. /* ========================================================================== */
  207. function hwb2hsv(hwbH, hwbW, hwbB) {
  208. var hsvH = hwbH,
  209. hsvS = hwbB === 100 ? 0 : 100 - hwbW / (100 - hwbB) * 100,
  210. hsvV = 100 - hwbB;
  211. return [hsvH, hsvS, hsvV];
  212. }
  213. function hsv2hwb(hsvH, hsvS, hsvV) {
  214. var hwbH = hsvH,
  215. hwbW = (100 - hsvS) * hsvV / 100,
  216. hwbB = 100 - hsvV;
  217. return [hwbH, hwbW, hwbB];
  218. }
  219. /*
  220. References
  221. ----------
  222. - https://en.wikipedia.org/wiki/HWB_color_model#Converting_to_and_from_HSV
  223. /* ========================================================================== */
  224. var _slicedToArray$3 = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
  225. /* Convert between Lab and XYZ
  226. /* ========================================================================== */
  227. function lab2xyz(labL, labA, labB) {
  228. // compute f, starting with the luminance-related term
  229. var f2 = (labL + 16) / 116;
  230. var f1 = labA / 500 + f2;
  231. var f3 = f2 - labB / 200;
  232. // compute pre-scaled XYZ
  233. var initX = Math.pow(f1, 3) > epsilon ? Math.pow(f1, 3) : (116 * f1 - 16) / kappa,
  234. initY = labL > kappa * epsilon ? Math.pow((labL + 16) / 116, 3) : labL / kappa,
  235. initZ = Math.pow(f3, 3) > epsilon ? Math.pow(f3, 3) : (116 * f3 - 16) / kappa;
  236. var _matrix = matrix(
  237. // compute XYZ by scaling pre-scaled XYZ by reference white
  238. [initX * wd50X, initY * wd50Y, initZ * wd50Z],
  239. // calculate D65 XYZ from D50 XYZ
  240. [[0.9555766, -0.0230393, 0.0631636], [-0.0282895, 1.0099416, 0.0210077], [0.0122982, -0.0204830, 1.3299098]]),
  241. _matrix2 = _slicedToArray$3(_matrix, 3),
  242. xyzX = _matrix2[0],
  243. xyzY = _matrix2[1],
  244. xyzZ = _matrix2[2];
  245. return [xyzX, xyzY, xyzZ];
  246. }
  247. function xyz2lab(xyzX, xyzY, xyzZ) {
  248. // calculate D50 XYZ from D65 XYZ
  249. var _matrix3 = matrix([xyzX, xyzY, xyzZ], [[1.0478112, 0.0228866, -0.0501270], [0.0295424, 0.9904844, -0.0170491], [-0.0092345, 0.0150436, 0.7521316]]),
  250. _matrix4 = _slicedToArray$3(_matrix3, 3),
  251. d50X = _matrix4[0],
  252. d50Y = _matrix4[1],
  253. d50Z = _matrix4[2];
  254. // calculate f
  255. var _map = [d50X / wd50X, d50Y / wd50Y, d50Z / wd50Z].map(function (value) {
  256. return value > epsilon ? Math.cbrt(value) : (kappa * value + 16) / 116;
  257. }),
  258. _map2 = _slicedToArray$3(_map, 3),
  259. f1 = _map2[0],
  260. f2 = _map2[1],
  261. f3 = _map2[2];
  262. var labL = 116 * f2 - 16,
  263. labA = 500 * (f1 - f2),
  264. labB = 200 * (f2 - f3);
  265. return [labL, labA, labB];
  266. }
  267. /*
  268. References
  269. ----------
  270. - https://www.w3.org/TR/css-color-4/#rgb-to-lab
  271. - https://www.w3.org/TR/css-color-4/#color-conversion-code
  272. - https://www.easyrgb.com/en/math.php
  273. /* ========================================================================== */
  274. /* Convert between Lab and XYZ
  275. /* ========================================================================== */
  276. function lab2lch(labL, labA, labB) {
  277. var _ref = [Math.sqrt(Math.pow(labA, 2) + Math.pow(labB, 2)), // convert to chroma
  278. Math.atan2(labB, labA) * 180 / Math.PI // convert to hue, in degrees
  279. ],
  280. lchC = _ref[0],
  281. lchH = _ref[1];
  282. return [labL, lchC, lchH];
  283. }
  284. function lch2lab(lchL, lchC, lchH) {
  285. // convert to Lab a and b from the polar form
  286. var labA = lchC * Math.cos(lchH * Math.PI / 180),
  287. labB = lchC * Math.sin(lchH * Math.PI / 180);
  288. return [lchL, labA, labB];
  289. }
  290. /*
  291. References
  292. ----------
  293. - https://www.w3.org/TR/css-color-4/#lch-to-lab
  294. - https://www.w3.org/TR/css-color-4/#color-conversion-code
  295. /* ========================================================================== */
  296. var _slicedToArray$4 = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
  297. /* Convert between RGB and Lab
  298. /* ========================================================================== */
  299. function rgb2lab(rgbR, rgbG, rgbB) {
  300. var _rgb2xyz = rgb2xyz(rgbR, rgbG, rgbB),
  301. _rgb2xyz2 = _slicedToArray$4(_rgb2xyz, 3),
  302. xyzX = _rgb2xyz2[0],
  303. xyzY = _rgb2xyz2[1],
  304. xyzZ = _rgb2xyz2[2];
  305. var _xyz2lab = xyz2lab(xyzX, xyzY, xyzZ),
  306. _xyz2lab2 = _slicedToArray$4(_xyz2lab, 3),
  307. labL = _xyz2lab2[0],
  308. labA = _xyz2lab2[1],
  309. labB = _xyz2lab2[2];
  310. return [labL, labA, labB];
  311. }
  312. function lab2rgb(labL, labA, labB) {
  313. var _lab2xyz = lab2xyz(labL, labA, labB),
  314. _lab2xyz2 = _slicedToArray$4(_lab2xyz, 3),
  315. xyzX = _lab2xyz2[0],
  316. xyzY = _lab2xyz2[1],
  317. xyzZ = _lab2xyz2[2];
  318. var _xyz2rgb = xyz2rgb(xyzX, xyzY, xyzZ),
  319. _xyz2rgb2 = _slicedToArray$4(_xyz2rgb, 3),
  320. rgbR = _xyz2rgb2[0],
  321. rgbG = _xyz2rgb2[1],
  322. rgbB = _xyz2rgb2[2];
  323. return [rgbR, rgbG, rgbB];
  324. }
  325. /* Convert between RGB and LCH
  326. /* ========================================================================== */
  327. function rgb2lch(rgbR, rgbG, rgbB) {
  328. var _rgb2xyz3 = rgb2xyz(rgbR, rgbG, rgbB),
  329. _rgb2xyz4 = _slicedToArray$4(_rgb2xyz3, 3),
  330. xyzX = _rgb2xyz4[0],
  331. xyzY = _rgb2xyz4[1],
  332. xyzZ = _rgb2xyz4[2];
  333. var _xyz2lab3 = xyz2lab(xyzX, xyzY, xyzZ),
  334. _xyz2lab4 = _slicedToArray$4(_xyz2lab3, 3),
  335. labL = _xyz2lab4[0],
  336. labA = _xyz2lab4[1],
  337. labB = _xyz2lab4[2];
  338. var _lab2lch = lab2lch(labL, labA, labB),
  339. _lab2lch2 = _slicedToArray$4(_lab2lch, 3),
  340. lchL = _lab2lch2[0],
  341. lchC = _lab2lch2[1],
  342. lchH = _lab2lch2[2];
  343. return [lchL, lchC, lchH];
  344. }
  345. function lch2rgb(lchL, lchC, lchH) {
  346. var _lch2lab = lch2lab(lchL, lchC, lchH),
  347. _lch2lab2 = _slicedToArray$4(_lch2lab, 3),
  348. labL = _lch2lab2[0],
  349. labA = _lch2lab2[1],
  350. labB = _lch2lab2[2];
  351. var _lab2xyz3 = lab2xyz(labL, labA, labB),
  352. _lab2xyz4 = _slicedToArray$4(_lab2xyz3, 3),
  353. xyzX = _lab2xyz4[0],
  354. xyzY = _lab2xyz4[1],
  355. xyzZ = _lab2xyz4[2];
  356. var _xyz2rgb3 = xyz2rgb(xyzX, xyzY, xyzZ),
  357. _xyz2rgb4 = _slicedToArray$4(_xyz2rgb3, 3),
  358. rgbR = _xyz2rgb4[0],
  359. rgbG = _xyz2rgb4[1],
  360. rgbB = _xyz2rgb4[2];
  361. return [rgbR, rgbG, rgbB];
  362. }
  363. /* Convert between HSL and HWB
  364. /* ========================================================================== */
  365. function hwb2hsl(hwbH, hwbW, hwbB) {
  366. var _hwb2hsv = hwb2hsv(hwbH, hwbW, hwbB),
  367. _hwb2hsv2 = _slicedToArray$4(_hwb2hsv, 3),
  368. hsvH = _hwb2hsv2[0],
  369. hsvS = _hwb2hsv2[1],
  370. hsvV = _hwb2hsv2[2];
  371. var _hsv2hsl = hsv2hsl(hsvH, hsvS, hsvV),
  372. _hsv2hsl2 = _slicedToArray$4(_hsv2hsl, 3),
  373. hslH = _hsv2hsl2[0],
  374. hslS = _hsv2hsl2[1],
  375. hslL = _hsv2hsl2[2];
  376. return [hslH, hslS, hslL];
  377. }
  378. function hsl2hwb(hslH, hslS, hslL) {
  379. var _hsl2hsv = hsl2hsv(hslH, hslS, hslL),
  380. _hsl2hsv2 = _slicedToArray$4(_hsl2hsv, 3),
  381. hsvS = _hsl2hsv2[1],
  382. hsvV = _hsl2hsv2[2];
  383. var _hsv2hwb = hsv2hwb(hslH, hsvS, hsvV),
  384. _hsv2hwb2 = _slicedToArray$4(_hsv2hwb, 3),
  385. hwbW = _hsv2hwb2[1],
  386. hwbB = _hsv2hwb2[2];
  387. return [hslH, hwbW, hwbB];
  388. }
  389. /* Convert between HSL and Lab
  390. /* ========================================================================== */
  391. function hsl2lab(hslH, hslS, hslL) {
  392. var _hsl2rgb = hsl2rgb(hslH, hslS, hslL),
  393. _hsl2rgb2 = _slicedToArray$4(_hsl2rgb, 3),
  394. rgbR = _hsl2rgb2[0],
  395. rgbG = _hsl2rgb2[1],
  396. rgbB = _hsl2rgb2[2];
  397. var _rgb2xyz5 = rgb2xyz(rgbR, rgbG, rgbB),
  398. _rgb2xyz6 = _slicedToArray$4(_rgb2xyz5, 3),
  399. xyzX = _rgb2xyz6[0],
  400. xyzY = _rgb2xyz6[1],
  401. xyzZ = _rgb2xyz6[2];
  402. var _xyz2lab5 = xyz2lab(xyzX, xyzY, xyzZ),
  403. _xyz2lab6 = _slicedToArray$4(_xyz2lab5, 3),
  404. labL = _xyz2lab6[0],
  405. labA = _xyz2lab6[1],
  406. labB = _xyz2lab6[2];
  407. return [labL, labA, labB];
  408. }
  409. function lab2hsl(labL, labA, labB, fallbackhue) {
  410. var _lab2xyz5 = lab2xyz(labL, labA, labB),
  411. _lab2xyz6 = _slicedToArray$4(_lab2xyz5, 3),
  412. xyzX = _lab2xyz6[0],
  413. xyzY = _lab2xyz6[1],
  414. xyzZ = _lab2xyz6[2];
  415. var _xyz2rgb5 = xyz2rgb(xyzX, xyzY, xyzZ),
  416. _xyz2rgb6 = _slicedToArray$4(_xyz2rgb5, 3),
  417. rgbR = _xyz2rgb6[0],
  418. rgbG = _xyz2rgb6[1],
  419. rgbB = _xyz2rgb6[2];
  420. var _rgb2hsl = rgb2hsl(rgbR, rgbG, rgbB, fallbackhue),
  421. _rgb2hsl2 = _slicedToArray$4(_rgb2hsl, 3),
  422. hslH = _rgb2hsl2[0],
  423. hslS = _rgb2hsl2[1],
  424. hslL = _rgb2hsl2[2];
  425. return [hslH, hslS, hslL];
  426. }
  427. /* Convert between HSL and LCH
  428. /* ========================================================================== */
  429. function hsl2lch(hslH, hslS, hslL) {
  430. var _hsl2rgb3 = hsl2rgb(hslH, hslS, hslL),
  431. _hsl2rgb4 = _slicedToArray$4(_hsl2rgb3, 3),
  432. rgbR = _hsl2rgb4[0],
  433. rgbG = _hsl2rgb4[1],
  434. rgbB = _hsl2rgb4[2];
  435. var _rgb2xyz7 = rgb2xyz(rgbR, rgbG, rgbB),
  436. _rgb2xyz8 = _slicedToArray$4(_rgb2xyz7, 3),
  437. xyzX = _rgb2xyz8[0],
  438. xyzY = _rgb2xyz8[1],
  439. xyzZ = _rgb2xyz8[2];
  440. var _xyz2lab7 = xyz2lab(xyzX, xyzY, xyzZ),
  441. _xyz2lab8 = _slicedToArray$4(_xyz2lab7, 3),
  442. labL = _xyz2lab8[0],
  443. labA = _xyz2lab8[1],
  444. labB = _xyz2lab8[2];
  445. var _lab2lch3 = lab2lch(labL, labA, labB),
  446. _lab2lch4 = _slicedToArray$4(_lab2lch3, 3),
  447. lchL = _lab2lch4[0],
  448. lchC = _lab2lch4[1],
  449. lchH = _lab2lch4[2];
  450. return [lchL, lchC, lchH];
  451. }
  452. function lch2hsl(lchL, lchC, lchH, fallbackhue) {
  453. var _lch2lab3 = lch2lab(lchL, lchC, lchH),
  454. _lch2lab4 = _slicedToArray$4(_lch2lab3, 3),
  455. labL = _lch2lab4[0],
  456. labA = _lch2lab4[1],
  457. labB = _lch2lab4[2];
  458. var _lab2xyz7 = lab2xyz(labL, labA, labB),
  459. _lab2xyz8 = _slicedToArray$4(_lab2xyz7, 3),
  460. xyzX = _lab2xyz8[0],
  461. xyzY = _lab2xyz8[1],
  462. xyzZ = _lab2xyz8[2];
  463. var _xyz2rgb7 = xyz2rgb(xyzX, xyzY, xyzZ),
  464. _xyz2rgb8 = _slicedToArray$4(_xyz2rgb7, 3),
  465. rgbR = _xyz2rgb8[0],
  466. rgbG = _xyz2rgb8[1],
  467. rgbB = _xyz2rgb8[2];
  468. var _rgb2hsl3 = rgb2hsl(rgbR, rgbG, rgbB, fallbackhue),
  469. _rgb2hsl4 = _slicedToArray$4(_rgb2hsl3, 3),
  470. hslH = _rgb2hsl4[0],
  471. hslS = _rgb2hsl4[1],
  472. hslL = _rgb2hsl4[2];
  473. return [hslH, hslS, hslL];
  474. }
  475. /* Convert between HSL and XYZ
  476. /* ========================================================================== */
  477. function hsl2xyz(hslH, hslS, hslL) {
  478. var _hsl2rgb5 = hsl2rgb(hslH, hslS, hslL),
  479. _hsl2rgb6 = _slicedToArray$4(_hsl2rgb5, 3),
  480. rgbR = _hsl2rgb6[0],
  481. rgbG = _hsl2rgb6[1],
  482. rgbB = _hsl2rgb6[2];
  483. var _rgb2xyz9 = rgb2xyz(rgbR, rgbG, rgbB),
  484. _rgb2xyz10 = _slicedToArray$4(_rgb2xyz9, 3),
  485. xyzX = _rgb2xyz10[0],
  486. xyzY = _rgb2xyz10[1],
  487. xyzZ = _rgb2xyz10[2];
  488. return [xyzX, xyzY, xyzZ];
  489. }
  490. function xyz2hsl(xyzX, xyzY, xyzZ, fallbackhue) {
  491. var _xyz2rgb9 = xyz2rgb(xyzX, xyzY, xyzZ),
  492. _xyz2rgb10 = _slicedToArray$4(_xyz2rgb9, 3),
  493. rgbR = _xyz2rgb10[0],
  494. rgbG = _xyz2rgb10[1],
  495. rgbB = _xyz2rgb10[2];
  496. var _rgb2hsl5 = rgb2hsl(rgbR, rgbG, rgbB, fallbackhue),
  497. _rgb2hsl6 = _slicedToArray$4(_rgb2hsl5, 3),
  498. hslH = _rgb2hsl6[0],
  499. hslS = _rgb2hsl6[1],
  500. hslL = _rgb2hsl6[2];
  501. return [hslH, hslS, hslL];
  502. }
  503. /* Convert between HWB and Lab
  504. /* ========================================================================== */
  505. function hwb2lab(hwbH, hwbW, hwbB) {
  506. var _hwb2rgb = hwb2rgb(hwbH, hwbW, hwbB),
  507. _hwb2rgb2 = _slicedToArray$4(_hwb2rgb, 3),
  508. rgbR = _hwb2rgb2[0],
  509. rgbG = _hwb2rgb2[1],
  510. rgbB = _hwb2rgb2[2];
  511. var _rgb2xyz11 = rgb2xyz(rgbR, rgbG, rgbB),
  512. _rgb2xyz12 = _slicedToArray$4(_rgb2xyz11, 3),
  513. xyzX = _rgb2xyz12[0],
  514. xyzY = _rgb2xyz12[1],
  515. xyzZ = _rgb2xyz12[2];
  516. var _xyz2lab9 = xyz2lab(xyzX, xyzY, xyzZ),
  517. _xyz2lab10 = _slicedToArray$4(_xyz2lab9, 3),
  518. labL = _xyz2lab10[0],
  519. labA = _xyz2lab10[1],
  520. labB = _xyz2lab10[2];
  521. return [labL, labA, labB];
  522. }
  523. function lab2hwb(labL, labA, labB, fallbackhue) {
  524. var _lab2xyz9 = lab2xyz(labL, labA, labB),
  525. _lab2xyz10 = _slicedToArray$4(_lab2xyz9, 3),
  526. xyzX = _lab2xyz10[0],
  527. xyzY = _lab2xyz10[1],
  528. xyzZ = _lab2xyz10[2];
  529. var _xyz2rgb11 = xyz2rgb(xyzX, xyzY, xyzZ),
  530. _xyz2rgb12 = _slicedToArray$4(_xyz2rgb11, 3),
  531. rgbR = _xyz2rgb12[0],
  532. rgbG = _xyz2rgb12[1],
  533. rgbB = _xyz2rgb12[2];
  534. var _rgb2hwb = rgb2hwb(rgbR, rgbG, rgbB, fallbackhue),
  535. _rgb2hwb2 = _slicedToArray$4(_rgb2hwb, 3),
  536. hwbH = _rgb2hwb2[0],
  537. hwbW = _rgb2hwb2[1],
  538. hwbB = _rgb2hwb2[2];
  539. return [hwbH, hwbW, hwbB];
  540. }
  541. /* Convert between HWB and LCH
  542. /* ========================================================================== */
  543. function hwb2lch(hwbH, hwbW, hwbB) {
  544. var _hwb2rgb3 = hwb2rgb(hwbH, hwbW, hwbB),
  545. _hwb2rgb4 = _slicedToArray$4(_hwb2rgb3, 3),
  546. rgbR = _hwb2rgb4[0],
  547. rgbG = _hwb2rgb4[1],
  548. rgbB = _hwb2rgb4[2];
  549. var _rgb2xyz13 = rgb2xyz(rgbR, rgbG, rgbB),
  550. _rgb2xyz14 = _slicedToArray$4(_rgb2xyz13, 3),
  551. xyzX = _rgb2xyz14[0],
  552. xyzY = _rgb2xyz14[1],
  553. xyzZ = _rgb2xyz14[2];
  554. var _xyz2lab11 = xyz2lab(xyzX, xyzY, xyzZ),
  555. _xyz2lab12 = _slicedToArray$4(_xyz2lab11, 3),
  556. labL = _xyz2lab12[0],
  557. labA = _xyz2lab12[1],
  558. labB = _xyz2lab12[2];
  559. var _lab2lch5 = lab2lch(labL, labA, labB),
  560. _lab2lch6 = _slicedToArray$4(_lab2lch5, 3),
  561. lchL = _lab2lch6[0],
  562. lchC = _lab2lch6[1],
  563. lchH = _lab2lch6[2];
  564. return [lchL, lchC, lchH];
  565. }
  566. function lch2hwb(lchL, lchC, lchH, fallbackhue) {
  567. var _lch2lab5 = lch2lab(lchL, lchC, lchH),
  568. _lch2lab6 = _slicedToArray$4(_lch2lab5, 3),
  569. labL = _lch2lab6[0],
  570. labA = _lch2lab6[1],
  571. labB = _lch2lab6[2];
  572. var _lab2xyz11 = lab2xyz(labL, labA, labB),
  573. _lab2xyz12 = _slicedToArray$4(_lab2xyz11, 3),
  574. xyzX = _lab2xyz12[0],
  575. xyzY = _lab2xyz12[1],
  576. xyzZ = _lab2xyz12[2];
  577. var _xyz2rgb13 = xyz2rgb(xyzX, xyzY, xyzZ),
  578. _xyz2rgb14 = _slicedToArray$4(_xyz2rgb13, 3),
  579. rgbR = _xyz2rgb14[0],
  580. rgbG = _xyz2rgb14[1],
  581. rgbB = _xyz2rgb14[2];
  582. var _rgb2hwb3 = rgb2hwb(rgbR, rgbG, rgbB, fallbackhue),
  583. _rgb2hwb4 = _slicedToArray$4(_rgb2hwb3, 3),
  584. hwbH = _rgb2hwb4[0],
  585. hwbW = _rgb2hwb4[1],
  586. hwbB = _rgb2hwb4[2];
  587. return [hwbH, hwbW, hwbB];
  588. }
  589. /* Convert between HWB and XYZ
  590. /* ========================================================================== */
  591. function hwb2xyz(hwbH, hwbW, hwbB) {
  592. var _hwb2rgb5 = hwb2rgb(hwbH, hwbW, hwbB),
  593. _hwb2rgb6 = _slicedToArray$4(_hwb2rgb5, 3),
  594. rgbR = _hwb2rgb6[0],
  595. rgbG = _hwb2rgb6[1],
  596. rgbB = _hwb2rgb6[2];
  597. var _rgb2xyz15 = rgb2xyz(rgbR, rgbG, rgbB),
  598. _rgb2xyz16 = _slicedToArray$4(_rgb2xyz15, 3),
  599. xyzX = _rgb2xyz16[0],
  600. xyzY = _rgb2xyz16[1],
  601. xyzZ = _rgb2xyz16[2];
  602. return [xyzX, xyzY, xyzZ];
  603. }
  604. function xyz2hwb(xyzX, xyzY, xyzZ, fallbackhue) {
  605. var _xyz2rgb15 = xyz2rgb(xyzX, xyzY, xyzZ),
  606. _xyz2rgb16 = _slicedToArray$4(_xyz2rgb15, 3),
  607. rgbR = _xyz2rgb16[0],
  608. rgbG = _xyz2rgb16[1],
  609. rgbB = _xyz2rgb16[2];
  610. var _rgb2hwb5 = rgb2hwb(rgbR, rgbG, rgbB, fallbackhue),
  611. _rgb2hwb6 = _slicedToArray$4(_rgb2hwb5, 3),
  612. hwbH = _rgb2hwb6[0],
  613. hwbW = _rgb2hwb6[1],
  614. hwbB = _rgb2hwb6[2];
  615. return [hwbH, hwbW, hwbB];
  616. }
  617. /* Convert between HSV and Lab
  618. /* ========================================================================== */
  619. function hsv2lab(hsvH, hsvS, hsvV) {
  620. var _hsv2rgb = hsv2rgb(hsvH, hsvS, hsvV),
  621. _hsv2rgb2 = _slicedToArray$4(_hsv2rgb, 3),
  622. rgbR = _hsv2rgb2[0],
  623. rgbG = _hsv2rgb2[1],
  624. rgbB = _hsv2rgb2[2];
  625. var _rgb2xyz17 = rgb2xyz(rgbR, rgbG, rgbB),
  626. _rgb2xyz18 = _slicedToArray$4(_rgb2xyz17, 3),
  627. xyzX = _rgb2xyz18[0],
  628. xyzY = _rgb2xyz18[1],
  629. xyzZ = _rgb2xyz18[2];
  630. var _xyz2lab13 = xyz2lab(xyzX, xyzY, xyzZ),
  631. _xyz2lab14 = _slicedToArray$4(_xyz2lab13, 3),
  632. labL = _xyz2lab14[0],
  633. labA = _xyz2lab14[1],
  634. labB = _xyz2lab14[2];
  635. return [labL, labA, labB];
  636. }
  637. function lab2hsv(labL, labA, labB, fallbackhue) {
  638. var _lab2xyz13 = lab2xyz(labL, labA, labB),
  639. _lab2xyz14 = _slicedToArray$4(_lab2xyz13, 3),
  640. xyzX = _lab2xyz14[0],
  641. xyzY = _lab2xyz14[1],
  642. xyzZ = _lab2xyz14[2];
  643. var _xyz2rgb17 = xyz2rgb(xyzX, xyzY, xyzZ),
  644. _xyz2rgb18 = _slicedToArray$4(_xyz2rgb17, 3),
  645. rgbR = _xyz2rgb18[0],
  646. rgbG = _xyz2rgb18[1],
  647. rgbB = _xyz2rgb18[2];
  648. var _rgb2hsv = rgb2hsv(rgbR, rgbG, rgbB, fallbackhue),
  649. _rgb2hsv2 = _slicedToArray$4(_rgb2hsv, 3),
  650. hsvH = _rgb2hsv2[0],
  651. hsvS = _rgb2hsv2[1],
  652. hsvV = _rgb2hsv2[2];
  653. return [hsvH, hsvS, hsvV];
  654. }
  655. /* Convert between HSV and LCH
  656. /* ========================================================================== */
  657. function hsv2lch(hsvH, hsvS, hsvV) {
  658. var _hsv2rgb3 = hsv2rgb(hsvH, hsvS, hsvV),
  659. _hsv2rgb4 = _slicedToArray$4(_hsv2rgb3, 3),
  660. rgbR = _hsv2rgb4[0],
  661. rgbG = _hsv2rgb4[1],
  662. rgbB = _hsv2rgb4[2];
  663. var _rgb2xyz19 = rgb2xyz(rgbR, rgbG, rgbB),
  664. _rgb2xyz20 = _slicedToArray$4(_rgb2xyz19, 3),
  665. xyzX = _rgb2xyz20[0],
  666. xyzY = _rgb2xyz20[1],
  667. xyzZ = _rgb2xyz20[2];
  668. var _xyz2lab15 = xyz2lab(xyzX, xyzY, xyzZ),
  669. _xyz2lab16 = _slicedToArray$4(_xyz2lab15, 3),
  670. labL = _xyz2lab16[0],
  671. labA = _xyz2lab16[1],
  672. labB = _xyz2lab16[2];
  673. var _lab2lch7 = lab2lch(labL, labA, labB),
  674. _lab2lch8 = _slicedToArray$4(_lab2lch7, 3),
  675. lchL = _lab2lch8[0],
  676. lchC = _lab2lch8[1],
  677. lchH = _lab2lch8[2];
  678. return [lchL, lchC, lchH];
  679. }
  680. function lch2hsv(lchL, lchC, lchH, fallbackhue) {
  681. var _lch2lab7 = lch2lab(lchL, lchC, lchH),
  682. _lch2lab8 = _slicedToArray$4(_lch2lab7, 3),
  683. labL = _lch2lab8[0],
  684. labA = _lch2lab8[1],
  685. labB = _lch2lab8[2];
  686. var _lab2xyz15 = lab2xyz(labL, labA, labB),
  687. _lab2xyz16 = _slicedToArray$4(_lab2xyz15, 3),
  688. xyzX = _lab2xyz16[0],
  689. xyzY = _lab2xyz16[1],
  690. xyzZ = _lab2xyz16[2];
  691. var _xyz2rgb19 = xyz2rgb(xyzX, xyzY, xyzZ),
  692. _xyz2rgb20 = _slicedToArray$4(_xyz2rgb19, 3),
  693. rgbR = _xyz2rgb20[0],
  694. rgbG = _xyz2rgb20[1],
  695. rgbB = _xyz2rgb20[2];
  696. var _rgb2hsv3 = rgb2hsv(rgbR, rgbG, rgbB, fallbackhue),
  697. _rgb2hsv4 = _slicedToArray$4(_rgb2hsv3, 3),
  698. hsvH = _rgb2hsv4[0],
  699. hsvS = _rgb2hsv4[1],
  700. hsvV = _rgb2hsv4[2];
  701. return [hsvH, hsvS, hsvV];
  702. }
  703. /* Convert between HSV and XYZ
  704. /* ========================================================================== */
  705. function hsv2xyz(hsvH, hsvS, hsvV) {
  706. var _hsv2rgb5 = hsv2rgb(hsvH, hsvS, hsvV),
  707. _hsv2rgb6 = _slicedToArray$4(_hsv2rgb5, 3),
  708. rgbR = _hsv2rgb6[0],
  709. rgbG = _hsv2rgb6[1],
  710. rgbB = _hsv2rgb6[2];
  711. var _rgb2xyz21 = rgb2xyz(rgbR, rgbG, rgbB),
  712. _rgb2xyz22 = _slicedToArray$4(_rgb2xyz21, 3),
  713. xyzX = _rgb2xyz22[0],
  714. xyzY = _rgb2xyz22[1],
  715. xyzZ = _rgb2xyz22[2];
  716. return [xyzX, xyzY, xyzZ];
  717. }
  718. function xyz2hsv(xyzX, xyzY, xyzZ, fallbackhue) {
  719. var _xyz2rgb21 = xyz2rgb(xyzX, xyzY, xyzZ),
  720. _xyz2rgb22 = _slicedToArray$4(_xyz2rgb21, 3),
  721. rgbR = _xyz2rgb22[0],
  722. rgbG = _xyz2rgb22[1],
  723. rgbB = _xyz2rgb22[2];
  724. var _rgb2hsv5 = rgb2hsv(rgbR, rgbG, rgbB, fallbackhue),
  725. _rgb2hsv6 = _slicedToArray$4(_rgb2hsv5, 3),
  726. hsvH = _rgb2hsv6[0],
  727. hsvS = _rgb2hsv6[1],
  728. hsvV = _rgb2hsv6[2];
  729. return [hsvH, hsvS, hsvV];
  730. }
  731. /* Convert between XYZ and LCH
  732. /* ========================================================================== */
  733. function xyz2lch(xyzX, xyzY, xyzZ) {
  734. var _xyz2lab17 = xyz2lab(xyzX, xyzY, xyzZ),
  735. _xyz2lab18 = _slicedToArray$4(_xyz2lab17, 3),
  736. labL = _xyz2lab18[0],
  737. labA = _xyz2lab18[1],
  738. labB = _xyz2lab18[2];
  739. var _lab2lch9 = lab2lch(labL, labA, labB),
  740. _lab2lch10 = _slicedToArray$4(_lab2lch9, 3),
  741. lchL = _lab2lch10[0],
  742. lchC = _lab2lch10[1],
  743. lchH = _lab2lch10[2];
  744. return [lchL, lchC, lchH];
  745. }
  746. function lch2xyz(lchL, lchC, lchH) {
  747. var _lch2lab9 = lch2lab(lchL, lchC, lchH),
  748. _lch2lab10 = _slicedToArray$4(_lch2lab9, 3),
  749. labL = _lch2lab10[0],
  750. labA = _lch2lab10[1],
  751. labB = _lch2lab10[2];
  752. var _lab2xyz17 = lab2xyz(labL, labA, labB),
  753. _lab2xyz18 = _slicedToArray$4(_lab2xyz17, 3),
  754. xyzX = _lab2xyz18[0],
  755. xyzY = _lab2xyz18[1],
  756. xyzZ = _lab2xyz18[2];
  757. return [xyzX, xyzY, xyzZ];
  758. }
  759. var index = {
  760. rgb2hsl,
  761. rgb2hwb,
  762. rgb2lab,
  763. rgb2lch,
  764. rgb2hsv,
  765. rgb2xyz,
  766. hsl2rgb,
  767. hsl2hwb,
  768. hsl2lab,
  769. hsl2lch,
  770. hsl2hsv,
  771. hsl2xyz,
  772. hwb2rgb,
  773. hwb2hsl,
  774. hwb2lab,
  775. hwb2lch,
  776. hwb2hsv,
  777. hwb2xyz,
  778. lab2rgb,
  779. lab2hsl,
  780. lab2hwb,
  781. lab2lch,
  782. lab2hsv,
  783. lab2xyz,
  784. lch2rgb,
  785. lch2hsl,
  786. lch2hwb,
  787. lch2lab,
  788. lch2hsv,
  789. lch2xyz,
  790. hsv2rgb,
  791. hsv2hsl,
  792. hsv2hwb,
  793. hsv2lab,
  794. hsv2lch,
  795. hsv2xyz,
  796. xyz2rgb,
  797. xyz2hsl,
  798. xyz2hwb,
  799. xyz2lab,
  800. xyz2lch,
  801. xyz2hsv,
  802. rgb2hue
  803. };
  804. exports.rgb2hsl = rgb2hsl;
  805. exports.rgb2hwb = rgb2hwb;
  806. exports.rgb2lab = rgb2lab;
  807. exports.rgb2lch = rgb2lch;
  808. exports.rgb2hsv = rgb2hsv;
  809. exports.rgb2xyz = rgb2xyz;
  810. exports.hsl2rgb = hsl2rgb;
  811. exports.hsl2hwb = hsl2hwb;
  812. exports.hsl2lab = hsl2lab;
  813. exports.hsl2lch = hsl2lch;
  814. exports.hsl2hsv = hsl2hsv;
  815. exports.hsl2xyz = hsl2xyz;
  816. exports.hwb2rgb = hwb2rgb;
  817. exports.hwb2hsl = hwb2hsl;
  818. exports.hwb2lab = hwb2lab;
  819. exports.hwb2lch = hwb2lch;
  820. exports.hwb2hsv = hwb2hsv;
  821. exports.hwb2xyz = hwb2xyz;
  822. exports.lab2rgb = lab2rgb;
  823. exports.lab2hsl = lab2hsl;
  824. exports.lab2hwb = lab2hwb;
  825. exports.lab2lch = lab2lch;
  826. exports.lab2hsv = lab2hsv;
  827. exports.lab2xyz = lab2xyz;
  828. exports.lch2rgb = lch2rgb;
  829. exports.lch2hsl = lch2hsl;
  830. exports.lch2hwb = lch2hwb;
  831. exports.lch2lab = lch2lab;
  832. exports.lch2hsv = lch2hsv;
  833. exports.lch2xyz = lch2xyz;
  834. exports.hsv2rgb = hsv2rgb;
  835. exports.hsv2hsl = hsv2hsl;
  836. exports.hsv2hwb = hsv2hwb;
  837. exports.hsv2lab = hsv2lab;
  838. exports.hsv2lch = hsv2lch;
  839. exports.hsv2xyz = hsv2xyz;
  840. exports.xyz2rgb = xyz2rgb;
  841. exports.xyz2hsl = xyz2hsl;
  842. exports.xyz2hwb = xyz2hwb;
  843. exports.xyz2lab = xyz2lab;
  844. exports.xyz2lch = xyz2lch;
  845. exports.xyz2hsv = xyz2hsv;
  846. exports.rgb2hue = rgb2hue;
  847. exports['default'] = index;