@soybeanjs/colord 0.1.1 → 0.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 (44) hide show
  1. package/README.md +2 -2
  2. package/dist/{colord-iJvjkDaN.d.ts → colord-AfN0aSRY.d.ts} +11 -1
  3. package/dist/{colord-CiL21DdP.js → colord-_3vDrvhI.js} +187 -7
  4. package/dist/colord.d.ts +1 -1
  5. package/dist/colord.js +8 -8
  6. package/dist/{extend-Cjbo01n8.js → extend-1NvzfDMp.js} +1 -1
  7. package/dist/{extend-BwkxQVzY.d.ts → extend-UYBGWCHH.d.ts} +2 -2
  8. package/dist/{get-DjkEJgax.js → get-B9GsrsfV.js} +1 -1
  9. package/dist/{hsv-6f-Avk00.js → hsv-OOAVcaRH.js} +1 -1
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.js +9 -9
  12. package/dist/{lab-BXLaTQvQ.js → lab-DRO6J6z8.js} +5 -5
  13. package/dist/{lab-DklZwOkG.js → lab-NxNRMUqK.js} +12 -12
  14. package/dist/{manipulate-DJ-cBonL.js → manipulate-DG6jOj5-.js} +3 -3
  15. package/dist/palette/index.d.ts +9 -3
  16. package/dist/palette/index.js +305 -14
  17. package/dist/plugins/a11y.d.ts +2 -2
  18. package/dist/plugins/a11y.js +3 -3
  19. package/dist/plugins/cmyk.d.ts +2 -2
  20. package/dist/plugins/cmyk.js +1 -1
  21. package/dist/plugins/harmonies.d.ts +1 -1
  22. package/dist/plugins/hwb.d.ts +2 -2
  23. package/dist/plugins/hwb.js +2 -2
  24. package/dist/plugins/lab.d.ts +2 -2
  25. package/dist/plugins/lab.js +6 -6
  26. package/dist/plugins/lch.d.ts +2 -2
  27. package/dist/plugins/lch.js +14 -14
  28. package/dist/plugins/minify.d.ts +1 -1
  29. package/dist/plugins/minify.js +1 -1
  30. package/dist/plugins/mix.d.ts +2 -2
  31. package/dist/plugins/mix.js +6 -6
  32. package/dist/plugins/names.d.ts +1 -1
  33. package/dist/plugins/oklab.d.ts +2 -2
  34. package/dist/plugins/oklab.js +12 -12
  35. package/dist/plugins/xyz.d.ts +2 -2
  36. package/dist/plugins/xyz.js +4 -4
  37. package/dist/{rgb-BIWjP3hJ.js → rgb-DzRkOBLO.js} +1 -1
  38. package/dist/{xyz-Czd8MTub.js → xyz-WMIP19rd.js} +7 -7
  39. package/package.json +1 -1
  40. package/dist/oklch-sYjVoJRG.js +0 -186
  41. package/dist/plugins/oklch.d.ts +0 -17
  42. package/dist/plugins/oklch.js +0 -5
  43. /package/dist/{types-CV5bTriG.d.ts → types-BP0NSyqd.d.ts} +0 -0
  44. /package/dist/{utils-BhDL0kto.js → utils-CshL9w1R.js} +0 -0
@@ -1,20 +1,19 @@
1
- import "../utils-BhDL0kto.js";
2
- import "../rgb-BIWjP3hJ.js";
3
- import { n as colord, o as keysOf } from "../colord-CiL21DdP.js";
4
- import "../hsv-6f-Avk00.js";
5
- import "../manipulate-DJ-cBonL.js";
6
- import "../xyz-Czd8MTub.js";
7
- import "../lab-DklZwOkG.js";
8
- import "../get-DjkEJgax.js";
9
- import { t as extend } from "../extend-Cjbo01n8.js";
10
- import { t as oklchPlugin } from "../oklch-sYjVoJRG.js";
11
- import { t as labPlugin } from "../lab-BXLaTQvQ.js";
1
+ import "../utils-CshL9w1R.js";
2
+ import "../rgb-DzRkOBLO.js";
3
+ import { n as colord, o as keysOf } from "../colord-_3vDrvhI.js";
4
+ import "../hsv-OOAVcaRH.js";
5
+ import "../manipulate-DG6jOj5-.js";
6
+ import "../xyz-WMIP19rd.js";
7
+ import "../lab-NxNRMUqK.js";
8
+ import "../get-B9GsrsfV.js";
9
+ import { t as extend } from "../extend-1NvzfDMp.js";
10
+ import { t as labPlugin } from "../lab-DRO6J6z8.js";
12
11
 
13
12
  //#region src/palette/constant.ts
14
13
  /**
15
14
  * TailwindCSS v4 official oklch palette data
16
15
  *
17
- * the format is `oklch` string
16
+ * the format is `oklch` string, like `oklch(98.4% 0.003 247.858)`
18
17
  */
19
18
  const tailwindPalette = {
20
19
  slate: {
@@ -304,10 +303,302 @@ const tailwindPalette = {
304
303
  "950": "oklch(27.1% 0.105 12.094)"
305
304
  }
306
305
  };
306
+ /**
307
+ * TailwindCSS v4 official hsl palette data
308
+ *
309
+ * the format is `hsl` string, but no `hsl()` like `210.003, 34.547%, 98.004%`
310
+ */
311
+ const tailwindPaletteHsl = {
312
+ slate: {
313
+ "50": "210.003, 34.547%, 98.004%",
314
+ "100": "209.999, 40.553%, 96.05%",
315
+ "200": "214.285, 32.975%, 91.424%",
316
+ "300": "212.718, 29.913%, 84.016%",
317
+ "400": "214.993, 22.593%, 64.504%",
318
+ "500": "215.383, 18.366%, 47.029%",
319
+ "600": "215.292, 22.036%, 34.759%",
320
+ "700": "215.292, 27.931%, 26.849%",
321
+ "800": "217.281, 36.073%, 17.54%",
322
+ "900": "222.336, 49.39%, 11.299%",
323
+ "950": "228.82, 85.132%, 4.997%"
324
+ },
325
+ gray: {
326
+ "50": "209.998, 24.188%, 98.099%",
327
+ "100": "220, 14.968%, 95.898%",
328
+ "200": "220, 13.565%, 91.049%",
329
+ "300": "215.999, 13.123%, 84.001%",
330
+ "400": "217.901, 11.922%, 64.262%",
331
+ "500": "220.028, 10.264%, 46.298%",
332
+ "600": "214.994, 15.663%, 34.247%",
333
+ "700": "216.939, 21.105%, 26.812%",
334
+ "800": "214.992, 30.987%, 16.949%",
335
+ "900": "221, 41.688%, 11.066%",
336
+ "950": "224.055, 72.239%, 4.173%"
337
+ },
338
+ zinc: {
339
+ "50": "223.814, 0%, 98.026%",
340
+ "100": "239.992, 3.51%, 95.786%",
341
+ "200": "239.999, 5.855%, 90.031%",
342
+ "300": "240.015, 5.385%, 83.971%",
343
+ "400": "240.076, 5.713%, 64.296%",
344
+ "500": "240.097, 4.411%, 46.337%",
345
+ "600": "240.134, 6.004%, 34.16%",
346
+ "700": "240.076, 5.741%, 26.146%",
347
+ "800": "240.047, 4.043%, 15.933%",
348
+ "900": "240.017, 6.031%, 9.981%",
349
+ "950": "240.102, 11.244%, 3.984%"
350
+ },
351
+ neutral: {
352
+ "50": "223.814, 0%, 98.026%",
353
+ "100": "223.814, 0%, 96.059%",
354
+ "200": "223.814, 0%, 89.816%",
355
+ "300": "223.814, 0%, 83.144%",
356
+ "400": "223.814, 0%, 63.016%",
357
+ "500": "223.814, 0%, 45.152%",
358
+ "600": "223.814, 0%, 32.199%",
359
+ "700": "223.814, 0%, 25.047%",
360
+ "800": "223.814, 0%, 14.938%",
361
+ "900": "223.814, 0%, 9.053%",
362
+ "950": "223.814, 0%, 3.939%"
363
+ },
364
+ stone: {
365
+ "50": "60.007, 7.094%, 97.905%",
366
+ "100": "60.008, 3.646%, 95.938%",
367
+ "200": "20.003, 6.873%, 89.983%",
368
+ "300": "24.006, 6.687%, 82.978%",
369
+ "400": "24.01, 5.845%, 63.053%",
370
+ "500": "25.018, 5.901%, 44.638%",
371
+ "600": "33.349, 6.276%, 32.242%",
372
+ "700": "30.023, 7.22%, 25.041%",
373
+ "800": "12, 7.227%, 15.073%",
374
+ "900": "23.996, 9.611%, 9.991%",
375
+ "950": "20.035, 13.835%, 4.125%"
376
+ },
377
+ red: {
378
+ "50": "360, 88.208%, 97.321%",
379
+ "100": "359.982, 98.785%, 94.247%",
380
+ "200": "359.973, 100%, 89.56%",
381
+ "300": "359.857, 99.998%, 82.033%",
382
+ "400": "358.93, 100%, 69.87%",
383
+ "500": "356.946, 95.899%, 57.723%",
384
+ "600": "354.079, 100%, 44.623%",
385
+ "700": "355.123, 100%, 37.36%",
386
+ "800": "355.941, 91.155%, 32.55%",
387
+ "900": "358.797, 69.3%, 30.075%",
388
+ "950": "359.285, 79.417%, 15.349%"
389
+ },
390
+ orange: {
391
+ "50": "33.332, 99.995%, 96.537%",
392
+ "100": "34.287, 100%, 91.727%",
393
+ "200": "32.175, 100%, 82.883%",
394
+ "300": "30.774, 99.998%, 71.974%",
395
+ "400": "28.987, 99.999%, 56.065%",
396
+ "500": "26.855, 100%, 49.354%",
397
+ "600": "21.934, 100%, 46.19%",
398
+ "700": "18.969, 100%, 38.434%",
399
+ "800": "17.153, 100%, 31.172%",
400
+ "900": "15.988, 83.116%, 27.039%",
401
+ "950": "12.883, 84.806%, 14.417%"
402
+ },
403
+ amber: {
404
+ "50": "48.004, 100%, 96.114%",
405
+ "100": "47.994, 97.339%, 88.726%",
406
+ "200": "48.023, 98.228%, 75.896%",
407
+ "300": "46.58, 100%, 60.794%",
408
+ "400": "45.09, 100%, 48.935%",
409
+ "500": "38.513, 100%, 48.198%",
410
+ "600": "32.717, 100%, 42.671%",
411
+ "700": "27.078, 100%, 35.532%",
412
+ "800": "24.676, 100%, 29.192%",
413
+ "900": "23.037, 90.171%, 25.264%",
414
+ "950": "20.897, 96.651%, 13.937%"
415
+ },
416
+ yellow: {
417
+ "50": "54.549, 90.61%, 95.282%",
418
+ "100": "54.892, 97.52%, 87.835%",
419
+ "200": "52.743, 99.45%, 76.076%",
420
+ "300": "50.911, 100%, 59.358%",
421
+ "400": "48.773, 99.99%, 48.512%",
422
+ "500": "45.81, 100%, 45.924%",
423
+ "600": "40.904, 100%, 39.686%",
424
+ "700": "36.189, 100%, 31.737%",
425
+ "800": "33.567, 100%, 26.499%",
426
+ "900": "29.518, 83.352%, 24.569%",
427
+ "950": "26.161, 87.525%, 13.964%"
428
+ },
429
+ lime: {
430
+ "50": "78.26, 92.844%, 95.138%",
431
+ "100": "79.565, 89.717%, 89.109%",
432
+ "200": "80.699, 89.713%, 78.91%",
433
+ "300": "80.92, 87.665%, 63.648%",
434
+ "400": "78.774, 100%, 44.82%",
435
+ "500": "81.654, 100%, 40.081%",
436
+ "600": "83.259, 100%, 32.013%",
437
+ "700": "83.684, 100%, 24.406%",
438
+ "800": "83.267, 100%, 19.398%",
439
+ "900": "86.517, 71.115%, 19.123%",
440
+ "950": "88.953, 88.618%, 9.611%"
441
+ },
442
+ green: {
443
+ "50": "138.459, 76.514%, 96.68%",
444
+ "100": "140.647, 84.376%, 92.455%",
445
+ "200": "141.145, 81.071%, 84.817%",
446
+ "300": "142.656, 81.247%, 71.39%",
447
+ "400": "150.064, 95.561%, 44.759%",
448
+ "500": "147.131, 100%, 38.889%",
449
+ "600": "146.032, 100%, 32.114%",
450
+ "700": "146.804, 100%, 25.276%",
451
+ "800": "147.718, 97.154%, 20.364%",
452
+ "900": "145.734, 73.079%, 18.991%",
453
+ "950": "145.387, 87.569%, 9.65%"
454
+ },
455
+ emerald: {
456
+ "50": "151.776, 80.948%, 95.818%",
457
+ "100": "149.317, 81.171%, 89.839%",
458
+ "200": "152.539, 77.889%, 80.015%",
459
+ "300": "157.295, 76.251%, 64.247%",
460
+ "400": "162.326, 100%, 41.234%",
461
+ "500": "161.587, 100%, 36.362%",
462
+ "600": "161.885, 100%, 29.444%",
463
+ "700": "163.366, 100%, 23.553%",
464
+ "800": "163.9, 100%, 18.702%",
465
+ "900": "164.956, 100%, 15.369%",
466
+ "950": "165.974, 100%, 8.671%"
467
+ },
468
+ teal: {
469
+ "50": "166.148, 77.057%, 96.739%",
470
+ "100": "167.268, 86.978%, 89.131%",
471
+ "200": "168.507, 85.39%, 77.724%",
472
+ "300": "171.354, 81.789%, 60.153%",
473
+ "400": "173.792, 100%, 41.321%",
474
+ "500": "174.041, 100%, 36.187%",
475
+ "600": "175.069, 100%, 29.073%",
476
+ "700": "175.831, 100%, 23.248%",
477
+ "800": "176.671, 100%, 18.596%",
478
+ "900": "176.3, 76.01%, 17.509%",
479
+ "950": "178.664, 91.579%, 9.644%"
480
+ },
481
+ cyan: {
482
+ "50": "183.159, 99.918%, 96.249%",
483
+ "100": "185.109, 96.433%, 90.29%",
484
+ "200": "186.199, 95.773%, 81.44%",
485
+ "300": "186.713, 97.466%, 65.901%",
486
+ "400": "187.03, 100%, 46.369%",
487
+ "500": "188.531, 99.998%, 41.633%",
488
+ "600": "191.232, 100%, 35.017%",
489
+ "700": "191.997, 100%, 28.521%",
490
+ "800": "192.71, 100%, 23.541%",
491
+ "900": "195.824, 72.139%, 22.873%",
492
+ "950": "196.695, 85.439%, 14.551%"
493
+ },
494
+ sky: {
495
+ "50": "204, 99.996%, 97.045%",
496
+ "100": "203.992, 96.542%, 93.67%",
497
+ "200": "200.566, 97.875%, 85.943%",
498
+ "300": "199.222, 100%, 73.485%",
499
+ "400": "195.512, 99.993%, 49.565%",
500
+ "500": "197.713, 100%, 45.955%",
501
+ "600": "200.25, 100%, 39.104%",
502
+ "700": "200.995, 100%, 31.673%",
503
+ "800": "200.254, 100%, 26.324%",
504
+ "900": "200.836, 96.984%, 22.393%",
505
+ "950": "203.629, 87.232%, 15.519%"
506
+ },
507
+ blue: {
508
+ "50": "213.75, 96.485%, 96.791%",
509
+ "100": "214.285, 96.222%, 92.776%",
510
+ "200": "213.328, 99.993%, 87.275%",
511
+ "300": "211.676, 99.999%, 78.475%",
512
+ "400": "212.94, 99.999%, 66.943%",
513
+ "500": "217.066, 99.998%, 59.77%",
514
+ "600": "221.337, 97.063%, 53.498%",
515
+ "700": "225.345, 84.095%, 48.984%",
516
+ "800": "227.099, 75.743%, 41.135%",
517
+ "900": "224.863, 67.278%, 33.328%",
518
+ "950": "226.507, 58.737%, 21.148%"
519
+ },
520
+ indigo: {
521
+ "50": "225.882, 99.978%, 96.675%",
522
+ "100": "226.451, 99.989%, 93.926%",
523
+ "200": "228.024, 100%, 88.971%",
524
+ "300": "229.777, 99.996%, 82.16%",
525
+ "400": "235.262, 100%, 74.541%",
526
+ "500": "240.685, 100%, 68.779%",
527
+ "600": "246.994, 91.663%, 59.533%",
528
+ "700": "247.88, 68.287%, 51.071%",
529
+ "800": "246.136, 60.995%, 41.847%",
530
+ "900": "243.257, 50.34%, 34.766%",
531
+ "950": "244.395, 49.098%, 20.162%"
532
+ },
533
+ violet: {
534
+ "50": "249.999, 98.585%, 97.622%",
535
+ "100": "251.445, 93.48%, 95.504%",
536
+ "200": "250.552, 100%, 91.901%",
537
+ "300": "252.616, 99.999%, 85.376%",
538
+ "400": "255.751, 100%, 76.27%",
539
+ "500": "259.284, 100%, 66.929%",
540
+ "600": "265.481, 99.08%, 56.485%",
541
+ "700": "267.995, 93.299%, 46.892%",
542
+ "800": "266.643, 86.267%, 40.442%",
543
+ "900": "264.877, 74.275%, 34.642%",
544
+ "950": "262.222, 77.736%, 22.863%"
545
+ },
546
+ purple: {
547
+ "50": "269.997, 98.848%, 98.044%",
548
+ "100": "268.7, 99.95%, 95.453%",
549
+ "200": "268.576, 100%, 91.734%",
550
+ "300": "269.226, 100%, 85.238%",
551
+ "400": "270.353, 100%, 74.78%",
552
+ "500": "271.437, 100%, 65.242%",
553
+ "600": "274.913, 96.104%, 52.154%",
554
+ "700": "275.791, 100%, 42.601%",
555
+ "800": "274.932, 82.403%, 37.869%",
556
+ "900": "274.517, 72.395%, 31.625%",
557
+ "950": "274.321, 94.297%, 20.657%"
558
+ },
559
+ fuchsia: {
560
+ "50": "289.092, 95.954%, 97.794%",
561
+ "100": "286.959, 100%, 95.486%",
562
+ "200": "288.26, 99.996%, 90.683%",
563
+ "300": "291.09, 99.998%, 83.117%",
564
+ "400": "292.029, 99.999%, 71.378%",
565
+ "500": "292.612, 96.352%, 57.512%",
566
+ "600": "294.187, 100%, 42.735%",
567
+ "700": "295.206, 100%, 35.347%",
568
+ "800": "295.798, 98.238%, 29.348%",
569
+ "900": "296.7, 72.348%, 27.247%",
570
+ "950": "296.751, 99.06%, 15.604%"
571
+ },
572
+ pink: {
573
+ "50": "327.277, 71.089%, 96.997%",
574
+ "100": "325.703, 78.632%, 94.697%",
575
+ "200": "325.846, 87.873%, 89.836%",
576
+ "300": "327.09, 96.708%, 82.028%",
577
+ "400": "327.469, 95.375%, 68.883%",
578
+ "500": "328.253, 91.82%, 58.197%",
579
+ "600": "328.645, 100%, 44.444%",
580
+ "700": "331.508, 100%, 38.111%",
581
+ "800": "331.819, 100%, 31.786%",
582
+ "900": "334.273, 78.492%, 29.423%",
583
+ "950": "335.293, 90.943%, 16.654%"
584
+ },
585
+ rose: {
586
+ "50": "355.717, 96.526%, 97.188%",
587
+ "100": "355.551, 99.995%, 94.672%",
588
+ "200": "352.604, 99.997%, 90.06%",
589
+ "300": "352.472, 100%, 81.946%",
590
+ "400": "350.446, 100%, 70.363%",
591
+ "500": "345.84, 100%, 56.886%",
592
+ "600": "342.085, 100%, 45.052%",
593
+ "700": "341.966, 100%, 37.796%",
594
+ "800": "339.679, 100%, 31.922%",
595
+ "900": "338.93, 89.543%, 28.727%",
596
+ "950": "342.257, 94.346%, 15.598%"
597
+ }
598
+ };
307
599
 
308
600
  //#endregion
309
601
  //#region src/palette/generate.ts
310
- extend([oklchPlugin]);
311
602
  const paletteScales = {
312
603
  50: {
313
604
  l: .08,
@@ -515,4 +806,4 @@ function generateNearestPalette(input, format = "oklch") {
515
806
  }
516
807
 
517
808
  //#endregion
518
- export { generateNearestPalette, generatePalette, tailwindPalette };
809
+ export { generateNearestPalette, generatePalette, tailwindPalette, tailwindPaletteHsl };
@@ -1,5 +1,5 @@
1
- import { t as AnyColor } from "../types-CV5bTriG.js";
2
- import { t as Plugin } from "../extend-BwkxQVzY.js";
1
+ import { t as AnyColor } from "../types-BP0NSyqd.js";
2
+ import { t as Plugin } from "../extend-UYBGWCHH.js";
3
3
 
4
4
  //#region src/plugins/a11y.d.ts
5
5
  interface ReadabilityOptions {
@@ -1,6 +1,6 @@
1
- import { l as round, r as floor } from "../utils-BhDL0kto.js";
2
- import "../rgb-BIWjP3hJ.js";
3
- import { i as getLuminance, n as getContrast } from "../get-DjkEJgax.js";
1
+ import { l as round, r as floor } from "../utils-CshL9w1R.js";
2
+ import "../rgb-DzRkOBLO.js";
3
+ import { i as getLuminance, n as getContrast } from "../get-B9GsrsfV.js";
4
4
 
5
5
  //#region src/plugins/a11y.ts
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { n as CmykColor } from "../types-CV5bTriG.js";
2
- import { t as Plugin } from "../extend-BwkxQVzY.js";
1
+ import { n as CmykColor } from "../types-BP0NSyqd.js";
2
+ import { t as Plugin } from "../extend-UYBGWCHH.js";
3
3
 
4
4
  //#region src/plugins/cmyk.d.ts
5
5
  declare module '@soybeanjs/colord' {
@@ -1,4 +1,4 @@
1
- import { i as isPresent, l as round, o as parseAlpha, t as clamp, v as ALPHA_PRECISION } from "../utils-BhDL0kto.js";
1
+ import { i as isPresent, l as round, o as parseAlpha, t as clamp, v as ALPHA_PRECISION } from "../utils-CshL9w1R.js";
2
2
 
3
3
  //#region src/models/cmyk.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as Plugin } from "../extend-BwkxQVzY.js";
1
+ import { t as Plugin } from "../extend-UYBGWCHH.js";
2
2
 
3
3
  //#region src/plugins/harmonies.d.ts
4
4
  type HarmonyType = 'analogous' | 'complementary' | 'double-split-complementary' | 'rectangle' | 'split-complementary' | 'tetradic' | 'triadic';
@@ -1,5 +1,5 @@
1
- import { o as HwbColor } from "../types-CV5bTriG.js";
2
- import { t as Plugin } from "../extend-BwkxQVzY.js";
1
+ import { o as HwbColor } from "../types-BP0NSyqd.js";
2
+ import { t as Plugin } from "../extend-UYBGWCHH.js";
3
3
 
4
4
  //#region src/plugins/hwb.d.ts
5
5
  declare module '@soybeanjs/colord' {
@@ -1,5 +1,5 @@
1
- import { i as isPresent, l as round, n as clampHue, o as parseAlpha, s as parseHue, t as clamp, v as ALPHA_PRECISION } from "../utils-BhDL0kto.js";
2
- import { r as rgbToHsv, t as hsvToRgb } from "../hsv-6f-Avk00.js";
1
+ import { i as isPresent, l as round, n as clampHue, o as parseAlpha, s as parseHue, t as clamp, v as ALPHA_PRECISION } from "../utils-CshL9w1R.js";
2
+ import { r as rgbToHsv, t as hsvToRgb } from "../hsv-OOAVcaRH.js";
3
3
 
4
4
  //#region src/models/hwb.ts
5
5
  const clampHwb = (hwb) => {
@@ -1,5 +1,5 @@
1
- import { l as LabColor, t as AnyColor } from "../types-CV5bTriG.js";
2
- import { t as Plugin } from "../extend-BwkxQVzY.js";
1
+ import { l as LabColor, t as AnyColor } from "../types-BP0NSyqd.js";
2
+ import { t as Plugin } from "../extend-UYBGWCHH.js";
3
3
 
4
4
  //#region src/plugins/lab.d.ts
5
5
  declare module '@soybeanjs/colord' {
@@ -1,8 +1,8 @@
1
- import "../utils-BhDL0kto.js";
2
- import "../rgb-BIWjP3hJ.js";
3
- import "../xyz-Czd8MTub.js";
4
- import "../lab-DklZwOkG.js";
5
- import "../get-DjkEJgax.js";
6
- import { n as lab_default, t as labPlugin } from "../lab-BXLaTQvQ.js";
1
+ import "../utils-CshL9w1R.js";
2
+ import "../rgb-DzRkOBLO.js";
3
+ import "../xyz-WMIP19rd.js";
4
+ import "../lab-NxNRMUqK.js";
5
+ import "../get-B9GsrsfV.js";
6
+ import { n as lab_default, t as labPlugin } from "../lab-DRO6J6z8.js";
7
7
 
8
8
  export { lab_default as default, labPlugin };
@@ -1,5 +1,5 @@
1
- import { u as LchColor } from "../types-CV5bTriG.js";
2
- import { t as Plugin } from "../extend-BwkxQVzY.js";
1
+ import { u as LchColor } from "../types-BP0NSyqd.js";
2
+ import { t as Plugin } from "../extend-UYBGWCHH.js";
3
3
 
4
4
  //#region src/plugins/lch.d.ts
5
5
  declare module '@soybeanjs/colord' {
@@ -1,7 +1,7 @@
1
- import { i as isPresent, l as round, n as clampHue, o as parseAlpha, s as parseHue, t as clamp, v as ALPHA_PRECISION } from "../utils-BhDL0kto.js";
2
- import { n as clampRgb } from "../rgb-BIWjP3hJ.js";
3
- import "../xyz-Czd8MTub.js";
4
- import { n as labToRgb, o as rgbToLab } from "../lab-DklZwOkG.js";
1
+ import { i as isPresent, l as round, n as clampHue, o as parseAlpha, s as parseHue, t as clamp, v as ALPHA_PRECISION } from "../utils-CshL9w1R.js";
2
+ import { n as clampRgb } from "../rgb-DzRkOBLO.js";
3
+ import "../xyz-WMIP19rd.js";
4
+ import { n as labToRgb, o as rgbToLab } from "../lab-NxNRMUqK.js";
5
5
 
6
6
  //#region src/models/lch.ts
7
7
  /**
@@ -115,7 +115,7 @@ const lchaToRgb = (lcha) => {
115
115
  });
116
116
  return clampRgb(rgb);
117
117
  };
118
- const parseLch = ({ l, c, h, alpha = 1 }) => {
118
+ const parseOriginLch = ({ l, c, h, alpha = 1 }) => {
119
119
  if (!isPresent(l) || !isPresent(c) || !isPresent(h)) return null;
120
120
  return clampLch({
121
121
  l: Number(l),
@@ -124,8 +124,8 @@ const parseLch = ({ l, c, h, alpha = 1 }) => {
124
124
  alpha: Number(alpha)
125
125
  });
126
126
  };
127
- const parseLchToRgb = (input) => {
128
- const lch = parseLch(input);
127
+ const parseLch = (input) => {
128
+ const lch = parseOriginLch(input);
129
129
  if (!lch) return null;
130
130
  return lchaToRgb(lch);
131
131
  };
@@ -137,7 +137,7 @@ const parseLchToRgb = (input) => {
137
137
  * - alpha: <number|percentage> [0,1]
138
138
  */
139
139
  const lchaMatcher = /^lch\(\s*([+-]?[\d.]+)%?\s+([+-]?[\d.]+)\s+([+-]?[\d.]+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?[\d.]+%?))?\s*\)$/i;
140
- const parseLchString = (input) => {
140
+ const parseOriginLchString = (input) => {
141
141
  const match = lchaMatcher.exec(input);
142
142
  if (!match) return null;
143
143
  const [_, l, c, h, unit, alpha] = match;
@@ -148,8 +148,8 @@ const parseLchString = (input) => {
148
148
  alpha: parseAlpha(alpha)
149
149
  });
150
150
  };
151
- const parseLchStringToRgb = (input) => {
152
- const lch = parseLchString(input);
151
+ const parseLchString = (input) => {
152
+ const lch = parseOriginLchString(input);
153
153
  if (!lch) return null;
154
154
  return lchaToRgb(lch);
155
155
  };
@@ -163,8 +163,8 @@ const rgbToLchString = (rgb) => {
163
163
  const parseLchBySource = (source) => {
164
164
  if (!source || source.format !== "lch") return null;
165
165
  const { input } = source;
166
- if (typeof input === "string") return parseLchString(input);
167
- if (typeof input === "object") return parseLch(input);
166
+ if (typeof input === "string") return parseOriginLchString(input);
167
+ if (typeof input === "object") return parseOriginLch(input);
168
168
  return null;
169
169
  };
170
170
  const toLchStringBySource = (source) => {
@@ -187,8 +187,8 @@ const lchPlugin = (ColordClass, parsers) => {
187
187
  ColordClass.prototype.toLchString = function toLchString$1() {
188
188
  return toLchStringBySource(this.getSource()) || rgbToLchString(this.rgb);
189
189
  };
190
- parsers.string.push([parseLchStringToRgb, "lch"]);
191
- parsers.object.push([parseLchToRgb, "lch"]);
190
+ parsers.string.push([parseLchString, "lch"]);
191
+ parsers.object.push([parseLch, "lch"]);
192
192
  };
193
193
  var lch_default = lchPlugin;
194
194
 
@@ -1,4 +1,4 @@
1
- import { t as Plugin } from "../extend-BwkxQVzY.js";
1
+ import { t as Plugin } from "../extend-UYBGWCHH.js";
2
2
 
3
3
  //#region src/plugins/minify.d.ts
4
4
  interface MinificationOptions {
@@ -1,4 +1,4 @@
1
- import { l as round } from "../utils-BhDL0kto.js";
1
+ import { l as round } from "../utils-CshL9w1R.js";
2
2
 
3
3
  //#region src/plugins/minify.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { t as AnyColor } from "../types-CV5bTriG.js";
2
- import { t as Plugin } from "../extend-BwkxQVzY.js";
1
+ import { t as AnyColor } from "../types-BP0NSyqd.js";
2
+ import { t as Plugin } from "../extend-UYBGWCHH.js";
3
3
 
4
4
  //#region src/plugins/mix.d.ts
5
5
  declare module '@soybeanjs/colord' {
@@ -1,9 +1,9 @@
1
- import "../utils-BhDL0kto.js";
2
- import "../rgb-BIWjP3hJ.js";
3
- import "../hsv-6f-Avk00.js";
4
- import { i as mix } from "../manipulate-DJ-cBonL.js";
5
- import "../xyz-Czd8MTub.js";
6
- import "../lab-DklZwOkG.js";
1
+ import "../utils-CshL9w1R.js";
2
+ import "../rgb-DzRkOBLO.js";
3
+ import "../hsv-OOAVcaRH.js";
4
+ import { i as mix } from "../manipulate-DG6jOj5-.js";
5
+ import "../xyz-WMIP19rd.js";
6
+ import "../lab-NxNRMUqK.js";
7
7
 
8
8
  //#region src/plugins/mix.ts
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { t as Plugin } from "../extend-BwkxQVzY.js";
1
+ import { t as Plugin } from "../extend-UYBGWCHH.js";
2
2
 
3
3
  //#region src/plugins/names.d.ts
4
4
  interface ConvertOptions {
@@ -1,5 +1,5 @@
1
- import { f as OklabColor } from "../types-CV5bTriG.js";
2
- import { t as Plugin } from "../extend-BwkxQVzY.js";
1
+ import { f as OklabColor } from "../types-BP0NSyqd.js";
2
+ import { t as Plugin } from "../extend-UYBGWCHH.js";
3
3
 
4
4
  //#region src/plugins/oklab.d.ts
5
5
  declare module '@soybeanjs/colord' {
@@ -1,5 +1,5 @@
1
- import { _ as OKLAB_M2_INV, a as mul3x3, c as parseValueToDecimal, g as OKLAB_M2, h as OKLAB_M1_INV, i as isPresent, l as round, m as OKLAB_M1, o as parseAlpha, t as clamp, v as ALPHA_PRECISION } from "../utils-BhDL0kto.js";
2
- import { n as clampRgb, o as rgbToLinearRgb, r as linearRgbToRgb, t as clampLinearRgb } from "../rgb-BIWjP3hJ.js";
1
+ import { _ as OKLAB_M2_INV, a as mul3x3, c as parseValueToDecimal, g as OKLAB_M2, h as OKLAB_M1_INV, i as isPresent, l as round, m as OKLAB_M1, o as parseAlpha, t as clamp, v as ALPHA_PRECISION } from "../utils-CshL9w1R.js";
2
+ import { n as clampRgb, o as rgbToLinearRgb, r as linearRgbToRgb, t as clampLinearRgb } from "../rgb-DzRkOBLO.js";
3
3
 
4
4
  //#region src/models/oklab.ts
5
5
  const clampOklab = (oklab) => {
@@ -47,7 +47,7 @@ const rgbToOklab = (rgb) => {
47
47
  alpha: rgb.alpha
48
48
  });
49
49
  };
50
- const parseOklab = ({ l, a, b, alpha = 1 }) => {
50
+ const parseOriginOklab = ({ l, a, b, alpha = 1 }) => {
51
51
  if (!isPresent(l) || !isPresent(a) || !isPresent(b)) return null;
52
52
  return clampOklab({
53
53
  l: Number(l),
@@ -56,8 +56,8 @@ const parseOklab = ({ l, a, b, alpha = 1 }) => {
56
56
  alpha: Number(alpha)
57
57
  });
58
58
  };
59
- const parseOklabToRgb = (input) => {
60
- const oklab = parseOklab(input);
59
+ const parseOklab = (input) => {
60
+ const oklab = parseOriginOklab(input);
61
61
  if (!oklab) return null;
62
62
  return oklabToRgb(oklab);
63
63
  };
@@ -73,7 +73,7 @@ const oklabMatcher = /^oklab\(\s*([+-]?[\d.]+)%?\s+([+-]?[\d.]+)\s+([+-]?[\d.]+)
73
73
  * Parses a valid OKLAB CSS color function/string to OKLAB object
74
74
  * https://www.w3.org/TR/css-color-4/#specifying-oklab
75
75
  */
76
- const parseOklabString = (input) => {
76
+ const parseOriginOklabString = (input) => {
77
77
  const match = oklabMatcher.exec(input);
78
78
  if (!match) return null;
79
79
  const [_, l, a, b, alpha] = match;
@@ -88,8 +88,8 @@ const parseOklabString = (input) => {
88
88
  * Parses a valid OKLAB CSS color function/string to RGB
89
89
  * https://www.w3.org/TR/css-color-4/#specifying-oklab
90
90
  */
91
- const parseOklabStringToRgb = (input) => {
92
- const oklab = parseOklabString(input);
91
+ const parseOklabString = (input) => {
92
+ const oklab = parseOriginOklabString(input);
93
93
  if (!oklab) return null;
94
94
  return oklabToRgb(oklab);
95
95
  };
@@ -106,8 +106,8 @@ const rgbToOklabString = (rgb) => {
106
106
  const parseOklabBySource = (source) => {
107
107
  if (!source || source.format !== "oklab") return null;
108
108
  const { input } = source;
109
- if (typeof input === "string") return parseOklabString(input);
110
- if (typeof input === "object") return parseOklab(input);
109
+ if (typeof input === "string") return parseOriginOklabString(input);
110
+ if (typeof input === "object") return parseOriginOklab(input);
111
111
  return null;
112
112
  };
113
113
  /**
@@ -132,8 +132,8 @@ const oklabPlugin = (ColordClass, parsers) => {
132
132
  ColordClass.prototype.toOklabString = function toOklabString$1() {
133
133
  return toOklabStringBySource(this.getSource()) || rgbToOklabString(this.rgb);
134
134
  };
135
- parsers.string.push([parseOklabStringToRgb, "oklab"]);
136
- parsers.object.push([parseOklabToRgb, "oklab"]);
135
+ parsers.string.push([parseOklabString, "oklab"]);
136
+ parsers.object.push([parseOklab, "oklab"]);
137
137
  };
138
138
  var oklab_default = oklabPlugin;
139
139
 
@@ -1,5 +1,5 @@
1
- import { x as XyzColor } from "../types-CV5bTriG.js";
2
- import { t as Plugin } from "../extend-BwkxQVzY.js";
1
+ import { x as XyzColor } from "../types-BP0NSyqd.js";
2
+ import { t as Plugin } from "../extend-UYBGWCHH.js";
3
3
 
4
4
  //#region src/plugins/xyz.d.ts
5
5
  declare module '@soybeanjs/colord' {