@doenet/v06-to-v07 0.7.21-dev.353 → 0.7.21-dev.355
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.
- package/{index-L-CvJFQy.js → index-BizNZKDW.js} +321 -577
- package/{index-L-CvJFQy.js.map → index-BizNZKDW.js.map} +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/{sha256-a7S5PDuo-CKxUBTt--B9I1uHhS.js → sha256-J35x7uWS-24B4oOm4-C0fEUZ-1.js} +2 -2
- package/{sha256-a7S5PDuo-CKxUBTt--B9I1uHhS.js.map → sha256-J35x7uWS-24B4oOm4-C0fEUZ-1.js.map} +1 -1
|
@@ -38637,178 +38637,246 @@ function requireColorName() {
|
|
|
38637
38637
|
}
|
|
38638
38638
|
var colorNameExports = requireColorName();
|
|
38639
38639
|
const colorName = /* @__PURE__ */ getDefaultExportFromCjs(colorNameExports);
|
|
38640
|
-
var
|
|
38641
|
-
|
|
38642
|
-
|
|
38643
|
-
|
|
38644
|
-
|
|
38645
|
-
|
|
38646
|
-
|
|
38647
|
-
|
|
38648
|
-
|
|
38649
|
-
|
|
38650
|
-
|
|
38651
|
-
|
|
38652
|
-
|
|
38653
|
-
|
|
38654
|
-
|
|
38655
|
-
|
|
38656
|
-
|
|
38657
|
-
|
|
38658
|
-
|
|
38659
|
-
|
|
38660
|
-
|
|
38661
|
-
|
|
38662
|
-
|
|
38663
|
-
|
|
38664
|
-
|
|
38665
|
-
|
|
38666
|
-
|
|
38667
|
-
|
|
38668
|
-
|
|
38669
|
-
|
|
38670
|
-
|
|
38671
|
-
|
|
38672
|
-
|
|
38673
|
-
|
|
38674
|
-
|
|
38675
|
-
|
|
38676
|
-
|
|
38677
|
-
|
|
38678
|
-
|
|
38679
|
-
|
|
38680
|
-
|
|
38681
|
-
|
|
38682
|
-
|
|
38683
|
-
|
|
38684
|
-
|
|
38685
|
-
|
|
38686
|
-
|
|
38687
|
-
|
|
38688
|
-
|
|
38689
|
-
|
|
38690
|
-
|
|
38691
|
-
|
|
38692
|
-
|
|
38693
|
-
|
|
38694
|
-
|
|
38695
|
-
|
|
38696
|
-
|
|
38697
|
-
|
|
38698
|
-
|
|
38699
|
-
|
|
38700
|
-
|
|
38701
|
-
|
|
38702
|
-
|
|
38703
|
-
|
|
38704
|
-
|
|
38705
|
-
|
|
38706
|
-
|
|
38707
|
-
|
|
38708
|
-
|
|
38709
|
-
|
|
38710
|
-
|
|
38711
|
-
|
|
38712
|
-
|
|
38713
|
-
|
|
38714
|
-
|
|
38715
|
-
|
|
38716
|
-
|
|
38717
|
-
|
|
38718
|
-
|
|
38719
|
-
|
|
38720
|
-
|
|
38721
|
-
|
|
38722
|
-
|
|
38723
|
-
|
|
38724
|
-
|
|
38725
|
-
|
|
38726
|
-
|
|
38727
|
-
|
|
38728
|
-
|
|
38729
|
-
|
|
38730
|
-
|
|
38731
|
-
|
|
38732
|
-
|
|
38733
|
-
|
|
38734
|
-
|
|
38735
|
-
|
|
38736
|
-
|
|
38737
|
-
|
|
38738
|
-
|
|
38739
|
-
|
|
38740
|
-
|
|
38741
|
-
|
|
38742
|
-
|
|
38743
|
-
|
|
38744
|
-
|
|
38745
|
-
|
|
38746
|
-
|
|
38747
|
-
|
|
38748
|
-
|
|
38749
|
-
|
|
38750
|
-
|
|
38751
|
-
|
|
38752
|
-
|
|
38753
|
-
|
|
38754
|
-
|
|
38755
|
-
|
|
38756
|
-
|
|
38757
|
-
|
|
38758
|
-
|
|
38759
|
-
|
|
38760
|
-
|
|
38761
|
-
|
|
38762
|
-
|
|
38763
|
-
|
|
38764
|
-
|
|
38765
|
-
|
|
38766
|
-
|
|
38767
|
-
|
|
38768
|
-
|
|
38769
|
-
|
|
38770
|
-
|
|
38771
|
-
|
|
38772
|
-
|
|
38773
|
-
|
|
38774
|
-
|
|
38775
|
-
|
|
38776
|
-
|
|
38777
|
-
|
|
38778
|
-
|
|
38779
|
-
|
|
38780
|
-
|
|
38781
|
-
|
|
38782
|
-
|
|
38783
|
-
|
|
38784
|
-
|
|
38785
|
-
|
|
38786
|
-
|
|
38787
|
-
|
|
38788
|
-
|
|
38789
|
-
|
|
38790
|
-
|
|
38791
|
-
|
|
38792
|
-
|
|
38793
|
-
|
|
38794
|
-
|
|
38795
|
-
|
|
38796
|
-
|
|
38797
|
-
|
|
38798
|
-
|
|
38799
|
-
|
|
38800
|
-
|
|
38801
|
-
|
|
38802
|
-
|
|
38803
|
-
|
|
38804
|
-
|
|
38805
|
-
|
|
38806
|
-
|
|
38807
|
-
|
|
38808
|
-
|
|
38809
|
-
|
|
38810
|
-
|
|
38811
|
-
|
|
38640
|
+
var r$2 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t$3 = function(r2) {
|
|
38641
|
+
return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
|
|
38642
|
+
}, n$2 = function(r2, t22, n2) {
|
|
38643
|
+
return void 0 === t22 && (t22 = 0), void 0 === n2 && (n2 = Math.pow(10, t22)), Math.round(n2 * r2) / n2 + 0;
|
|
38644
|
+
}, e$2 = function(r2, t22, n2) {
|
|
38645
|
+
return void 0 === t22 && (t22 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t22 ? r2 : t22;
|
|
38646
|
+
}, u$2 = function(r2) {
|
|
38647
|
+
return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
|
|
38648
|
+
}, a$2 = function(r2) {
|
|
38649
|
+
return { r: e$2(r2.r, 0, 255), g: e$2(r2.g, 0, 255), b: e$2(r2.b, 0, 255), a: e$2(r2.a) };
|
|
38650
|
+
}, o$3 = function(r2) {
|
|
38651
|
+
return { r: n$2(r2.r), g: n$2(r2.g), b: n$2(r2.b), a: n$2(r2.a, 3) };
|
|
38652
|
+
}, i$2 = /^#([0-9a-f]{3,8})$/i, s$1$1 = function(r2) {
|
|
38653
|
+
var t22 = r2.toString(16);
|
|
38654
|
+
return t22.length < 2 ? "0" + t22 : t22;
|
|
38655
|
+
}, h$2 = function(r2) {
|
|
38656
|
+
var t22 = r2.r, n2 = r2.g, e22 = r2.b, u2 = r2.a, a2 = Math.max(t22, n2, e22), o2 = a2 - Math.min(t22, n2, e22), i2 = o2 ? a2 === t22 ? (n2 - e22) / o2 : a2 === n2 ? 2 + (e22 - t22) / o2 : 4 + (t22 - n2) / o2 : 0;
|
|
38657
|
+
return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o2 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
|
|
38658
|
+
}, b$2 = function(r2) {
|
|
38659
|
+
var t22 = r2.h, n2 = r2.s, e22 = r2.v, u2 = r2.a;
|
|
38660
|
+
t22 = t22 / 360 * 6, n2 /= 100, e22 /= 100;
|
|
38661
|
+
var a2 = Math.floor(t22), o2 = e22 * (1 - n2), i2 = e22 * (1 - (t22 - a2) * n2), s2 = e22 * (1 - (1 - t22 + a2) * n2), h2 = a2 % 6;
|
|
38662
|
+
return { r: 255 * [e22, i2, o2, o2, s2, e22][h2], g: 255 * [s2, e22, e22, i2, o2, o2][h2], b: 255 * [o2, o2, s2, e22, e22, i2][h2], a: u2 };
|
|
38663
|
+
}, g$2 = function(r2) {
|
|
38664
|
+
return { h: u$2(r2.h), s: e$2(r2.s, 0, 100), l: e$2(r2.l, 0, 100), a: e$2(r2.a) };
|
|
38665
|
+
}, d$1$1 = function(r2) {
|
|
38666
|
+
return { h: n$2(r2.h), s: n$2(r2.s), l: n$2(r2.l), a: n$2(r2.a, 3) };
|
|
38667
|
+
}, f$1$1 = function(r2) {
|
|
38668
|
+
return b$2((n2 = (t22 = r2).s, { h: t22.h, s: (n2 *= ((e22 = t22.l) < 50 ? e22 : 100 - e22) / 100) > 0 ? 2 * n2 / (e22 + n2) * 100 : 0, v: e22 + n2, a: t22.a }));
|
|
38669
|
+
var t22, n2, e22;
|
|
38670
|
+
}, c$1$1 = function(r2) {
|
|
38671
|
+
return { h: (t22 = h$2(r2)).h, s: (u2 = (200 - (n2 = t22.s)) * (e22 = t22.v) / 100) > 0 && u2 < 200 ? n2 * e22 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t22.a };
|
|
38672
|
+
var t22, n2, e22, u2;
|
|
38673
|
+
}, l$2 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, p$2 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, v$1$1 = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, m$2 = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, y$1$1 = { string: [[function(r2) {
|
|
38674
|
+
var t22 = i$2.exec(r2);
|
|
38675
|
+
return t22 ? (r2 = t22[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n$2(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n$2(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
|
|
38676
|
+
}, "hex"], [function(r2) {
|
|
38677
|
+
var t22 = v$1$1.exec(r2) || m$2.exec(r2);
|
|
38678
|
+
return t22 ? t22[2] !== t22[4] || t22[4] !== t22[6] ? null : a$2({ r: Number(t22[1]) / (t22[2] ? 100 / 255 : 1), g: Number(t22[3]) / (t22[4] ? 100 / 255 : 1), b: Number(t22[5]) / (t22[6] ? 100 / 255 : 1), a: void 0 === t22[7] ? 1 : Number(t22[7]) / (t22[8] ? 100 : 1) }) : null;
|
|
38679
|
+
}, "rgb"], [function(t22) {
|
|
38680
|
+
var n2 = l$2.exec(t22) || p$2.exec(t22);
|
|
38681
|
+
if (!n2) return null;
|
|
38682
|
+
var e22, u2, a2 = g$2({ h: (e22 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e22) * (r$2[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
|
|
38683
|
+
return f$1$1(a2);
|
|
38684
|
+
}, "hsl"]], object: [[function(r2) {
|
|
38685
|
+
var n2 = r2.r, e22 = r2.g, u2 = r2.b, o2 = r2.a, i2 = void 0 === o2 ? 1 : o2;
|
|
38686
|
+
return t$3(n2) && t$3(e22) && t$3(u2) ? a$2({ r: Number(n2), g: Number(e22), b: Number(u2), a: Number(i2) }) : null;
|
|
38687
|
+
}, "rgb"], [function(r2) {
|
|
38688
|
+
var n2 = r2.h, e22 = r2.s, u2 = r2.l, a2 = r2.a, o2 = void 0 === a2 ? 1 : a2;
|
|
38689
|
+
if (!t$3(n2) || !t$3(e22) || !t$3(u2)) return null;
|
|
38690
|
+
var i2 = g$2({ h: Number(n2), s: Number(e22), l: Number(u2), a: Number(o2) });
|
|
38691
|
+
return f$1$1(i2);
|
|
38692
|
+
}, "hsl"], [function(r2) {
|
|
38693
|
+
var n2 = r2.h, a2 = r2.s, o2 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
|
|
38694
|
+
if (!t$3(n2) || !t$3(a2) || !t$3(o2)) return null;
|
|
38695
|
+
var h2 = (function(r3) {
|
|
38696
|
+
return { h: u$2(r3.h), s: e$2(r3.s, 0, 100), v: e$2(r3.v, 0, 100), a: e$2(r3.a) };
|
|
38697
|
+
})({ h: Number(n2), s: Number(a2), v: Number(o2), a: Number(s2) });
|
|
38698
|
+
return b$2(h2);
|
|
38699
|
+
}, "hsv"]] }, N$2 = function(r2, t22) {
|
|
38700
|
+
for (var n2 = 0; n2 < t22.length; n2++) {
|
|
38701
|
+
var e22 = t22[n2][0](r2);
|
|
38702
|
+
if (e22) return [e22, t22[n2][1]];
|
|
38703
|
+
}
|
|
38704
|
+
return [null, void 0];
|
|
38705
|
+
}, x$1$1 = function(r2) {
|
|
38706
|
+
return "string" == typeof r2 ? N$2(r2.trim(), y$1$1.string) : "object" == typeof r2 && null !== r2 ? N$2(r2, y$1$1.object) : [null, void 0];
|
|
38707
|
+
}, M$2$1 = function(r2, t22) {
|
|
38708
|
+
var n2 = c$1$1(r2);
|
|
38709
|
+
return { h: n2.h, s: e$2(n2.s + 100 * t22, 0, 100), l: n2.l, a: n2.a };
|
|
38710
|
+
}, H$3 = function(r2) {
|
|
38711
|
+
return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
|
|
38712
|
+
}, $$2 = function(r2, t22) {
|
|
38713
|
+
var n2 = c$1$1(r2);
|
|
38714
|
+
return { h: n2.h, s: n2.s, l: e$2(n2.l + 100 * t22, 0, 100), a: n2.a };
|
|
38715
|
+
}, j$2 = (function() {
|
|
38716
|
+
function r2(r3) {
|
|
38717
|
+
this.parsed = x$1$1(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
|
|
38718
|
+
}
|
|
38719
|
+
return r2.prototype.isValid = function() {
|
|
38720
|
+
return null !== this.parsed;
|
|
38721
|
+
}, r2.prototype.brightness = function() {
|
|
38722
|
+
return n$2(H$3(this.rgba), 2);
|
|
38723
|
+
}, r2.prototype.isDark = function() {
|
|
38724
|
+
return H$3(this.rgba) < 0.5;
|
|
38725
|
+
}, r2.prototype.isLight = function() {
|
|
38726
|
+
return H$3(this.rgba) >= 0.5;
|
|
38727
|
+
}, r2.prototype.toHex = function() {
|
|
38728
|
+
return r3 = o$3(this.rgba), t22 = r3.r, e22 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s$1$1(n$2(255 * a2)) : "", "#" + s$1$1(t22) + s$1$1(e22) + s$1$1(u2) + i2;
|
|
38729
|
+
var r3, t22, e22, u2, a2, i2;
|
|
38730
|
+
}, r2.prototype.toRgb = function() {
|
|
38731
|
+
return o$3(this.rgba);
|
|
38732
|
+
}, r2.prototype.toRgbString = function() {
|
|
38733
|
+
return r3 = o$3(this.rgba), t22 = r3.r, n2 = r3.g, e22 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t22 + ", " + n2 + ", " + e22 + ", " + u2 + ")" : "rgb(" + t22 + ", " + n2 + ", " + e22 + ")";
|
|
38734
|
+
var r3, t22, n2, e22, u2;
|
|
38735
|
+
}, r2.prototype.toHsl = function() {
|
|
38736
|
+
return d$1$1(c$1$1(this.rgba));
|
|
38737
|
+
}, r2.prototype.toHslString = function() {
|
|
38738
|
+
return r3 = d$1$1(c$1$1(this.rgba)), t22 = r3.h, n2 = r3.s, e22 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t22 + ", " + n2 + "%, " + e22 + "%, " + u2 + ")" : "hsl(" + t22 + ", " + n2 + "%, " + e22 + "%)";
|
|
38739
|
+
var r3, t22, n2, e22, u2;
|
|
38740
|
+
}, r2.prototype.toHsv = function() {
|
|
38741
|
+
return r3 = h$2(this.rgba), { h: n$2(r3.h), s: n$2(r3.s), v: n$2(r3.v), a: n$2(r3.a, 3) };
|
|
38742
|
+
var r3;
|
|
38743
|
+
}, r2.prototype.invert = function() {
|
|
38744
|
+
return w$1$1({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
|
|
38745
|
+
var r3;
|
|
38746
|
+
}, r2.prototype.saturate = function(r3) {
|
|
38747
|
+
return void 0 === r3 && (r3 = 0.1), w$1$1(M$2$1(this.rgba, r3));
|
|
38748
|
+
}, r2.prototype.desaturate = function(r3) {
|
|
38749
|
+
return void 0 === r3 && (r3 = 0.1), w$1$1(M$2$1(this.rgba, -r3));
|
|
38750
|
+
}, r2.prototype.grayscale = function() {
|
|
38751
|
+
return w$1$1(M$2$1(this.rgba, -1));
|
|
38752
|
+
}, r2.prototype.lighten = function(r3) {
|
|
38753
|
+
return void 0 === r3 && (r3 = 0.1), w$1$1($$2(this.rgba, r3));
|
|
38754
|
+
}, r2.prototype.darken = function(r3) {
|
|
38755
|
+
return void 0 === r3 && (r3 = 0.1), w$1$1($$2(this.rgba, -r3));
|
|
38756
|
+
}, r2.prototype.rotate = function(r3) {
|
|
38757
|
+
return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
|
|
38758
|
+
}, r2.prototype.alpha = function(r3) {
|
|
38759
|
+
return "number" == typeof r3 ? w$1$1({ r: (t22 = this.rgba).r, g: t22.g, b: t22.b, a: r3 }) : n$2(this.rgba.a, 3);
|
|
38760
|
+
var t22;
|
|
38761
|
+
}, r2.prototype.hue = function(r3) {
|
|
38762
|
+
var t22 = c$1$1(this.rgba);
|
|
38763
|
+
return "number" == typeof r3 ? w$1$1({ h: r3, s: t22.s, l: t22.l, a: t22.a }) : n$2(t22.h);
|
|
38764
|
+
}, r2.prototype.isEqual = function(r3) {
|
|
38765
|
+
return this.toHex() === w$1$1(r3).toHex();
|
|
38766
|
+
}, r2;
|
|
38767
|
+
})(), w$1$1 = function(r2) {
|
|
38768
|
+
return r2 instanceof j$2 ? r2 : new j$2(r2);
|
|
38769
|
+
}, S$2 = [], k$2 = function(r2) {
|
|
38770
|
+
r2.forEach(function(r3) {
|
|
38771
|
+
S$2.indexOf(r3) < 0 && (r3(j$2, y$1$1), S$2.push(r3));
|
|
38772
|
+
});
|
|
38773
|
+
};
|
|
38774
|
+
var a$1$1 = function(a2) {
|
|
38775
|
+
return "string" == typeof a2 ? a2.length > 0 : "number" == typeof a2;
|
|
38776
|
+
}, t$2 = function(a2, t22, o2) {
|
|
38777
|
+
return void 0 === t22 && (t22 = 0), void 0 === o2 && (o2 = Math.pow(10, t22)), Math.round(o2 * a2) / o2 + 0;
|
|
38778
|
+
}, o$2 = function(a2, t22, o2) {
|
|
38779
|
+
return void 0 === t22 && (t22 = 0), void 0 === o2 && (o2 = 1), a2 > o2 ? o2 : a2 > t22 ? a2 : t22;
|
|
38780
|
+
}, r$1$1 = function(a2) {
|
|
38781
|
+
var t22 = a2 / 255;
|
|
38782
|
+
return t22 < 0.04045 ? t22 / 12.92 : Math.pow((t22 + 0.055) / 1.055, 2.4);
|
|
38783
|
+
}, h$1$1 = function(a2) {
|
|
38784
|
+
return 255 * (a2 > 31308e-7 ? 1.055 * Math.pow(a2, 1 / 2.4) - 0.055 : 12.92 * a2);
|
|
38785
|
+
}, n$1$1 = 96.422, p$1$1 = 100, M$1$1 = 82.521, u$1$1 = function(a2) {
|
|
38786
|
+
var t22, r2, n2 = { x: 0.9555766 * (t22 = a2).x + -0.0230393 * t22.y + 0.0631636 * t22.z, y: -0.0282895 * t22.x + 1.0099416 * t22.y + 0.0210077 * t22.z, z: 0.0122982 * t22.x + -0.020483 * t22.y + 1.3299098 * t22.z };
|
|
38787
|
+
return r2 = { r: h$1$1(0.032404542 * n2.x - 0.015371385 * n2.y - 4985314e-9 * n2.z), g: h$1$1(-969266e-8 * n2.x + 0.018760108 * n2.y + 41556e-8 * n2.z), b: h$1$1(556434e-9 * n2.x - 2040259e-9 * n2.y + 0.010572252 * n2.z), a: a2.a }, { r: o$2(r2.r, 0, 255), g: o$2(r2.g, 0, 255), b: o$2(r2.b, 0, 255), a: o$2(r2.a) };
|
|
38788
|
+
}, e$1$1 = function(a2) {
|
|
38789
|
+
var t22 = r$1$1(a2.r), h2 = r$1$1(a2.g), u2 = r$1$1(a2.b);
|
|
38790
|
+
return (function(a3) {
|
|
38791
|
+
return { x: o$2(a3.x, 0, n$1$1), y: o$2(a3.y, 0, p$1$1), z: o$2(a3.z, 0, M$1$1), a: o$2(a3.a) };
|
|
38792
|
+
})((function(a3) {
|
|
38793
|
+
return { x: 1.0478112 * a3.x + 0.0228866 * a3.y + -0.050127 * a3.z, y: 0.0295424 * a3.x + 0.9904844 * a3.y + -0.0170491 * a3.z, z: -92345e-7 * a3.x + 0.0150436 * a3.y + 0.7521316 * a3.z, a: a3.a };
|
|
38794
|
+
})({ x: 100 * (0.4124564 * t22 + 0.3575761 * h2 + 0.1804375 * u2), y: 100 * (0.2126729 * t22 + 0.7151522 * h2 + 0.072175 * u2), z: 100 * (0.0193339 * t22 + 0.119192 * h2 + 0.9503041 * u2), a: a2.a }));
|
|
38795
|
+
}, w$2 = 216 / 24389, b$1$1 = 24389 / 27, i$1$1 = function(t22) {
|
|
38796
|
+
var r2 = t22.l, h2 = t22.a, n2 = t22.b, p2 = t22.alpha, M22 = void 0 === p2 ? 1 : p2;
|
|
38797
|
+
if (!a$1$1(r2) || !a$1$1(h2) || !a$1$1(n2)) return null;
|
|
38798
|
+
var u2 = (function(a2) {
|
|
38799
|
+
return { l: o$2(a2.l, 0, 400), a: a2.a, b: a2.b, alpha: o$2(a2.alpha) };
|
|
38800
|
+
})({ l: Number(r2), a: Number(h2), b: Number(n2), alpha: Number(M22) });
|
|
38801
|
+
return l$1$1(u2);
|
|
38802
|
+
}, l$1$1 = function(a2) {
|
|
38803
|
+
var t22 = (a2.l + 16) / 116, o2 = a2.a / 500 + t22, r2 = t22 - a2.b / 200;
|
|
38804
|
+
return u$1$1({ x: (Math.pow(o2, 3) > w$2 ? Math.pow(o2, 3) : (116 * o2 - 16) / b$1$1) * n$1$1, y: (a2.l > 8 ? Math.pow((a2.l + 16) / 116, 3) : a2.l / b$1$1) * p$1$1, z: (Math.pow(r2, 3) > w$2 ? Math.pow(r2, 3) : (116 * r2 - 16) / b$1$1) * M$1$1, a: a2.alpha });
|
|
38805
|
+
};
|
|
38806
|
+
function labPlugin(a2, r2) {
|
|
38807
|
+
a2.prototype.toLab = function() {
|
|
38808
|
+
return o2 = e$1$1(this.rgba), h2 = o2.y / p$1$1, u2 = o2.z / M$1$1, r3 = (r3 = o2.x / n$1$1) > w$2 ? Math.cbrt(r3) : (b$1$1 * r3 + 16) / 116, a3 = { l: 116 * (h2 = h2 > w$2 ? Math.cbrt(h2) : (b$1$1 * h2 + 16) / 116) - 16, a: 500 * (r3 - h2), b: 200 * (h2 - (u2 = u2 > w$2 ? Math.cbrt(u2) : (b$1$1 * u2 + 16) / 116)), alpha: o2.a }, { l: t$2(a3.l, 2), a: t$2(a3.a, 2), b: t$2(a3.b, 2), alpha: t$2(a3.alpha, 3) };
|
|
38809
|
+
var a3, o2, r3, h2, u2;
|
|
38810
|
+
}, a2.prototype.delta = function(r3) {
|
|
38811
|
+
void 0 === r3 && (r3 = "#FFF");
|
|
38812
|
+
var h2 = r3 instanceof a2 ? r3 : new a2(r3), n2 = (function(a3, t22) {
|
|
38813
|
+
var o2 = a3.l, r4 = a3.a, h3 = a3.b, n3 = t22.l, p2 = t22.a, M22 = t22.b, u2 = 180 / Math.PI, e22 = Math.PI / 180, w2 = Math.pow(Math.pow(r4, 2) + Math.pow(h3, 2), 0.5), b2 = Math.pow(Math.pow(p2, 2) + Math.pow(M22, 2), 0.5), i2 = (o2 + n3) / 2, l2 = Math.pow((w2 + b2) / 2, 7), c2 = 0.5 * (1 - Math.pow(l2 / (l2 + Math.pow(25, 7)), 0.5)), f2 = r4 * (1 + c2), y2 = p2 * (1 + c2), v2 = Math.pow(Math.pow(f2, 2) + Math.pow(h3, 2), 0.5), x2 = Math.pow(Math.pow(y2, 2) + Math.pow(M22, 2), 0.5), z2 = (v2 + x2) / 2, s2 = 0 === f2 && 0 === h3 ? 0 : Math.atan2(h3, f2) * u2, d2 = 0 === y2 && 0 === M22 ? 0 : Math.atan2(M22, y2) * u2;
|
|
38814
|
+
s2 < 0 && (s2 += 360), d2 < 0 && (d2 += 360);
|
|
38815
|
+
var g2 = d2 - s2, m2 = Math.abs(d2 - s2);
|
|
38816
|
+
m2 > 180 && d2 <= s2 ? g2 += 360 : m2 > 180 && d2 > s2 && (g2 -= 360);
|
|
38817
|
+
var N2 = s2 + d2;
|
|
38818
|
+
m2 <= 180 ? N2 /= 2 : N2 = (s2 + d2 < 360 ? N2 + 360 : N2 - 360) / 2;
|
|
38819
|
+
var F2 = 1 - 0.17 * Math.cos(e22 * (N2 - 30)) + 0.24 * Math.cos(2 * e22 * N2) + 0.32 * Math.cos(e22 * (3 * N2 + 6)) - 0.2 * Math.cos(e22 * (4 * N2 - 63)), L2 = n3 - o2, I2 = x2 - v2, P32 = 2 * Math.sin(e22 * g2 / 2) * Math.pow(v2 * x2, 0.5), j2 = 1 + 0.015 * Math.pow(i2 - 50, 2) / Math.pow(20 + Math.pow(i2 - 50, 2), 0.5), k2 = 1 + 0.045 * z2, q2 = 1 + 0.015 * z2 * F2, A2 = 30 * Math.exp(-1 * Math.pow((N2 - 275) / 25, 2)), B2 = -2 * Math.pow(l2 / (l2 + Math.pow(25, 7)), 0.5) * Math.sin(2 * e22 * A2);
|
|
38820
|
+
return Math.pow(Math.pow(L2 / 1 / j2, 2) + Math.pow(I2 / 1 / k2, 2) + Math.pow(P32 / 1 / q2, 2) + B2 * I2 * P32 / (1 * k2 * 1 * q2), 0.5);
|
|
38821
|
+
})(this.toLab(), h2.toLab()) / 100;
|
|
38822
|
+
return o$2(t$2(n2, 3));
|
|
38823
|
+
}, r2.object.push([i$1$1, "lab"]);
|
|
38824
|
+
}
|
|
38825
|
+
var r$3 = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, t$1$1 = function(r2) {
|
|
38826
|
+
return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
|
|
38827
|
+
}, a$3 = function(r2, t22, a2) {
|
|
38828
|
+
return void 0 === t22 && (t22 = 0), void 0 === a2 && (a2 = Math.pow(10, t22)), Math.round(a2 * r2) / a2 + 0;
|
|
38829
|
+
}, n$3 = function(r2, t22, a2) {
|
|
38830
|
+
return void 0 === t22 && (t22 = 0), void 0 === a2 && (a2 = 1), r2 > a2 ? a2 : r2 > t22 ? r2 : t22;
|
|
38831
|
+
}, u$3 = function(r2) {
|
|
38832
|
+
var t22 = r2 / 255;
|
|
38833
|
+
return t22 < 0.04045 ? t22 / 12.92 : Math.pow((t22 + 0.055) / 1.055, 2.4);
|
|
38834
|
+
}, h$3 = function(r2) {
|
|
38835
|
+
return 255 * (r2 > 31308e-7 ? 1.055 * Math.pow(r2, 1 / 2.4) - 0.055 : 12.92 * r2);
|
|
38836
|
+
}, o$1$1 = 96.422, e$3 = 100, c$2 = 82.521, i$3 = function(r2) {
|
|
38837
|
+
var t22, a2, u2 = { x: 0.9555766 * (t22 = r2).x + -0.0230393 * t22.y + 0.0631636 * t22.z, y: -0.0282895 * t22.x + 1.0099416 * t22.y + 0.0210077 * t22.z, z: 0.0122982 * t22.x + -0.020483 * t22.y + 1.3299098 * t22.z };
|
|
38838
|
+
return a2 = { r: h$3(0.032404542 * u2.x - 0.015371385 * u2.y - 4985314e-9 * u2.z), g: h$3(-969266e-8 * u2.x + 0.018760108 * u2.y + 41556e-8 * u2.z), b: h$3(556434e-9 * u2.x - 2040259e-9 * u2.y + 0.010572252 * u2.z), a: r2.a }, { r: n$3(a2.r, 0, 255), g: n$3(a2.g, 0, 255), b: n$3(a2.b, 0, 255), a: n$3(a2.a) };
|
|
38839
|
+
}, l$3 = function(r2) {
|
|
38840
|
+
var t22 = u$3(r2.r), a2 = u$3(r2.g), h2 = u$3(r2.b);
|
|
38841
|
+
return (function(r3) {
|
|
38842
|
+
return { x: n$3(r3.x, 0, o$1$1), y: n$3(r3.y, 0, e$3), z: n$3(r3.z, 0, c$2), a: n$3(r3.a) };
|
|
38843
|
+
})((function(r3) {
|
|
38844
|
+
return { x: 1.0478112 * r3.x + 0.0228866 * r3.y + -0.050127 * r3.z, y: 0.0295424 * r3.x + 0.9904844 * r3.y + -0.0170491 * r3.z, z: -92345e-7 * r3.x + 0.0150436 * r3.y + 0.7521316 * r3.z, a: r3.a };
|
|
38845
|
+
})({ x: 100 * (0.4124564 * t22 + 0.3575761 * a2 + 0.1804375 * h2), y: 100 * (0.2126729 * t22 + 0.7151522 * a2 + 0.072175 * h2), z: 100 * (0.0193339 * t22 + 0.119192 * a2 + 0.9503041 * h2), a: r2.a }));
|
|
38846
|
+
}, f$2 = 216 / 24389, b$3 = 24389 / 27, d$2 = function(r2) {
|
|
38847
|
+
return { l: n$3(r2.l, 0, 100), c: r2.c, h: (t22 = r2.h, (t22 = isFinite(t22) ? t22 % 360 : 0) > 0 ? t22 : t22 + 360), a: r2.a };
|
|
38848
|
+
var t22;
|
|
38849
|
+
}, p$3 = function(r2) {
|
|
38850
|
+
return { l: a$3(r2.l, 2), c: a$3(r2.c, 2), h: a$3(r2.h, 2), a: a$3(r2.a, 3) };
|
|
38851
|
+
}, v$2 = function(r2) {
|
|
38852
|
+
var a2 = r2.l, n2 = r2.c, u2 = r2.h, h2 = r2.a, o2 = void 0 === h2 ? 1 : h2;
|
|
38853
|
+
if (!t$1$1(a2) || !t$1$1(n2) || !t$1$1(u2)) return null;
|
|
38854
|
+
var e22 = d$2({ l: Number(a2), c: Number(n2), h: Number(u2), a: Number(o2) });
|
|
38855
|
+
return M$4(e22);
|
|
38856
|
+
}, y$2 = function(r2) {
|
|
38857
|
+
var t22 = (function(r3) {
|
|
38858
|
+
var t32 = l$3(r3), a2 = t32.x / o$1$1, n3 = t32.y / e$3, u3 = t32.z / c$2;
|
|
38859
|
+
return a2 = a2 > f$2 ? Math.cbrt(a2) : (b$3 * a2 + 16) / 116, { l: 116 * (n3 = n3 > f$2 ? Math.cbrt(n3) : (b$3 * n3 + 16) / 116) - 16, a: 500 * (a2 - n3), b: 200 * (n3 - (u3 = u3 > f$2 ? Math.cbrt(u3) : (b$3 * u3 + 16) / 116)), alpha: t32.a };
|
|
38860
|
+
})(r2), n2 = a$3(t22.a, 3), u2 = a$3(t22.b, 3), h2 = Math.atan2(u2, n2) / Math.PI * 180;
|
|
38861
|
+
return { l: t22.l, c: Math.sqrt(n2 * n2 + u2 * u2), h: h2 < 0 ? h2 + 360 : h2, a: t22.alpha };
|
|
38862
|
+
}, M$4 = function(r2) {
|
|
38863
|
+
return t22 = { l: r2.l, a: r2.c * Math.cos(r2.h * Math.PI / 180), b: r2.c * Math.sin(r2.h * Math.PI / 180), alpha: r2.a }, n2 = t22.a / 500 + (a2 = (t22.l + 16) / 116), u2 = a2 - t22.b / 200, i$3({ x: (Math.pow(n2, 3) > f$2 ? Math.pow(n2, 3) : (116 * n2 - 16) / b$3) * o$1$1, y: (t22.l > 8 ? Math.pow((t22.l + 16) / 116, 3) : t22.l / b$3) * e$3, z: (Math.pow(u2, 3) > f$2 ? Math.pow(u2, 3) : (116 * u2 - 16) / b$3) * c$2, a: t22.alpha });
|
|
38864
|
+
var t22, a2, n2, u2;
|
|
38865
|
+
}, x$2 = /^lch\(\s*([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)\s+([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, s$2 = function(t22) {
|
|
38866
|
+
var a2 = x$2.exec(t22);
|
|
38867
|
+
if (!a2) return null;
|
|
38868
|
+
var n2, u2, h2 = d$2({ l: Number(a2[1]), c: Number(a2[2]), h: (n2 = a2[3], u2 = a2[4], void 0 === u2 && (u2 = "deg"), Number(n2) * (r$3[u2] || 1)), a: void 0 === a2[5] ? 1 : Number(a2[5]) / (a2[6] ? 100 : 1) });
|
|
38869
|
+
return M$4(h2);
|
|
38870
|
+
};
|
|
38871
|
+
function lchPlugin(r2, t22) {
|
|
38872
|
+
r2.prototype.toLch = function() {
|
|
38873
|
+
return p$3(y$2(this.rgba));
|
|
38874
|
+
}, r2.prototype.toLchString = function() {
|
|
38875
|
+
return r3 = p$3(y$2(this.rgba)), t32 = r3.l, a2 = r3.c, n2 = r3.h, (u2 = r3.a) < 1 ? "lch(" + t32 + "% " + a2 + " " + n2 + " / " + u2 + ")" : "lch(" + t32 + "% " + a2 + " " + n2 + ")";
|
|
38876
|
+
var r3, t32, a2, n2, u2;
|
|
38877
|
+
}, t22.string.push([s$2, "lch"]), t22.object.push([v$2, "lch"]);
|
|
38878
|
+
}
|
|
38879
|
+
k$2([labPlugin, lchPlugin]);
|
|
38812
38880
|
const canonicalColorHexByKey = {
|
|
38813
38881
|
black: "#000000",
|
|
38814
38882
|
white: "#ffffff",
|
|
@@ -38839,6 +38907,8 @@ const extraAnchorDefinitions = {
|
|
|
38839
38907
|
redLight: { hex: "#f08080", canonical: "red" },
|
|
38840
38908
|
redCustom: { hex: "#D4042D", canonical: "red" },
|
|
38841
38909
|
redDark: { hex: "#8b0000", canonical: "red" },
|
|
38910
|
+
crimson: { hex: "#dc143c", canonical: "red" },
|
|
38911
|
+
wine: { hex: "#993355", canonical: "red" },
|
|
38842
38912
|
orangeLight: { hex: "#ffa07a", canonical: "orange" },
|
|
38843
38913
|
orangeCustom: { hex: "#F19143", canonical: "orange" },
|
|
38844
38914
|
orangePresetAccessible: { hex: "#a6510c", canonical: "orange" },
|
|
@@ -38854,14 +38924,18 @@ const extraAnchorDefinitions = {
|
|
|
38854
38924
|
teal: { hex: "#008080", canonical: "green" },
|
|
38855
38925
|
aqua: { hex: "#00ffff", canonical: "cyan" },
|
|
38856
38926
|
cyanLight: { hex: "#e0ffff", canonical: "cyan" },
|
|
38927
|
+
cyanMid: { hex: "#25b0c0", canonical: "cyan" },
|
|
38857
38928
|
cyanDark: { hex: "#008b8b", canonical: "cyan" },
|
|
38858
38929
|
navy: { hex: "#000080", canonical: "blue" },
|
|
38930
|
+
blueMid: { hex: "#4477aa", canonical: "blue" },
|
|
38931
|
+
blueSky: { hex: "#56b4e9", canonical: "blue" },
|
|
38859
38932
|
blueCustom: { hex: "#648FFF", canonical: "blue" },
|
|
38860
38933
|
bluePresetAccessible: { hex: "#1f5dff", canonical: "blue" },
|
|
38861
38934
|
blueLight: { hex: "#add8e6", canonical: "blue" },
|
|
38862
38935
|
blueDark: { hex: "#00008b", canonical: "blue" },
|
|
38863
38936
|
fuchsia: { hex: "#ff00ff", canonical: "purple" },
|
|
38864
38937
|
purpleCustom: { hex: "#644CD6", canonical: "purple" },
|
|
38938
|
+
purpleMuted: { hex: "#9c5686", canonical: "purple" },
|
|
38865
38939
|
purpleLight: { hex: "#dda0dd", canonical: "purple" },
|
|
38866
38940
|
purpleDark: { hex: "#8b008b", canonical: "purple" },
|
|
38867
38941
|
hotpink: { hex: "#ff69b4", canonical: "pink" },
|
|
@@ -38873,19 +38947,38 @@ const anchorDefinitions = {
|
|
|
38873
38947
|
...canonicalAnchorDefinitions,
|
|
38874
38948
|
...extraAnchorDefinitions
|
|
38875
38949
|
};
|
|
38876
|
-
const
|
|
38877
|
-
|
|
38878
|
-
|
|
38879
|
-
|
|
38880
|
-
|
|
38881
|
-
|
|
38882
|
-
const
|
|
38883
|
-
|
|
38884
|
-
|
|
38885
|
-
|
|
38886
|
-
|
|
38887
|
-
|
|
38888
|
-
|
|
38950
|
+
const anchorColordList = Object.values(anchorDefinitions).map((definition) => ({
|
|
38951
|
+
color: w$1$1(definition.hex),
|
|
38952
|
+
canonical: definition.canonical
|
|
38953
|
+
}));
|
|
38954
|
+
const NEUTRAL_CHROMA_THRESHOLD = 8;
|
|
38955
|
+
const NEUTRAL_BLACK_MAX_LIGHTNESS = 14;
|
|
38956
|
+
const NEUTRAL_WHITE_MIN_LIGHTNESS = 92;
|
|
38957
|
+
function classifyNeutral(color) {
|
|
38958
|
+
const { c: c2, l: l2 } = color.toLch();
|
|
38959
|
+
if (c2 >= NEUTRAL_CHROMA_THRESHOLD) {
|
|
38960
|
+
return void 0;
|
|
38961
|
+
}
|
|
38962
|
+
if (l2 <= NEUTRAL_BLACK_MAX_LIGHTNESS) {
|
|
38963
|
+
return "black";
|
|
38964
|
+
}
|
|
38965
|
+
if (l2 >= NEUTRAL_WHITE_MIN_LIGHTNESS) {
|
|
38966
|
+
return "white";
|
|
38967
|
+
}
|
|
38968
|
+
return "gray";
|
|
38969
|
+
}
|
|
38970
|
+
function nearestCanonicalFamily(color) {
|
|
38971
|
+
let bestCanonical;
|
|
38972
|
+
let bestDelta = Infinity;
|
|
38973
|
+
for (const anchor of anchorColordList) {
|
|
38974
|
+
const delta = color.delta(anchor.color);
|
|
38975
|
+
if (delta < bestDelta) {
|
|
38976
|
+
bestDelta = delta;
|
|
38977
|
+
bestCanonical = anchor.canonical;
|
|
38978
|
+
}
|
|
38979
|
+
}
|
|
38980
|
+
return bestCanonical;
|
|
38981
|
+
}
|
|
38889
38982
|
const cssNamedColorSet = /* @__PURE__ */ new Set([
|
|
38890
38983
|
...Object.keys(colorName),
|
|
38891
38984
|
"transparent",
|
|
@@ -38918,8 +39011,11 @@ function resolveColorWord(colorValue, options = {}) {
|
|
|
38918
39011
|
};
|
|
38919
39012
|
}
|
|
38920
39013
|
try {
|
|
38921
|
-
const
|
|
38922
|
-
|
|
39014
|
+
const parsedColor = w$1$1(trimmedColorValue);
|
|
39015
|
+
if (!parsedColor.isValid()) {
|
|
39016
|
+
throw Error("Unparseable color value");
|
|
39017
|
+
}
|
|
39018
|
+
const canonicalName = classifyNeutral(parsedColor) ?? nearestCanonicalFamily(parsedColor);
|
|
38923
39019
|
if (!canonicalName) {
|
|
38924
39020
|
throw Error("No nearest canonical color resolved");
|
|
38925
39021
|
}
|
|
@@ -39197,7 +39293,7 @@ const defaultPalette = {
|
|
|
39197
39293
|
}
|
|
39198
39294
|
};
|
|
39199
39295
|
const okabeItoPalette = {
|
|
39200
|
-
name: "
|
|
39296
|
+
name: "okabeIto",
|
|
39201
39297
|
description: "Colorblind-friendly blues, oranges, greens, and purples adapted from the Okabe-Ito palette, with varied marker shapes and line styles.",
|
|
39202
39298
|
styles: {
|
|
39203
39299
|
1: {
|
|
@@ -39206,17 +39302,9 @@ const okabeItoPalette = {
|
|
|
39206
39302
|
markerColor: "#0072b2",
|
|
39207
39303
|
fillColor: "#0072b2",
|
|
39208
39304
|
highContrastColor: "#0072b2",
|
|
39209
|
-
lineColorWord: "blue",
|
|
39210
|
-
markerColorWord: "blue",
|
|
39211
|
-
fillColorWord: "blue",
|
|
39212
|
-
highContrastColorWord: "blue",
|
|
39213
39305
|
lineColorDarkMode: "#0072b2",
|
|
39214
39306
|
markerColorDarkMode: "#0072b2",
|
|
39215
39307
|
fillColorDarkMode: "#0072b2",
|
|
39216
|
-
lineColorWordDarkMode: "blue",
|
|
39217
|
-
markerColorWordDarkMode: "blue",
|
|
39218
|
-
fillColorWordDarkMode: "blue",
|
|
39219
|
-
highContrastColorWordDarkMode: "blue",
|
|
39220
39308
|
lineWidth: 4,
|
|
39221
39309
|
markerStyle: "circle"
|
|
39222
39310
|
},
|
|
@@ -39241,20 +39329,10 @@ const okabeItoPalette = {
|
|
|
39241
39329
|
fillColor: "#009e73",
|
|
39242
39330
|
textColor: "#008561",
|
|
39243
39331
|
highContrastColor: "#008561",
|
|
39244
|
-
lineColorWord: "green",
|
|
39245
|
-
markerColorWord: "green",
|
|
39246
|
-
fillColorWord: "green",
|
|
39247
|
-
textColorWord: "green",
|
|
39248
|
-
highContrastColorWord: "green",
|
|
39249
39332
|
lineColorDarkMode: "#009e73",
|
|
39250
39333
|
markerColorDarkMode: "#009e73",
|
|
39251
39334
|
fillColorDarkMode: "#009e73",
|
|
39252
39335
|
textColorDarkMode: "#009e73",
|
|
39253
|
-
lineColorWordDarkMode: "green",
|
|
39254
|
-
markerColorWordDarkMode: "green",
|
|
39255
|
-
fillColorWordDarkMode: "green",
|
|
39256
|
-
textColorWordDarkMode: "green",
|
|
39257
|
-
highContrastColorWordDarkMode: "green",
|
|
39258
39336
|
lineWidth: 3,
|
|
39259
39337
|
markerStyle: "triangle"
|
|
39260
39338
|
},
|
|
@@ -39268,8 +39346,6 @@ const okabeItoPalette = {
|
|
|
39268
39346
|
lineColorWord: "purple",
|
|
39269
39347
|
markerColorWord: "purple",
|
|
39270
39348
|
fillColorWord: "purple",
|
|
39271
|
-
textColorWord: "purple",
|
|
39272
|
-
highContrastColorWord: "purple",
|
|
39273
39349
|
lineColorDarkMode: "#cc79a7",
|
|
39274
39350
|
markerColorDarkMode: "#cc79a7",
|
|
39275
39351
|
fillColorDarkMode: "#cc79a7",
|
|
@@ -39368,7 +39444,7 @@ const okabeItoPalette = {
|
|
|
39368
39444
|
}
|
|
39369
39445
|
};
|
|
39370
39446
|
const tolBrightPalette = {
|
|
39371
|
-
name: "
|
|
39447
|
+
name: "tolBright",
|
|
39372
39448
|
description: "Colorblind-friendly bright blues, reds, greens, and purples from Paul Tol's bright palette, with varied marker shapes and line styles.",
|
|
39373
39449
|
styles: {
|
|
39374
39450
|
1: {
|
|
@@ -39376,17 +39452,9 @@ const tolBrightPalette = {
|
|
|
39376
39452
|
markerColor: "#4477aa",
|
|
39377
39453
|
fillColor: "#4477aa",
|
|
39378
39454
|
highContrastColor: "#4477aa",
|
|
39379
|
-
lineColorWord: "blue",
|
|
39380
|
-
markerColorWord: "blue",
|
|
39381
|
-
fillColorWord: "blue",
|
|
39382
|
-
highContrastColorWord: "blue",
|
|
39383
39455
|
lineColorDarkMode: "#4477aa",
|
|
39384
39456
|
markerColorDarkMode: "#4477aa",
|
|
39385
39457
|
fillColorDarkMode: "#4477aa",
|
|
39386
|
-
lineColorWordDarkMode: "blue",
|
|
39387
|
-
markerColorWordDarkMode: "blue",
|
|
39388
|
-
fillColorWordDarkMode: "blue",
|
|
39389
|
-
highContrastColorWordDarkMode: "blue",
|
|
39390
39458
|
lineWidth: 4,
|
|
39391
39459
|
markerStyle: "circle"
|
|
39392
39460
|
},
|
|
@@ -39396,20 +39464,10 @@ const tolBrightPalette = {
|
|
|
39396
39464
|
fillColor: "#ee6677",
|
|
39397
39465
|
textColor: "#bf515e",
|
|
39398
39466
|
highContrastColor: "#bf515e",
|
|
39399
|
-
lineColorWord: "red",
|
|
39400
|
-
markerColorWord: "red",
|
|
39401
|
-
fillColorWord: "red",
|
|
39402
|
-
textColorWord: "red",
|
|
39403
|
-
highContrastColorWord: "red",
|
|
39404
39467
|
lineColorDarkMode: "#ee6677",
|
|
39405
39468
|
markerColorDarkMode: "#ee6677",
|
|
39406
39469
|
fillColorDarkMode: "#ee6677",
|
|
39407
39470
|
textColorDarkMode: "#ee6677",
|
|
39408
|
-
lineColorWordDarkMode: "red",
|
|
39409
|
-
markerColorWordDarkMode: "red",
|
|
39410
|
-
fillColorWordDarkMode: "red",
|
|
39411
|
-
textColorWordDarkMode: "red",
|
|
39412
|
-
highContrastColorWordDarkMode: "red",
|
|
39413
39471
|
lineWidth: 2,
|
|
39414
39472
|
markerStyle: "square"
|
|
39415
39473
|
},
|
|
@@ -39450,9 +39508,6 @@ const tolBrightPalette = {
|
|
|
39450
39508
|
fillColor: "#4d9db8",
|
|
39451
39509
|
textColor: "#3c7d94",
|
|
39452
39510
|
highContrastColor: "#3c7d94",
|
|
39453
|
-
lineColorWord: "cyan",
|
|
39454
|
-
markerColorWord: "cyan",
|
|
39455
|
-
fillColorWord: "cyan",
|
|
39456
39511
|
textColorWord: "cyan",
|
|
39457
39512
|
highContrastColorWord: "cyan",
|
|
39458
39513
|
lineColorDarkMode: "#66ccee",
|
|
@@ -39477,11 +39532,6 @@ const tolBrightPalette = {
|
|
|
39477
39532
|
markerColorDarkMode: "#aa3377",
|
|
39478
39533
|
fillColorDarkMode: "#aa3377",
|
|
39479
39534
|
textColorDarkMode: "#b5648c",
|
|
39480
|
-
lineColorWordDarkMode: "purple",
|
|
39481
|
-
markerColorWordDarkMode: "purple",
|
|
39482
|
-
fillColorWordDarkMode: "purple",
|
|
39483
|
-
textColorWordDarkMode: "purple",
|
|
39484
|
-
highContrastColorWordDarkMode: "purple",
|
|
39485
39535
|
lineWidth: 2,
|
|
39486
39536
|
markerStyle: "triangleLeft"
|
|
39487
39537
|
},
|
|
@@ -39502,7 +39552,7 @@ const tolBrightPalette = {
|
|
|
39502
39552
|
}
|
|
39503
39553
|
};
|
|
39504
39554
|
const tolMutedPalette = {
|
|
39505
|
-
name: "
|
|
39555
|
+
name: "tolMuted",
|
|
39506
39556
|
description: "Nine colorblind-friendly muted styles from Paul Tol's muted palette, with varied marker shapes and line styles.",
|
|
39507
39557
|
styles: {
|
|
39508
39558
|
1: {
|
|
@@ -39530,20 +39580,10 @@ const tolMutedPalette = {
|
|
|
39530
39580
|
fillColor: "#669ab5",
|
|
39531
39581
|
textColor: "#507a90",
|
|
39532
39582
|
highContrastColor: "#507a90",
|
|
39533
|
-
lineColorWord: "blue",
|
|
39534
|
-
markerColorWord: "blue",
|
|
39535
|
-
fillColorWord: "blue",
|
|
39536
|
-
textColorWord: "blue",
|
|
39537
|
-
highContrastColorWord: "blue",
|
|
39538
39583
|
lineColorDarkMode: "#88ccee",
|
|
39539
39584
|
markerColorDarkMode: "#88ccee",
|
|
39540
39585
|
fillColorDarkMode: "#88ccee",
|
|
39541
39586
|
textColorDarkMode: "#88ccee",
|
|
39542
|
-
lineColorWordDarkMode: "blue",
|
|
39543
|
-
markerColorWordDarkMode: "blue",
|
|
39544
|
-
fillColorWordDarkMode: "blue",
|
|
39545
|
-
textColorWordDarkMode: "blue",
|
|
39546
|
-
highContrastColorWordDarkMode: "blue",
|
|
39547
39587
|
lineWidth: 2,
|
|
39548
39588
|
markerStyle: "square"
|
|
39549
39589
|
},
|
|
@@ -39580,8 +39620,6 @@ const tolMutedPalette = {
|
|
|
39580
39620
|
markerColorDarkMode: "#117733",
|
|
39581
39621
|
fillColorDarkMode: "#117733",
|
|
39582
39622
|
textColorDarkMode: "#548a5f",
|
|
39583
|
-
textColorWordDarkMode: "green",
|
|
39584
|
-
highContrastColorWordDarkMode: "green",
|
|
39585
39623
|
lineWidth: 2,
|
|
39586
39624
|
markerStyle: "diamond"
|
|
39587
39625
|
},
|
|
@@ -39689,11 +39727,6 @@ const tolMutedPalette = {
|
|
|
39689
39727
|
markerColorDarkMode: "#aa4499",
|
|
39690
39728
|
fillColorDarkMode: "#aa4499",
|
|
39691
39729
|
textColorDarkMode: "#b262a3",
|
|
39692
|
-
lineColorWordDarkMode: "purple",
|
|
39693
|
-
markerColorWordDarkMode: "purple",
|
|
39694
|
-
fillColorWordDarkMode: "purple",
|
|
39695
|
-
textColorWordDarkMode: "purple",
|
|
39696
|
-
highContrastColorWordDarkMode: "purple",
|
|
39697
39730
|
lineWidth: 2,
|
|
39698
39731
|
lineStyle: "dashed",
|
|
39699
39732
|
markerStyle: "square"
|
|
@@ -39701,7 +39734,7 @@ const tolMutedPalette = {
|
|
|
39701
39734
|
}
|
|
39702
39735
|
};
|
|
39703
39736
|
const tolHighContrastPalette = {
|
|
39704
|
-
name: "
|
|
39737
|
+
name: "tolHighContrast",
|
|
39705
39738
|
description: "Four maximum-distinction styles from Paul Tol's high-contrast palette, distinguishable even in grayscale.",
|
|
39706
39739
|
styles: {
|
|
39707
39740
|
1: {
|
|
@@ -39709,17 +39742,9 @@ const tolHighContrastPalette = {
|
|
|
39709
39742
|
markerColor: "#004488",
|
|
39710
39743
|
fillColor: "#004488",
|
|
39711
39744
|
highContrastColor: "#004488",
|
|
39712
|
-
lineColorWord: "blue",
|
|
39713
|
-
markerColorWord: "blue",
|
|
39714
|
-
fillColorWord: "blue",
|
|
39715
|
-
highContrastColorWord: "blue",
|
|
39716
39745
|
lineColorDarkMode: "#496194",
|
|
39717
39746
|
markerColorDarkMode: "#496194",
|
|
39718
39747
|
fillColorDarkMode: "#496194",
|
|
39719
|
-
lineColorWordDarkMode: "blue",
|
|
39720
|
-
markerColorWordDarkMode: "blue",
|
|
39721
|
-
fillColorWordDarkMode: "blue",
|
|
39722
|
-
highContrastColorWordDarkMode: "blue",
|
|
39723
39748
|
lineWidth: 4,
|
|
39724
39749
|
markerStyle: "circle"
|
|
39725
39750
|
},
|
|
@@ -39756,11 +39781,6 @@ const tolHighContrastPalette = {
|
|
|
39756
39781
|
markerColorDarkMode: "#c06976",
|
|
39757
39782
|
fillColorDarkMode: "#c06976",
|
|
39758
39783
|
textColorDarkMode: "#c06976",
|
|
39759
|
-
lineColorWordDarkMode: "red",
|
|
39760
|
-
markerColorWordDarkMode: "red",
|
|
39761
|
-
fillColorWordDarkMode: "red",
|
|
39762
|
-
textColorWordDarkMode: "red",
|
|
39763
|
-
highContrastColorWordDarkMode: "red",
|
|
39764
39784
|
lineWidth: 3,
|
|
39765
39785
|
markerStyle: "triangle"
|
|
39766
39786
|
},
|
|
@@ -39788,17 +39808,9 @@ const ibmPalette = {
|
|
|
39788
39808
|
markerColor: "#648fff",
|
|
39789
39809
|
fillColor: "#648fff",
|
|
39790
39810
|
highContrastColor: "#4f71cb",
|
|
39791
|
-
lineColorWord: "blue",
|
|
39792
|
-
markerColorWord: "blue",
|
|
39793
|
-
fillColorWord: "blue",
|
|
39794
|
-
highContrastColorWord: "blue",
|
|
39795
39811
|
lineColorDarkMode: "#648fff",
|
|
39796
39812
|
markerColorDarkMode: "#648fff",
|
|
39797
39813
|
fillColorDarkMode: "#648fff",
|
|
39798
|
-
lineColorWordDarkMode: "blue",
|
|
39799
|
-
markerColorWordDarkMode: "blue",
|
|
39800
|
-
fillColorWordDarkMode: "blue",
|
|
39801
|
-
highContrastColorWordDarkMode: "blue",
|
|
39802
39814
|
lineWidth: 4,
|
|
39803
39815
|
markerStyle: "circle"
|
|
39804
39816
|
},
|
|
@@ -39885,18 +39897,10 @@ const grayscalePalette = {
|
|
|
39885
39897
|
markerColor: "#000000",
|
|
39886
39898
|
fillColor: "#000000",
|
|
39887
39899
|
highContrastColor: "#000000",
|
|
39888
|
-
lineColorWord: "black",
|
|
39889
|
-
markerColorWord: "black",
|
|
39890
|
-
fillColorWord: "black",
|
|
39891
|
-
highContrastColorWord: "black",
|
|
39892
39900
|
lineColorDarkMode: "#ffffff",
|
|
39893
39901
|
markerColorDarkMode: "#ffffff",
|
|
39894
39902
|
fillColorDarkMode: "#ffffff",
|
|
39895
39903
|
highContrastColorDarkMode: "#ffffff",
|
|
39896
|
-
lineColorWordDarkMode: "white",
|
|
39897
|
-
markerColorWordDarkMode: "white",
|
|
39898
|
-
fillColorWordDarkMode: "white",
|
|
39899
|
-
highContrastColorWordDarkMode: "white",
|
|
39900
39904
|
lineWidth: 4,
|
|
39901
39905
|
markerStyle: "circle"
|
|
39902
39906
|
},
|
|
@@ -39930,21 +39934,11 @@ const grayscalePalette = {
|
|
|
39930
39934
|
fillColor: "#616161",
|
|
39931
39935
|
textColor: "#616161",
|
|
39932
39936
|
highContrastColor: "#616161",
|
|
39933
|
-
lineColorWord: "gray",
|
|
39934
|
-
markerColorWord: "gray",
|
|
39935
|
-
fillColorWord: "gray",
|
|
39936
|
-
textColorWord: "gray",
|
|
39937
|
-
highContrastColorWord: "gray",
|
|
39938
39937
|
lineColorDarkMode: "#929292",
|
|
39939
39938
|
markerColorDarkMode: "#929292",
|
|
39940
39939
|
fillColorDarkMode: "#929292",
|
|
39941
39940
|
textColorDarkMode: "#929292",
|
|
39942
39941
|
highContrastColorDarkMode: "#929292",
|
|
39943
|
-
lineColorWordDarkMode: "gray",
|
|
39944
|
-
markerColorWordDarkMode: "gray",
|
|
39945
|
-
fillColorWordDarkMode: "gray",
|
|
39946
|
-
textColorWordDarkMode: "gray",
|
|
39947
|
-
highContrastColorWordDarkMode: "gray",
|
|
39948
39942
|
lineWidth: 3,
|
|
39949
39943
|
markerStyle: "triangle"
|
|
39950
39944
|
},
|
|
@@ -39983,17 +39977,9 @@ const categoricalPalette = {
|
|
|
39983
39977
|
markerColor: "#1f77b4",
|
|
39984
39978
|
fillColor: "#1f77b4",
|
|
39985
39979
|
highContrastColor: "#1f77b4",
|
|
39986
|
-
lineColorWord: "blue",
|
|
39987
|
-
markerColorWord: "blue",
|
|
39988
|
-
fillColorWord: "blue",
|
|
39989
|
-
highContrastColorWord: "blue",
|
|
39990
39980
|
lineColorDarkMode: "#5ba3dd",
|
|
39991
39981
|
markerColorDarkMode: "#5ba3dd",
|
|
39992
39982
|
fillColorDarkMode: "#5ba3dd",
|
|
39993
|
-
lineColorWordDarkMode: "blue",
|
|
39994
|
-
markerColorWordDarkMode: "blue",
|
|
39995
|
-
fillColorWordDarkMode: "blue",
|
|
39996
|
-
highContrastColorWordDarkMode: "blue",
|
|
39997
39983
|
lineWidth: 4,
|
|
39998
39984
|
markerStyle: "circle"
|
|
39999
39985
|
},
|
|
@@ -40003,20 +39989,10 @@ const categoricalPalette = {
|
|
|
40003
39989
|
fillColor: "#e7730c",
|
|
40004
39990
|
textColor: "#b95b07",
|
|
40005
39991
|
highContrastColor: "#b95b07",
|
|
40006
|
-
lineColorWord: "orange",
|
|
40007
|
-
markerColorWord: "orange",
|
|
40008
|
-
fillColorWord: "orange",
|
|
40009
|
-
textColorWord: "orange",
|
|
40010
|
-
highContrastColorWord: "orange",
|
|
40011
39992
|
lineColorDarkMode: "#ff9d3c",
|
|
40012
39993
|
markerColorDarkMode: "#ff9d3c",
|
|
40013
39994
|
fillColorDarkMode: "#ff9d3c",
|
|
40014
39995
|
textColorDarkMode: "#ff9d3c",
|
|
40015
|
-
lineColorWordDarkMode: "orange",
|
|
40016
|
-
markerColorWordDarkMode: "orange",
|
|
40017
|
-
fillColorWordDarkMode: "orange",
|
|
40018
|
-
textColorWordDarkMode: "orange",
|
|
40019
|
-
highContrastColorWordDarkMode: "orange",
|
|
40020
39996
|
lineWidth: 2,
|
|
40021
39997
|
markerStyle: "square"
|
|
40022
39998
|
},
|
|
@@ -40026,20 +40002,10 @@ const categoricalPalette = {
|
|
|
40026
40002
|
fillColor: "#217a21",
|
|
40027
40003
|
textColor: "#217a21",
|
|
40028
40004
|
highContrastColor: "#217a21",
|
|
40029
|
-
lineColorWord: "green",
|
|
40030
|
-
markerColorWord: "green",
|
|
40031
|
-
fillColorWord: "green",
|
|
40032
|
-
textColorWord: "green",
|
|
40033
|
-
highContrastColorWord: "green",
|
|
40034
40005
|
lineColorDarkMode: "#2ca02c",
|
|
40035
40006
|
markerColorDarkMode: "#2ca02c",
|
|
40036
40007
|
fillColorDarkMode: "#2ca02c",
|
|
40037
40008
|
textColorDarkMode: "#2ca02c",
|
|
40038
|
-
lineColorWordDarkMode: "green",
|
|
40039
|
-
markerColorWordDarkMode: "green",
|
|
40040
|
-
fillColorWordDarkMode: "green",
|
|
40041
|
-
textColorWordDarkMode: "green",
|
|
40042
|
-
highContrastColorWordDarkMode: "green",
|
|
40043
40009
|
lineWidth: 3,
|
|
40044
40010
|
markerStyle: "triangle"
|
|
40045
40011
|
},
|
|
@@ -40049,20 +40015,10 @@ const categoricalPalette = {
|
|
|
40049
40015
|
fillColor: "#d62728",
|
|
40050
40016
|
textColor: "#d62728",
|
|
40051
40017
|
highContrastColor: "#d62728",
|
|
40052
|
-
lineColorWord: "red",
|
|
40053
|
-
markerColorWord: "red",
|
|
40054
|
-
fillColorWord: "red",
|
|
40055
|
-
textColorWord: "red",
|
|
40056
|
-
highContrastColorWord: "red",
|
|
40057
40018
|
lineColorDarkMode: "#e2494a",
|
|
40058
40019
|
markerColorDarkMode: "#e2494a",
|
|
40059
40020
|
fillColorDarkMode: "#e2494a",
|
|
40060
40021
|
textColorDarkMode: "#e2494a",
|
|
40061
|
-
lineColorWordDarkMode: "red",
|
|
40062
|
-
markerColorWordDarkMode: "red",
|
|
40063
|
-
fillColorWordDarkMode: "red",
|
|
40064
|
-
textColorWordDarkMode: "red",
|
|
40065
|
-
highContrastColorWordDarkMode: "red",
|
|
40066
40022
|
lineWidth: 2,
|
|
40067
40023
|
markerStyle: "diamond"
|
|
40068
40024
|
},
|
|
@@ -40072,20 +40028,10 @@ const categoricalPalette = {
|
|
|
40072
40028
|
fillColor: "#9467bd",
|
|
40073
40029
|
textColor: "#8e62b5",
|
|
40074
40030
|
highContrastColor: "#8e62b5",
|
|
40075
|
-
lineColorWord: "purple",
|
|
40076
|
-
markerColorWord: "purple",
|
|
40077
|
-
fillColorWord: "purple",
|
|
40078
|
-
textColorWord: "purple",
|
|
40079
|
-
highContrastColorWord: "purple",
|
|
40080
40031
|
lineColorDarkMode: "#b48fd6",
|
|
40081
40032
|
markerColorDarkMode: "#b48fd6",
|
|
40082
40033
|
fillColorDarkMode: "#b48fd6",
|
|
40083
40034
|
textColorDarkMode: "#b48fd6",
|
|
40084
|
-
lineColorWordDarkMode: "purple",
|
|
40085
|
-
markerColorWordDarkMode: "purple",
|
|
40086
|
-
fillColorWordDarkMode: "purple",
|
|
40087
|
-
textColorWordDarkMode: "purple",
|
|
40088
|
-
highContrastColorWordDarkMode: "purple",
|
|
40089
40035
|
lineWidth: 2,
|
|
40090
40036
|
markerStyle: "triangleDown"
|
|
40091
40037
|
},
|
|
@@ -40095,11 +40041,6 @@ const categoricalPalette = {
|
|
|
40095
40041
|
fillColor: "#7a4a41",
|
|
40096
40042
|
textColor: "#7a4a41",
|
|
40097
40043
|
highContrastColor: "#7a4a41",
|
|
40098
|
-
lineColorWord: "brown",
|
|
40099
|
-
markerColorWord: "brown",
|
|
40100
|
-
fillColorWord: "brown",
|
|
40101
|
-
textColorWord: "brown",
|
|
40102
|
-
highContrastColorWord: "brown",
|
|
40103
40044
|
lineColorDarkMode: "#a9705f",
|
|
40104
40045
|
markerColorDarkMode: "#a9705f",
|
|
40105
40046
|
fillColorDarkMode: "#a9705f",
|
|
@@ -40118,20 +40059,12 @@ const categoricalPalette = {
|
|
|
40118
40059
|
fillColor: "#d670b7",
|
|
40119
40060
|
textColor: "#ab5892",
|
|
40120
40061
|
highContrastColor: "#ab5892",
|
|
40121
|
-
lineColorWord: "pink",
|
|
40122
|
-
markerColorWord: "pink",
|
|
40123
|
-
fillColorWord: "pink",
|
|
40124
40062
|
textColorWord: "pink",
|
|
40125
40063
|
highContrastColorWord: "pink",
|
|
40126
40064
|
lineColorDarkMode: "#e377c2",
|
|
40127
40065
|
markerColorDarkMode: "#e377c2",
|
|
40128
40066
|
fillColorDarkMode: "#e377c2",
|
|
40129
40067
|
textColorDarkMode: "#e377c2",
|
|
40130
|
-
lineColorWordDarkMode: "pink",
|
|
40131
|
-
markerColorWordDarkMode: "pink",
|
|
40132
|
-
fillColorWordDarkMode: "pink",
|
|
40133
|
-
textColorWordDarkMode: "pink",
|
|
40134
|
-
highContrastColorWordDarkMode: "pink",
|
|
40135
40068
|
lineWidth: 3,
|
|
40136
40069
|
lineStyle: "dashed",
|
|
40137
40070
|
markerStyle: "triangleRight"
|
|
@@ -40142,20 +40075,10 @@ const categoricalPalette = {
|
|
|
40142
40075
|
fillColor: "#7f7f7f",
|
|
40143
40076
|
textColor: "#757575",
|
|
40144
40077
|
highContrastColor: "#757575",
|
|
40145
|
-
lineColorWord: "gray",
|
|
40146
|
-
markerColorWord: "gray",
|
|
40147
|
-
fillColorWord: "gray",
|
|
40148
|
-
textColorWord: "gray",
|
|
40149
|
-
highContrastColorWord: "gray",
|
|
40150
40078
|
lineColorDarkMode: "#a8a8a8",
|
|
40151
40079
|
markerColorDarkMode: "#a8a8a8",
|
|
40152
40080
|
fillColorDarkMode: "#a8a8a8",
|
|
40153
40081
|
textColorDarkMode: "#a8a8a8",
|
|
40154
|
-
lineColorWordDarkMode: "gray",
|
|
40155
|
-
markerColorWordDarkMode: "gray",
|
|
40156
|
-
fillColorWordDarkMode: "gray",
|
|
40157
|
-
textColorWordDarkMode: "gray",
|
|
40158
|
-
highContrastColorWordDarkMode: "gray",
|
|
40159
40082
|
lineWidth: 1,
|
|
40160
40083
|
lineStyle: "dotted",
|
|
40161
40084
|
markerStyle: "circle"
|
|
@@ -40190,20 +40113,12 @@ const categoricalPalette = {
|
|
|
40190
40113
|
fillColor: "#12a2b1",
|
|
40191
40114
|
textColor: "#0c818e",
|
|
40192
40115
|
highContrastColor: "#0c818e",
|
|
40193
|
-
lineColorWord: "cyan",
|
|
40194
|
-
markerColorWord: "cyan",
|
|
40195
|
-
fillColorWord: "cyan",
|
|
40196
40116
|
textColorWord: "cyan",
|
|
40197
40117
|
highContrastColorWord: "cyan",
|
|
40198
40118
|
lineColorDarkMode: "#17becf",
|
|
40199
40119
|
markerColorDarkMode: "#17becf",
|
|
40200
40120
|
fillColorDarkMode: "#17becf",
|
|
40201
40121
|
textColorDarkMode: "#17becf",
|
|
40202
|
-
lineColorWordDarkMode: "cyan",
|
|
40203
|
-
markerColorWordDarkMode: "cyan",
|
|
40204
|
-
fillColorWordDarkMode: "cyan",
|
|
40205
|
-
textColorWordDarkMode: "cyan",
|
|
40206
|
-
highContrastColorWordDarkMode: "cyan",
|
|
40207
40122
|
lineWidth: 2,
|
|
40208
40123
|
lineStyle: "dotted",
|
|
40209
40124
|
markerStyle: "diamond"
|
|
@@ -40211,7 +40126,7 @@ const categoricalPalette = {
|
|
|
40211
40126
|
}
|
|
40212
40127
|
};
|
|
40213
40128
|
const grumpyNarwhalPalette = {
|
|
40214
|
-
name: "
|
|
40129
|
+
name: "grumpyNarwhal",
|
|
40215
40130
|
description: "Six saturated hues — burnt orange, forest green, deep pink, arctic teal, gold, and purple — going neon in dark mode.",
|
|
40216
40131
|
styles: {
|
|
40217
40132
|
1: {
|
|
@@ -40219,17 +40134,12 @@ const grumpyNarwhalPalette = {
|
|
|
40219
40134
|
markerColor: "#b34700",
|
|
40220
40135
|
fillColor: "#b34700",
|
|
40221
40136
|
highContrastColor: "#b34700",
|
|
40222
|
-
lineColorWord: "orange",
|
|
40223
|
-
markerColorWord: "orange",
|
|
40224
|
-
fillColorWord: "orange",
|
|
40225
|
-
highContrastColorWord: "orange",
|
|
40226
40137
|
lineColorDarkMode: "#ff5f00",
|
|
40227
40138
|
markerColorDarkMode: "#ff5f00",
|
|
40228
40139
|
fillColorDarkMode: "#ff5f00",
|
|
40229
40140
|
lineColorWordDarkMode: "orange",
|
|
40230
40141
|
markerColorWordDarkMode: "orange",
|
|
40231
40142
|
fillColorWordDarkMode: "orange",
|
|
40232
|
-
highContrastColorWordDarkMode: "orange",
|
|
40233
40143
|
lineWidth: 4,
|
|
40234
40144
|
markerStyle: "circle"
|
|
40235
40145
|
},
|
|
@@ -40239,20 +40149,10 @@ const grumpyNarwhalPalette = {
|
|
|
40239
40149
|
fillColor: "#1b7a1b",
|
|
40240
40150
|
textColor: "#1b7a1b",
|
|
40241
40151
|
highContrastColor: "#1b7a1b",
|
|
40242
|
-
lineColorWord: "green",
|
|
40243
|
-
markerColorWord: "green",
|
|
40244
|
-
fillColorWord: "green",
|
|
40245
|
-
textColorWord: "green",
|
|
40246
|
-
highContrastColorWord: "green",
|
|
40247
40152
|
lineColorDarkMode: "#39ff14",
|
|
40248
40153
|
markerColorDarkMode: "#39ff14",
|
|
40249
40154
|
fillColorDarkMode: "#39ff14",
|
|
40250
40155
|
textColorDarkMode: "#39ff14",
|
|
40251
|
-
lineColorWordDarkMode: "green",
|
|
40252
|
-
markerColorWordDarkMode: "green",
|
|
40253
|
-
fillColorWordDarkMode: "green",
|
|
40254
|
-
textColorWordDarkMode: "green",
|
|
40255
|
-
highContrastColorWordDarkMode: "green",
|
|
40256
40156
|
lineWidth: 2,
|
|
40257
40157
|
markerStyle: "square"
|
|
40258
40158
|
},
|
|
@@ -40271,11 +40171,6 @@ const grumpyNarwhalPalette = {
|
|
|
40271
40171
|
markerColorDarkMode: "#ff1493",
|
|
40272
40172
|
fillColorDarkMode: "#ff1493",
|
|
40273
40173
|
textColorDarkMode: "#ff1493",
|
|
40274
|
-
lineColorWordDarkMode: "pink",
|
|
40275
|
-
markerColorWordDarkMode: "pink",
|
|
40276
|
-
fillColorWordDarkMode: "pink",
|
|
40277
|
-
textColorWordDarkMode: "pink",
|
|
40278
|
-
highContrastColorWordDarkMode: "pink",
|
|
40279
40174
|
lineWidth: 3,
|
|
40280
40175
|
markerStyle: "triangle"
|
|
40281
40176
|
},
|
|
@@ -40294,11 +40189,6 @@ const grumpyNarwhalPalette = {
|
|
|
40294
40189
|
markerColorDarkMode: "#00e5ff",
|
|
40295
40190
|
fillColorDarkMode: "#00e5ff",
|
|
40296
40191
|
textColorDarkMode: "#00e5ff",
|
|
40297
|
-
lineColorWordDarkMode: "cyan",
|
|
40298
|
-
markerColorWordDarkMode: "cyan",
|
|
40299
|
-
fillColorWordDarkMode: "cyan",
|
|
40300
|
-
textColorWordDarkMode: "cyan",
|
|
40301
|
-
highContrastColorWordDarkMode: "cyan",
|
|
40302
40192
|
lineWidth: 2,
|
|
40303
40193
|
markerStyle: "diamond"
|
|
40304
40194
|
},
|
|
@@ -40317,11 +40207,6 @@ const grumpyNarwhalPalette = {
|
|
|
40317
40207
|
markerColorDarkMode: "#ffea00",
|
|
40318
40208
|
fillColorDarkMode: "#ffea00",
|
|
40319
40209
|
textColorDarkMode: "#ffea00",
|
|
40320
|
-
lineColorWordDarkMode: "yellow",
|
|
40321
|
-
markerColorWordDarkMode: "yellow",
|
|
40322
|
-
fillColorWordDarkMode: "yellow",
|
|
40323
|
-
textColorWordDarkMode: "yellow",
|
|
40324
|
-
highContrastColorWordDarkMode: "yellow",
|
|
40325
40210
|
lineWidth: 2,
|
|
40326
40211
|
markerStyle: "triangleDown"
|
|
40327
40212
|
},
|
|
@@ -40335,21 +40220,11 @@ const grumpyNarwhalPalette = {
|
|
|
40335
40220
|
fillColor: "#b026ff",
|
|
40336
40221
|
textColor: "#b026ff",
|
|
40337
40222
|
highContrastColor: "#b026ff",
|
|
40338
|
-
lineColorWord: "purple",
|
|
40339
|
-
markerColorWord: "purple",
|
|
40340
|
-
fillColorWord: "purple",
|
|
40341
|
-
textColorWord: "purple",
|
|
40342
|
-
highContrastColorWord: "purple",
|
|
40343
40223
|
lineColorDarkMode: "#b026ff",
|
|
40344
40224
|
markerColorDarkMode: "#b026ff",
|
|
40345
40225
|
fillColorDarkMode: "#b026ff",
|
|
40346
40226
|
textColorDarkMode: "#b445ff",
|
|
40347
40227
|
highContrastColorDarkMode: "#b445ff",
|
|
40348
|
-
lineColorWordDarkMode: "purple",
|
|
40349
|
-
markerColorWordDarkMode: "purple",
|
|
40350
|
-
fillColorWordDarkMode: "purple",
|
|
40351
|
-
textColorWordDarkMode: "purple",
|
|
40352
|
-
highContrastColorWordDarkMode: "purple",
|
|
40353
40228
|
lineWidth: 2,
|
|
40354
40229
|
markerStyle: "triangleLeft"
|
|
40355
40230
|
}
|
|
@@ -40367,24 +40242,27 @@ function deepFreezePalette(palette) {
|
|
|
40367
40242
|
Object.freeze(palette.styles);
|
|
40368
40243
|
return Object.freeze(palette);
|
|
40369
40244
|
}
|
|
40245
|
+
function registerByKey(palette) {
|
|
40246
|
+
return [palette.name.toLowerCase(), deepFreezePalette(palette)];
|
|
40247
|
+
}
|
|
40370
40248
|
const STYLE_PALETTES = Object.assign(
|
|
40371
40249
|
/* @__PURE__ */ Object.create(null),
|
|
40372
|
-
|
|
40373
|
-
[
|
|
40374
|
-
|
|
40375
|
-
|
|
40376
|
-
|
|
40377
|
-
|
|
40378
|
-
tolHighContrastPalette
|
|
40379
|
-
|
|
40380
|
-
|
|
40381
|
-
|
|
40382
|
-
|
|
40383
|
-
|
|
40384
|
-
|
|
40250
|
+
Object.fromEntries(
|
|
40251
|
+
[
|
|
40252
|
+
defaultPalette,
|
|
40253
|
+
okabeItoPalette,
|
|
40254
|
+
tolBrightPalette,
|
|
40255
|
+
tolMutedPalette,
|
|
40256
|
+
tolHighContrastPalette,
|
|
40257
|
+
ibmPalette,
|
|
40258
|
+
grayscalePalette,
|
|
40259
|
+
categoricalPalette,
|
|
40260
|
+
grumpyNarwhalPalette
|
|
40261
|
+
].map(registerByKey)
|
|
40262
|
+
)
|
|
40385
40263
|
);
|
|
40386
40264
|
Object.freeze(STYLE_PALETTES);
|
|
40387
|
-
const DEFAULT_PALETTE_NAME = defaultPalette.name;
|
|
40265
|
+
const DEFAULT_PALETTE_NAME = defaultPalette.name.toLowerCase();
|
|
40388
40266
|
Object.freeze(
|
|
40389
40267
|
Object.keys(STYLE_PALETTES)
|
|
40390
40268
|
);
|
|
@@ -40399,154 +40277,20 @@ function cycleStyleNumberForPalette(styleNumber, paletteName) {
|
|
|
40399
40277
|
}
|
|
40400
40278
|
return (styleNumber - 1) % size2 + 1;
|
|
40401
40279
|
}
|
|
40402
|
-
var
|
|
40403
|
-
return "string" == typeof r2 ? r2.length > 0 : "number" == typeof r2;
|
|
40404
|
-
}, n$2 = function(r2, t22, n2) {
|
|
40405
|
-
return void 0 === t22 && (t22 = 0), void 0 === n2 && (n2 = Math.pow(10, t22)), Math.round(n2 * r2) / n2 + 0;
|
|
40406
|
-
}, e$2 = function(r2, t22, n2) {
|
|
40407
|
-
return void 0 === t22 && (t22 = 0), void 0 === n2 && (n2 = 1), r2 > n2 ? n2 : r2 > t22 ? r2 : t22;
|
|
40408
|
-
}, u$2 = function(r2) {
|
|
40409
|
-
return (r2 = isFinite(r2) ? r2 % 360 : 0) > 0 ? r2 : r2 + 360;
|
|
40410
|
-
}, a$2 = function(r2) {
|
|
40411
|
-
return { r: e$2(r2.r, 0, 255), g: e$2(r2.g, 0, 255), b: e$2(r2.b, 0, 255), a: e$2(r2.a) };
|
|
40412
|
-
}, o$1$1 = function(r2) {
|
|
40413
|
-
return { r: n$2(r2.r), g: n$2(r2.g), b: n$2(r2.b), a: n$2(r2.a, 3) };
|
|
40414
|
-
}, i$2 = /^#([0-9a-f]{3,8})$/i, s$2 = function(r2) {
|
|
40415
|
-
var t22 = r2.toString(16);
|
|
40416
|
-
return t22.length < 2 ? "0" + t22 : t22;
|
|
40417
|
-
}, h$2 = function(r2) {
|
|
40418
|
-
var t22 = r2.r, n2 = r2.g, e22 = r2.b, u2 = r2.a, a2 = Math.max(t22, n2, e22), o2 = a2 - Math.min(t22, n2, e22), i2 = o2 ? a2 === t22 ? (n2 - e22) / o2 : a2 === n2 ? 2 + (e22 - t22) / o2 : 4 + (t22 - n2) / o2 : 0;
|
|
40419
|
-
return { h: 60 * (i2 < 0 ? i2 + 6 : i2), s: a2 ? o2 / a2 * 100 : 0, v: a2 / 255 * 100, a: u2 };
|
|
40420
|
-
}, b$2 = function(r2) {
|
|
40421
|
-
var t22 = r2.h, n2 = r2.s, e22 = r2.v, u2 = r2.a;
|
|
40422
|
-
t22 = t22 / 360 * 6, n2 /= 100, e22 /= 100;
|
|
40423
|
-
var a2 = Math.floor(t22), o2 = e22 * (1 - n2), i2 = e22 * (1 - (t22 - a2) * n2), s2 = e22 * (1 - (1 - t22 + a2) * n2), h2 = a2 % 6;
|
|
40424
|
-
return { r: 255 * [e22, i2, o2, o2, s2, e22][h2], g: 255 * [s2, e22, e22, i2, o2, o2][h2], b: 255 * [o2, o2, s2, e22, e22, i2][h2], a: u2 };
|
|
40425
|
-
}, g$2 = function(r2) {
|
|
40426
|
-
return { h: u$2(r2.h), s: e$2(r2.s, 0, 100), l: e$2(r2.l, 0, 100), a: e$2(r2.a) };
|
|
40427
|
-
}, d$2 = function(r2) {
|
|
40428
|
-
return { h: n$2(r2.h), s: n$2(r2.s), l: n$2(r2.l), a: n$2(r2.a, 3) };
|
|
40429
|
-
}, f$2 = function(r2) {
|
|
40430
|
-
return b$2((n2 = (t22 = r2).s, { h: t22.h, s: (n2 *= ((e22 = t22.l) < 50 ? e22 : 100 - e22) / 100) > 0 ? 2 * n2 / (e22 + n2) * 100 : 0, v: e22 + n2, a: t22.a }));
|
|
40431
|
-
var t22, n2, e22;
|
|
40432
|
-
}, c$2 = function(r2) {
|
|
40433
|
-
return { h: (t22 = h$2(r2)).h, s: (u2 = (200 - (n2 = t22.s)) * (e22 = t22.v) / 100) > 0 && u2 < 200 ? n2 * e22 / 100 / (u2 <= 100 ? u2 : 200 - u2) * 100 : 0, l: u2 / 2, a: t22.a };
|
|
40434
|
-
var t22, n2, e22, u2;
|
|
40435
|
-
}, l$2 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, p$2 = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, v$2 = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, m$2 = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, y$2 = { string: [[function(r2) {
|
|
40436
|
-
var t22 = i$2.exec(r2);
|
|
40437
|
-
return t22 ? (r2 = t22[1]).length <= 4 ? { r: parseInt(r2[0] + r2[0], 16), g: parseInt(r2[1] + r2[1], 16), b: parseInt(r2[2] + r2[2], 16), a: 4 === r2.length ? n$2(parseInt(r2[3] + r2[3], 16) / 255, 2) : 1 } : 6 === r2.length || 8 === r2.length ? { r: parseInt(r2.substr(0, 2), 16), g: parseInt(r2.substr(2, 2), 16), b: parseInt(r2.substr(4, 2), 16), a: 8 === r2.length ? n$2(parseInt(r2.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
|
|
40438
|
-
}, "hex"], [function(r2) {
|
|
40439
|
-
var t22 = v$2.exec(r2) || m$2.exec(r2);
|
|
40440
|
-
return t22 ? t22[2] !== t22[4] || t22[4] !== t22[6] ? null : a$2({ r: Number(t22[1]) / (t22[2] ? 100 / 255 : 1), g: Number(t22[3]) / (t22[4] ? 100 / 255 : 1), b: Number(t22[5]) / (t22[6] ? 100 / 255 : 1), a: void 0 === t22[7] ? 1 : Number(t22[7]) / (t22[8] ? 100 : 1) }) : null;
|
|
40441
|
-
}, "rgb"], [function(t22) {
|
|
40442
|
-
var n2 = l$2.exec(t22) || p$2.exec(t22);
|
|
40443
|
-
if (!n2) return null;
|
|
40444
|
-
var e22, u2, a2 = g$2({ h: (e22 = n2[1], u2 = n2[2], void 0 === u2 && (u2 = "deg"), Number(e22) * (r$2[u2] || 1)), s: Number(n2[3]), l: Number(n2[4]), a: void 0 === n2[5] ? 1 : Number(n2[5]) / (n2[6] ? 100 : 1) });
|
|
40445
|
-
return f$2(a2);
|
|
40446
|
-
}, "hsl"]], object: [[function(r2) {
|
|
40447
|
-
var n2 = r2.r, e22 = r2.g, u2 = r2.b, o2 = r2.a, i2 = void 0 === o2 ? 1 : o2;
|
|
40448
|
-
return t$1$1(n2) && t$1$1(e22) && t$1$1(u2) ? a$2({ r: Number(n2), g: Number(e22), b: Number(u2), a: Number(i2) }) : null;
|
|
40449
|
-
}, "rgb"], [function(r2) {
|
|
40450
|
-
var n2 = r2.h, e22 = r2.s, u2 = r2.l, a2 = r2.a, o2 = void 0 === a2 ? 1 : a2;
|
|
40451
|
-
if (!t$1$1(n2) || !t$1$1(e22) || !t$1$1(u2)) return null;
|
|
40452
|
-
var i2 = g$2({ h: Number(n2), s: Number(e22), l: Number(u2), a: Number(o2) });
|
|
40453
|
-
return f$2(i2);
|
|
40454
|
-
}, "hsl"], [function(r2) {
|
|
40455
|
-
var n2 = r2.h, a2 = r2.s, o2 = r2.v, i2 = r2.a, s2 = void 0 === i2 ? 1 : i2;
|
|
40456
|
-
if (!t$1$1(n2) || !t$1$1(a2) || !t$1$1(o2)) return null;
|
|
40457
|
-
var h2 = (function(r3) {
|
|
40458
|
-
return { h: u$2(r3.h), s: e$2(r3.s, 0, 100), v: e$2(r3.v, 0, 100), a: e$2(r3.a) };
|
|
40459
|
-
})({ h: Number(n2), s: Number(a2), v: Number(o2), a: Number(s2) });
|
|
40460
|
-
return b$2(h2);
|
|
40461
|
-
}, "hsv"]] }, N$2 = function(r2, t22) {
|
|
40462
|
-
for (var n2 = 0; n2 < t22.length; n2++) {
|
|
40463
|
-
var e22 = t22[n2][0](r2);
|
|
40464
|
-
if (e22) return [e22, t22[n2][1]];
|
|
40465
|
-
}
|
|
40466
|
-
return [null, void 0];
|
|
40467
|
-
}, x$2 = function(r2) {
|
|
40468
|
-
return "string" == typeof r2 ? N$2(r2.trim(), y$2.string) : "object" == typeof r2 && null !== r2 ? N$2(r2, y$2.object) : [null, void 0];
|
|
40469
|
-
}, M$4 = function(r2, t22) {
|
|
40470
|
-
var n2 = c$2(r2);
|
|
40471
|
-
return { h: n2.h, s: e$2(n2.s + 100 * t22, 0, 100), l: n2.l, a: n2.a };
|
|
40472
|
-
}, H$3 = function(r2) {
|
|
40473
|
-
return (299 * r2.r + 587 * r2.g + 114 * r2.b) / 1e3 / 255;
|
|
40474
|
-
}, $$2 = function(r2, t22) {
|
|
40475
|
-
var n2 = c$2(r2);
|
|
40476
|
-
return { h: n2.h, s: n2.s, l: e$2(n2.l + 100 * t22, 0, 100), a: n2.a };
|
|
40477
|
-
}, j$2 = (function() {
|
|
40478
|
-
function r2(r3) {
|
|
40479
|
-
this.parsed = x$2(r3)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
|
|
40480
|
-
}
|
|
40481
|
-
return r2.prototype.isValid = function() {
|
|
40482
|
-
return null !== this.parsed;
|
|
40483
|
-
}, r2.prototype.brightness = function() {
|
|
40484
|
-
return n$2(H$3(this.rgba), 2);
|
|
40485
|
-
}, r2.prototype.isDark = function() {
|
|
40486
|
-
return H$3(this.rgba) < 0.5;
|
|
40487
|
-
}, r2.prototype.isLight = function() {
|
|
40488
|
-
return H$3(this.rgba) >= 0.5;
|
|
40489
|
-
}, r2.prototype.toHex = function() {
|
|
40490
|
-
return r3 = o$1$1(this.rgba), t22 = r3.r, e22 = r3.g, u2 = r3.b, i2 = (a2 = r3.a) < 1 ? s$2(n$2(255 * a2)) : "", "#" + s$2(t22) + s$2(e22) + s$2(u2) + i2;
|
|
40491
|
-
var r3, t22, e22, u2, a2, i2;
|
|
40492
|
-
}, r2.prototype.toRgb = function() {
|
|
40493
|
-
return o$1$1(this.rgba);
|
|
40494
|
-
}, r2.prototype.toRgbString = function() {
|
|
40495
|
-
return r3 = o$1$1(this.rgba), t22 = r3.r, n2 = r3.g, e22 = r3.b, (u2 = r3.a) < 1 ? "rgba(" + t22 + ", " + n2 + ", " + e22 + ", " + u2 + ")" : "rgb(" + t22 + ", " + n2 + ", " + e22 + ")";
|
|
40496
|
-
var r3, t22, n2, e22, u2;
|
|
40497
|
-
}, r2.prototype.toHsl = function() {
|
|
40498
|
-
return d$2(c$2(this.rgba));
|
|
40499
|
-
}, r2.prototype.toHslString = function() {
|
|
40500
|
-
return r3 = d$2(c$2(this.rgba)), t22 = r3.h, n2 = r3.s, e22 = r3.l, (u2 = r3.a) < 1 ? "hsla(" + t22 + ", " + n2 + "%, " + e22 + "%, " + u2 + ")" : "hsl(" + t22 + ", " + n2 + "%, " + e22 + "%)";
|
|
40501
|
-
var r3, t22, n2, e22, u2;
|
|
40502
|
-
}, r2.prototype.toHsv = function() {
|
|
40503
|
-
return r3 = h$2(this.rgba), { h: n$2(r3.h), s: n$2(r3.s), v: n$2(r3.v), a: n$2(r3.a, 3) };
|
|
40504
|
-
var r3;
|
|
40505
|
-
}, r2.prototype.invert = function() {
|
|
40506
|
-
return w$2({ r: 255 - (r3 = this.rgba).r, g: 255 - r3.g, b: 255 - r3.b, a: r3.a });
|
|
40507
|
-
var r3;
|
|
40508
|
-
}, r2.prototype.saturate = function(r3) {
|
|
40509
|
-
return void 0 === r3 && (r3 = 0.1), w$2(M$4(this.rgba, r3));
|
|
40510
|
-
}, r2.prototype.desaturate = function(r3) {
|
|
40511
|
-
return void 0 === r3 && (r3 = 0.1), w$2(M$4(this.rgba, -r3));
|
|
40512
|
-
}, r2.prototype.grayscale = function() {
|
|
40513
|
-
return w$2(M$4(this.rgba, -1));
|
|
40514
|
-
}, r2.prototype.lighten = function(r3) {
|
|
40515
|
-
return void 0 === r3 && (r3 = 0.1), w$2($$2(this.rgba, r3));
|
|
40516
|
-
}, r2.prototype.darken = function(r3) {
|
|
40517
|
-
return void 0 === r3 && (r3 = 0.1), w$2($$2(this.rgba, -r3));
|
|
40518
|
-
}, r2.prototype.rotate = function(r3) {
|
|
40519
|
-
return void 0 === r3 && (r3 = 15), this.hue(this.hue() + r3);
|
|
40520
|
-
}, r2.prototype.alpha = function(r3) {
|
|
40521
|
-
return "number" == typeof r3 ? w$2({ r: (t22 = this.rgba).r, g: t22.g, b: t22.b, a: r3 }) : n$2(this.rgba.a, 3);
|
|
40522
|
-
var t22;
|
|
40523
|
-
}, r2.prototype.hue = function(r3) {
|
|
40524
|
-
var t22 = c$2(this.rgba);
|
|
40525
|
-
return "number" == typeof r3 ? w$2({ h: r3, s: t22.s, l: t22.l, a: t22.a }) : n$2(t22.h);
|
|
40526
|
-
}, r2.prototype.isEqual = function(r3) {
|
|
40527
|
-
return this.toHex() === w$2(r3).toHex();
|
|
40528
|
-
}, r2;
|
|
40529
|
-
})(), w$2 = function(r2) {
|
|
40530
|
-
return r2 instanceof j$2 ? r2 : new j$2(r2);
|
|
40531
|
-
}, S$2 = [], k$2 = function(r2) {
|
|
40532
|
-
r2.forEach(function(r3) {
|
|
40533
|
-
S$2.indexOf(r3) < 0 && (r3(j$2, y$2), S$2.push(r3));
|
|
40534
|
-
});
|
|
40535
|
-
};
|
|
40536
|
-
var o$2 = function(o2) {
|
|
40280
|
+
var o$4 = function(o2) {
|
|
40537
40281
|
var t22 = o2 / 255;
|
|
40538
40282
|
return t22 < 0.04045 ? t22 / 12.92 : Math.pow((t22 + 0.055) / 1.055, 2.4);
|
|
40539
|
-
}, t$
|
|
40540
|
-
return 0.2126 * o$
|
|
40283
|
+
}, t$4 = function(t22) {
|
|
40284
|
+
return 0.2126 * o$4(t22.r) + 0.7152 * o$4(t22.g) + 0.0722 * o$4(t22.b);
|
|
40541
40285
|
};
|
|
40542
40286
|
function a11yPlugin(o2) {
|
|
40543
40287
|
o2.prototype.luminance = function() {
|
|
40544
|
-
return o3 = t$
|
|
40288
|
+
return o3 = t$4(this.rgba), void 0 === (r2 = 2) && (r2 = 0), void 0 === n2 && (n2 = Math.pow(10, r2)), Math.round(n2 * o3) / n2 + 0;
|
|
40545
40289
|
var o3, r2, n2;
|
|
40546
40290
|
}, o2.prototype.contrast = function(r2) {
|
|
40547
40291
|
void 0 === r2 && (r2 = "#FFF");
|
|
40548
40292
|
var n2, a2, i2, e22, v2, u2, d2, c2 = r2 instanceof o2 ? r2 : new o2(r2);
|
|
40549
|
-
return e22 = this.rgba, v2 = c2.toRgb(), u2 = t$
|
|
40293
|
+
return e22 = this.rgba, v2 = c2.toRgb(), u2 = t$4(e22), d2 = t$4(v2), n2 = u2 > d2 ? (u2 + 0.05) / (d2 + 0.05) : (d2 + 0.05) / (u2 + 0.05), void 0 === (a2 = 2) && (a2 = 0), void 0 === i2 && (i2 = Math.pow(10, a2)), Math.floor(i2 * n2) / i2 + 0;
|
|
40550
40294
|
}, o2.prototype.isReadable = function(o3, t22) {
|
|
40551
40295
|
return void 0 === o3 && (o3 = "#FFF"), void 0 === t22 && (t22 = {}), this.contrast(o3) >= (e22 = void 0 === (i2 = (r2 = t22).size) ? "normal" : i2, "AAA" === (a2 = void 0 === (n2 = r2.level) ? "AA" : n2) && "normal" === e22 ? 7 : "AA" === a2 && "large" === e22 ? 3 : 4.5);
|
|
40552
40296
|
var r2, n2, a2, i2, e22;
|
|
@@ -40597,7 +40341,7 @@ function compositeOver(foreground, background) {
|
|
|
40597
40341
|
};
|
|
40598
40342
|
}
|
|
40599
40343
|
function hexWithLightness(color, lightness) {
|
|
40600
|
-
return w$
|
|
40344
|
+
return w$1$1({ ...color, l: lightness }).toHex();
|
|
40601
40345
|
}
|
|
40602
40346
|
function compositedContrastRatio({
|
|
40603
40347
|
foreground,
|
|
@@ -40605,8 +40349,8 @@ function compositedContrastRatio({
|
|
|
40605
40349
|
background,
|
|
40606
40350
|
opacityMultiplier = 1
|
|
40607
40351
|
}) {
|
|
40608
|
-
const fg = w$
|
|
40609
|
-
const canvasColor = w$
|
|
40352
|
+
const fg = w$1$1(foreground);
|
|
40353
|
+
const canvasColor = w$1$1(canvas);
|
|
40610
40354
|
if (!fg.isValid() || !canvasColor.isValid()) {
|
|
40611
40355
|
return null;
|
|
40612
40356
|
}
|
|
@@ -40618,7 +40362,7 @@ function compositedContrastRatio({
|
|
|
40618
40362
|
};
|
|
40619
40363
|
let backgroundOpaque = canvasOpaque;
|
|
40620
40364
|
if (background !== void 0) {
|
|
40621
|
-
const bg = w$
|
|
40365
|
+
const bg = w$1$1(background);
|
|
40622
40366
|
if (!bg.isValid()) {
|
|
40623
40367
|
return null;
|
|
40624
40368
|
}
|
|
@@ -40629,14 +40373,14 @@ function compositedContrastRatio({
|
|
|
40629
40373
|
{ ...fgRgba, a: clamp01$1(fgRgba.a * opacityMultiplier) },
|
|
40630
40374
|
backgroundOpaque
|
|
40631
40375
|
);
|
|
40632
|
-
return w$
|
|
40376
|
+
return w$1$1(effectiveForeground).contrast(w$1$1(backgroundOpaque));
|
|
40633
40377
|
}
|
|
40634
40378
|
function deriveAccessibleDarkModeColor({
|
|
40635
40379
|
lightColor,
|
|
40636
40380
|
threshold,
|
|
40637
40381
|
opacityMultiplier = 1
|
|
40638
40382
|
}) {
|
|
40639
|
-
const base = w$
|
|
40383
|
+
const base = w$1$1(lightColor);
|
|
40640
40384
|
if (!base.isValid()) {
|
|
40641
40385
|
return lightColor;
|
|
40642
40386
|
}
|
|
@@ -40663,12 +40407,12 @@ function deriveAccessibleDarkModeColor({
|
|
|
40663
40407
|
return hexWithLightness({ h: h2, s: s2, a: a2 }, 100);
|
|
40664
40408
|
}
|
|
40665
40409
|
function invertLightness(color) {
|
|
40666
|
-
const c2 = w$
|
|
40410
|
+
const c2 = w$1$1(color);
|
|
40667
40411
|
if (!c2.isValid()) {
|
|
40668
40412
|
return color;
|
|
40669
40413
|
}
|
|
40670
40414
|
const { h: h2, s: s2, l: l2, a: a2 } = c2.toHsl();
|
|
40671
|
-
return w$
|
|
40415
|
+
return w$1$1({ h: h2, s: s2, l: 100 - l2, a: a2 }).toHex();
|
|
40672
40416
|
}
|
|
40673
40417
|
function deriveAccessibleDarkModeBackground(lightColor) {
|
|
40674
40418
|
return invertLightness(lightColor);
|
|
@@ -40679,7 +40423,7 @@ function suggestAccessibleDarkModeColorAgainst({
|
|
|
40679
40423
|
channelRole,
|
|
40680
40424
|
threshold
|
|
40681
40425
|
}) {
|
|
40682
|
-
const base = w$
|
|
40426
|
+
const base = w$1$1(startColor);
|
|
40683
40427
|
if (!base.isValid()) {
|
|
40684
40428
|
return null;
|
|
40685
40429
|
}
|
|
@@ -42505,7 +42249,7 @@ async function cidFromArrayBuffer(data) {
|
|
|
42505
42249
|
await crypto.subtle.digest("SHA-256", new Uint8Array());
|
|
42506
42250
|
digest = (data2) => crypto.subtle.digest("SHA-256", data2);
|
|
42507
42251
|
} catch (e22) {
|
|
42508
|
-
const sha256 = (await import("./sha256-
|
|
42252
|
+
const sha256 = (await import("./sha256-J35x7uWS-24B4oOm4-C0fEUZ-1.js").then((n2) => n2.s)).default;
|
|
42509
42253
|
digest = (data2) => sha256(data2, {
|
|
42510
42254
|
asBytes: true
|
|
42511
42255
|
});
|
|
@@ -232117,4 +231861,4 @@ export {
|
|
|
232117
231861
|
getDefaultExportFromCjs as g,
|
|
232118
231862
|
updateSyntaxFromV06toV07 as u
|
|
232119
231863
|
};
|
|
232120
|
-
//# sourceMappingURL=index-
|
|
231864
|
+
//# sourceMappingURL=index-BizNZKDW.js.map
|