sculpted 0.3.5 → 0.3.6
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/dist/ui.mjs +2919 -213
- package/package.json +2 -1
package/dist/ui.mjs
CHANGED
|
@@ -2450,7 +2450,7 @@ const oppositeSideMap = {
|
|
|
2450
2450
|
bottom: "top",
|
|
2451
2451
|
top: "bottom"
|
|
2452
2452
|
};
|
|
2453
|
-
function clamp(start, value, end) {
|
|
2453
|
+
function clamp$1(start, value, end) {
|
|
2454
2454
|
return max(start, min(value, end));
|
|
2455
2455
|
}
|
|
2456
2456
|
function evaluate(value, param) {
|
|
@@ -2886,14 +2886,14 @@ const shift$1 = function(options) {
|
|
|
2886
2886
|
const maxSide = mainAxis === "y" ? "bottom" : "right";
|
|
2887
2887
|
const min = mainAxisCoord + overflow[minSide];
|
|
2888
2888
|
const max = mainAxisCoord - overflow[maxSide];
|
|
2889
|
-
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
2889
|
+
mainAxisCoord = clamp$1(min, mainAxisCoord, max);
|
|
2890
2890
|
}
|
|
2891
2891
|
if (checkCrossAxis) {
|
|
2892
2892
|
const minSide = crossAxis === "y" ? "top" : "left";
|
|
2893
2893
|
const maxSide = crossAxis === "y" ? "bottom" : "right";
|
|
2894
2894
|
const min = crossAxisCoord + overflow[minSide];
|
|
2895
2895
|
const max = crossAxisCoord - overflow[maxSide];
|
|
2896
|
-
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
2896
|
+
crossAxisCoord = clamp$1(min, crossAxisCoord, max);
|
|
2897
2897
|
}
|
|
2898
2898
|
const limitedCoords = limiter.fn({
|
|
2899
2899
|
...state,
|
|
@@ -4606,10 +4606,6 @@ function tokenPathToCssVariableSuffix(value) {
|
|
|
4606
4606
|
function previewChangeKey(editId, path) {
|
|
4607
4607
|
return `${editId}\u0000${path.join(".")}`;
|
|
4608
4608
|
}
|
|
4609
|
-
function styleEditResponseMessage(response) {
|
|
4610
|
-
if (response.error) return response.error.message;
|
|
4611
|
-
return "Save failed.";
|
|
4612
|
-
}
|
|
4613
4609
|
function errorMessage(error) {
|
|
4614
4610
|
return error instanceof Error ? error.message : String(error);
|
|
4615
4611
|
}
|
|
@@ -4627,6 +4623,2559 @@ function previewChangeMapsEqual(left, right) {
|
|
|
4627
4623
|
return true;
|
|
4628
4624
|
}
|
|
4629
4625
|
//#endregion
|
|
4626
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/detectFormat.js
|
|
4627
|
+
/** Shared with `src/conversions/hex.ts`. Capture group is used there; .test() ignores it here. */
|
|
4628
|
+
const HEX_RE = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
4629
|
+
const RGBA_STR_RE = /^rgba\s*\(/i;
|
|
4630
|
+
const RGB_STR_RE = /^rgb\s*\(/i;
|
|
4631
|
+
const HSL_STR_RE = /^hsl\s*\(/i;
|
|
4632
|
+
const HSV_STR_RE = /^hsv\s*\(/i;
|
|
4633
|
+
/**
|
|
4634
|
+
* Classify a color input by shape, returning the {@link ColorFormat}
|
|
4635
|
+
* key used to dispatch format-specific converters. Returns the
|
|
4636
|
+
* sentinel `'UNKNOWN'` when the input doesn't match any recognized
|
|
4637
|
+
* shape; callers that only need a boolean guard should prefer
|
|
4638
|
+
* {@link isColor} instead.
|
|
4639
|
+
*
|
|
4640
|
+
* Pure shape detection; no value validation. `detectFormat('#zzz')`
|
|
4641
|
+
* still returns `'UNKNOWN'` because the hex regex rejects it, but
|
|
4642
|
+
* `detectFormat({ r: 999, g: -1, b: 'nope' })` returns `'RGB'` (the
|
|
4643
|
+
* shape matches; the values are the converter's problem).
|
|
4644
|
+
*
|
|
4645
|
+
* @example
|
|
4646
|
+
* detectFormat('#ff0000'); // 'HEX'
|
|
4647
|
+
* detectFormat('rgb(255, 0, 0)'); // 'RGB'
|
|
4648
|
+
* detectFormat([255, 0, 0]); // 'RGB'
|
|
4649
|
+
* detectFormat([255, 0, 0, 0.5]); // 'RGBA'
|
|
4650
|
+
* detectFormat({ h: 0, s: 100, l: 50 });// 'HSL'
|
|
4651
|
+
* detectFormat('banana'); // 'UNKNOWN'
|
|
4652
|
+
*/
|
|
4653
|
+
function detectFormat(input) {
|
|
4654
|
+
if (typeof input === "string") {
|
|
4655
|
+
if (input.length === 0) return "UNKNOWN";
|
|
4656
|
+
if (HEX_RE.test(input)) return "HEX";
|
|
4657
|
+
if (RGBA_STR_RE.test(input)) return "RGBA";
|
|
4658
|
+
if (RGB_STR_RE.test(input)) return "RGB";
|
|
4659
|
+
if (HSL_STR_RE.test(input)) return "HSL";
|
|
4660
|
+
if (HSV_STR_RE.test(input)) return "HSV";
|
|
4661
|
+
return "UNKNOWN";
|
|
4662
|
+
}
|
|
4663
|
+
if (Array.isArray(input)) {
|
|
4664
|
+
if (input.length === 4) return "RGBA";
|
|
4665
|
+
if (input.length === 3) return "RGB";
|
|
4666
|
+
return "UNKNOWN";
|
|
4667
|
+
}
|
|
4668
|
+
if (input !== null && typeof input === "object") {
|
|
4669
|
+
const has = Object.hasOwn;
|
|
4670
|
+
if (has(input, "h") && has(input, "v")) return "HSV";
|
|
4671
|
+
if (has(input, "h") && has(input, "l")) return "HSL";
|
|
4672
|
+
if (has(input, "r") && has(input, "a")) return "RGBA";
|
|
4673
|
+
if (has(input, "r")) return "RGB";
|
|
4674
|
+
return "UNKNOWN";
|
|
4675
|
+
}
|
|
4676
|
+
return "UNKNOWN";
|
|
4677
|
+
}
|
|
4678
|
+
//#endregion
|
|
4679
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/math/clamp.js
|
|
4680
|
+
/**
|
|
4681
|
+
* Clamp n to [lo, hi]. Caller must ensure n is a finite number.
|
|
4682
|
+
*/
|
|
4683
|
+
function clamp(n, lo, hi) {
|
|
4684
|
+
return Math.max(lo, Math.min(hi, n));
|
|
4685
|
+
}
|
|
4686
|
+
/**
|
|
4687
|
+
* Require a finite number at an API boundary; throws otherwise.
|
|
4688
|
+
* Used by converter entry points to reject NaN, Infinity, and non-numeric
|
|
4689
|
+
* values before they propagate through color math.
|
|
4690
|
+
*/
|
|
4691
|
+
function requireFinite(n, label) {
|
|
4692
|
+
if (typeof n !== "number" || !Number.isFinite(n)) throw new Error(`Expected finite number for ${label}, got ${typeof n}: ${String(n)}`);
|
|
4693
|
+
return n;
|
|
4694
|
+
}
|
|
4695
|
+
//#endregion
|
|
4696
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/conversions/hex.js
|
|
4697
|
+
/**
|
|
4698
|
+
* Parse a hex color string into the canonical Rgba representation.
|
|
4699
|
+
* Accepts 3-digit (`#rgb`), 6-digit (`#rrggbb`), and 8-digit (`#rrggbbaa`).
|
|
4700
|
+
* Throws on any other input shape.
|
|
4701
|
+
*/
|
|
4702
|
+
function hexToRgba(hex) {
|
|
4703
|
+
const body = HEX_RE.exec(hex)?.[1];
|
|
4704
|
+
if (!body) throw new Error(`Invalid hex color: ${hex}`);
|
|
4705
|
+
if (body.length === 3) {
|
|
4706
|
+
const r = body.charAt(0);
|
|
4707
|
+
const g = body.charAt(1);
|
|
4708
|
+
const b = body.charAt(2);
|
|
4709
|
+
return {
|
|
4710
|
+
r: parseInt(r + r, 16),
|
|
4711
|
+
g: parseInt(g + g, 16),
|
|
4712
|
+
b: parseInt(b + b, 16),
|
|
4713
|
+
a: 1
|
|
4714
|
+
};
|
|
4715
|
+
}
|
|
4716
|
+
return {
|
|
4717
|
+
r: parseInt(body.slice(0, 2), 16),
|
|
4718
|
+
g: parseInt(body.slice(2, 4), 16),
|
|
4719
|
+
b: parseInt(body.slice(4, 6), 16),
|
|
4720
|
+
a: body.length === 8 ? parseInt(body.slice(6, 8), 16) / 255 : 1
|
|
4721
|
+
};
|
|
4722
|
+
}
|
|
4723
|
+
//#endregion
|
|
4724
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/math/hueSector.js
|
|
4725
|
+
/**
|
|
4726
|
+
* Map a normalized hue sector value (range [0, 6)) plus chroma and its
|
|
4727
|
+
* secondary into the primary-color tuple `[r', g', b']` used by the
|
|
4728
|
+
* standard HSL→RGB and HSV→RGB algorithms. Each component is in [0, chroma].
|
|
4729
|
+
*
|
|
4730
|
+
* Shared by `hslToRgba` and `hsvToRgba`: same six-sector table, different
|
|
4731
|
+
* formulas for chroma and the offset. The caller adds the offset and
|
|
4732
|
+
* scales by 255.
|
|
4733
|
+
*
|
|
4734
|
+
* hueSector = h / 60 (h wrapped to [0, 360))
|
|
4735
|
+
* chroma = HSL: (1 − |2l − 1|)·s ; HSV: v·s
|
|
4736
|
+
* secondary = chroma · (1 − |hueSector mod 2 − 1|)
|
|
4737
|
+
*/
|
|
4738
|
+
function hueSectorToPrime(hueSector, chroma, secondary) {
|
|
4739
|
+
if (hueSector < 1) return [
|
|
4740
|
+
chroma,
|
|
4741
|
+
secondary,
|
|
4742
|
+
0
|
|
4743
|
+
];
|
|
4744
|
+
if (hueSector < 2) return [
|
|
4745
|
+
secondary,
|
|
4746
|
+
chroma,
|
|
4747
|
+
0
|
|
4748
|
+
];
|
|
4749
|
+
if (hueSector < 3) return [
|
|
4750
|
+
0,
|
|
4751
|
+
chroma,
|
|
4752
|
+
secondary
|
|
4753
|
+
];
|
|
4754
|
+
if (hueSector < 4) return [
|
|
4755
|
+
0,
|
|
4756
|
+
secondary,
|
|
4757
|
+
chroma
|
|
4758
|
+
];
|
|
4759
|
+
if (hueSector < 5) return [
|
|
4760
|
+
secondary,
|
|
4761
|
+
0,
|
|
4762
|
+
chroma
|
|
4763
|
+
];
|
|
4764
|
+
return [
|
|
4765
|
+
chroma,
|
|
4766
|
+
0,
|
|
4767
|
+
secondary
|
|
4768
|
+
];
|
|
4769
|
+
}
|
|
4770
|
+
//#endregion
|
|
4771
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/conversions/hsl.js
|
|
4772
|
+
const HSL_RE = /^hsl\s*\(\s*(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)%?\s*,\s*(-?\d+(?:\.\d+)?)%?\s*\)$/i;
|
|
4773
|
+
/**
|
|
4774
|
+
* Parse HSL input (string or object) into canonical Rgba.
|
|
4775
|
+
* Hue wraps modulo 360; saturation and lightness are 0..100 percent.
|
|
4776
|
+
*/
|
|
4777
|
+
function hslToRgba(input) {
|
|
4778
|
+
let h;
|
|
4779
|
+
let s;
|
|
4780
|
+
let l;
|
|
4781
|
+
if (typeof input === "string") {
|
|
4782
|
+
const match = HSL_RE.exec(input);
|
|
4783
|
+
if (!match) throw new Error(`Invalid hsl string: ${input}`);
|
|
4784
|
+
h = Number(match[1]);
|
|
4785
|
+
s = Number(match[2]);
|
|
4786
|
+
l = Number(match[3]);
|
|
4787
|
+
} else {
|
|
4788
|
+
h = requireFinite(input.h, "h");
|
|
4789
|
+
s = requireFinite(input.s, "s");
|
|
4790
|
+
l = requireFinite(input.l, "l");
|
|
4791
|
+
}
|
|
4792
|
+
const saturation = s / 100;
|
|
4793
|
+
const lightness = l / 100;
|
|
4794
|
+
if (saturation === 0) {
|
|
4795
|
+
const gray = Math.round(lightness * 255);
|
|
4796
|
+
return {
|
|
4797
|
+
r: gray,
|
|
4798
|
+
g: gray,
|
|
4799
|
+
b: gray,
|
|
4800
|
+
a: 1
|
|
4801
|
+
};
|
|
4802
|
+
}
|
|
4803
|
+
const chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
4804
|
+
const hueSector = (h % 360 + 360) % 360 / 60;
|
|
4805
|
+
const secondary = chroma * (1 - Math.abs(hueSector % 2 - 1));
|
|
4806
|
+
const lightnessOffset = lightness - chroma / 2;
|
|
4807
|
+
const [rPrime, gPrime, bPrime] = hueSectorToPrime(hueSector, chroma, secondary);
|
|
4808
|
+
return {
|
|
4809
|
+
r: Math.round((rPrime + lightnessOffset) * 255),
|
|
4810
|
+
g: Math.round((gPrime + lightnessOffset) * 255),
|
|
4811
|
+
b: Math.round((bPrime + lightnessOffset) * 255),
|
|
4812
|
+
a: 1
|
|
4813
|
+
};
|
|
4814
|
+
}
|
|
4815
|
+
//#endregion
|
|
4816
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/conversions/hsv.js
|
|
4817
|
+
const HSV_RE = /^hsv\s*\(\s*(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)%?\s*,\s*(-?\d+(?:\.\d+)?)%?\s*\)$/i;
|
|
4818
|
+
/**
|
|
4819
|
+
* Parse HSV input (string or object) into canonical Rgba.
|
|
4820
|
+
* Hue wraps modulo 360; saturation and value are 0..100 percent.
|
|
4821
|
+
*/
|
|
4822
|
+
function hsvToRgba(input) {
|
|
4823
|
+
let h;
|
|
4824
|
+
let s;
|
|
4825
|
+
let v;
|
|
4826
|
+
if (typeof input === "string") {
|
|
4827
|
+
const match = HSV_RE.exec(input);
|
|
4828
|
+
if (!match) throw new Error(`Invalid hsv string: ${input}`);
|
|
4829
|
+
h = Number(match[1]);
|
|
4830
|
+
s = Number(match[2]);
|
|
4831
|
+
v = Number(match[3]);
|
|
4832
|
+
} else {
|
|
4833
|
+
h = requireFinite(input.h, "h");
|
|
4834
|
+
s = requireFinite(input.s, "s");
|
|
4835
|
+
v = requireFinite(input.v, "v");
|
|
4836
|
+
}
|
|
4837
|
+
const saturation = s / 100;
|
|
4838
|
+
const value = v / 100;
|
|
4839
|
+
const chroma = value * saturation;
|
|
4840
|
+
const hueSector = (h % 360 + 360) % 360 / 60;
|
|
4841
|
+
const secondary = chroma * (1 - Math.abs(hueSector % 2 - 1));
|
|
4842
|
+
const valueOffset = value - chroma;
|
|
4843
|
+
const [rPrime, gPrime, bPrime] = hueSectorToPrime(hueSector, chroma, secondary);
|
|
4844
|
+
return {
|
|
4845
|
+
r: Math.round((rPrime + valueOffset) * 255),
|
|
4846
|
+
g: Math.round((gPrime + valueOffset) * 255),
|
|
4847
|
+
b: Math.round((bPrime + valueOffset) * 255),
|
|
4848
|
+
a: 1
|
|
4849
|
+
};
|
|
4850
|
+
}
|
|
4851
|
+
//#endregion
|
|
4852
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/math/colorSpace.js
|
|
4853
|
+
/**
|
|
4854
|
+
* Color-space conversions needed by the perceptual distance metrics.
|
|
4855
|
+
*
|
|
4856
|
+
* Two pipelines:
|
|
4857
|
+
* CIELAB: sRGB (0..255) → linear RGB → XYZ (D65) → Lab
|
|
4858
|
+
* OKLAB: sRGB (0..255) → linear RGB → LMS (cbrt) → OKLAB
|
|
4859
|
+
*
|
|
4860
|
+
* References:
|
|
4861
|
+
* sRGB EOTF / companding: IEC 61966-2-1
|
|
4862
|
+
* sRGB → XYZ (D65): Bruce Lindbloom, http://www.brucelindbloom.com/
|
|
4863
|
+
* XYZ → Lab: CIE 15:2004
|
|
4864
|
+
* OKLAB: Ottosson, https://bottosson.github.io/posts/oklab/
|
|
4865
|
+
*/
|
|
4866
|
+
/** sRGB → linear for a single channel in [0, 255]. Returns [0, 1]. */
|
|
4867
|
+
function srgbToLinear(channel) {
|
|
4868
|
+
const s = channel / 255;
|
|
4869
|
+
return s <= .04045 ? s / 12.92 : ((s + .055) / 1.055) ** 2.4;
|
|
4870
|
+
}
|
|
4871
|
+
/** Rgba → linear RGB triple in [0, 1] (alpha dropped). */
|
|
4872
|
+
function rgbaToLinearRgb(rgba) {
|
|
4873
|
+
return [
|
|
4874
|
+
srgbToLinear(rgba.r),
|
|
4875
|
+
srgbToLinear(rgba.g),
|
|
4876
|
+
srgbToLinear(rgba.b)
|
|
4877
|
+
];
|
|
4878
|
+
}
|
|
4879
|
+
/**
|
|
4880
|
+
* Linear RGB (D65) → CIE XYZ (D65), using the standard sRGB matrix.
|
|
4881
|
+
* Input and output both in [0, 1] on each axis (approximately; Y = 1 is white).
|
|
4882
|
+
*/
|
|
4883
|
+
function linearRgbToXyz(r, g, b) {
|
|
4884
|
+
return [
|
|
4885
|
+
r * .4124564 + g * .3575761 + b * .1804375,
|
|
4886
|
+
r * .2126729 + g * .7151522 + b * .072175,
|
|
4887
|
+
r * .0193339 + g * .119192 + b * .9503041
|
|
4888
|
+
];
|
|
4889
|
+
}
|
|
4890
|
+
const XN = .95047;
|
|
4891
|
+
const YN = 1;
|
|
4892
|
+
const ZN = 1.08883;
|
|
4893
|
+
function labF(t) {
|
|
4894
|
+
const DELTA = 6 / 29;
|
|
4895
|
+
return t > DELTA ** 3 ? Math.cbrt(t) : t / (3 * DELTA ** 2) + 4 / 29;
|
|
4896
|
+
}
|
|
4897
|
+
/** CIE XYZ (D65) → CIE Lab. L ∈ [0, 100] approx; a,b unbounded but typically [-128, 127]. */
|
|
4898
|
+
function xyzToLab(x, y, z) {
|
|
4899
|
+
const fx = labF(x / XN);
|
|
4900
|
+
const fy = labF(y / YN);
|
|
4901
|
+
const fz = labF(z / ZN);
|
|
4902
|
+
return [
|
|
4903
|
+
116 * fy - 16,
|
|
4904
|
+
500 * (fx - fy),
|
|
4905
|
+
200 * (fy - fz)
|
|
4906
|
+
];
|
|
4907
|
+
}
|
|
4908
|
+
/** Rgba (sRGB, 0..255) → CIE Lab. Canonical pipeline for perceptual distance. */
|
|
4909
|
+
function rgbaToLab(rgba) {
|
|
4910
|
+
const [r, g, b] = rgbaToLinearRgb(rgba);
|
|
4911
|
+
const [x, y, z] = linearRgbToXyz(r, g, b);
|
|
4912
|
+
return xyzToLab(x, y, z);
|
|
4913
|
+
}
|
|
4914
|
+
/**
|
|
4915
|
+
* Linear sRGB → OKLAB (Björn Ottosson, 2020). OKLAB is strictly more
|
|
4916
|
+
* perceptually uniform than CIELAB, especially in the blue/purple region
|
|
4917
|
+
* where even CIEDE2000 has residual error. Distance in OKLAB is plain
|
|
4918
|
+
* Euclidean — no weighting formula needed, because the space itself is
|
|
4919
|
+
* designed around uniformity.
|
|
4920
|
+
*
|
|
4921
|
+
* Reference: https://bottosson.github.io/posts/oklab/
|
|
4922
|
+
*/
|
|
4923
|
+
function linearRgbToOklab(r, g, b) {
|
|
4924
|
+
const l = .4122214708 * r + .5363325363 * g + .0514459929 * b;
|
|
4925
|
+
const m = .2119034982 * r + .6806995451 * g + .1073969566 * b;
|
|
4926
|
+
const s = .0883024619 * r + .2817188376 * g + .6299787005 * b;
|
|
4927
|
+
const l_ = Math.cbrt(l);
|
|
4928
|
+
const m_ = Math.cbrt(m);
|
|
4929
|
+
const s_ = Math.cbrt(s);
|
|
4930
|
+
return [
|
|
4931
|
+
.2104542553 * l_ + .793617785 * m_ - .0040720468 * s_,
|
|
4932
|
+
1.9779984951 * l_ - 2.428592205 * m_ + .4505937099 * s_,
|
|
4933
|
+
.0259040371 * l_ + .7827717662 * m_ - .808675766 * s_
|
|
4934
|
+
];
|
|
4935
|
+
}
|
|
4936
|
+
/** Rgba (sRGB, 0..255) → OKLAB. */
|
|
4937
|
+
function rgbaToOklab(rgba) {
|
|
4938
|
+
const [r, g, b] = rgbaToLinearRgb(rgba);
|
|
4939
|
+
return linearRgbToOklab(r, g, b);
|
|
4940
|
+
}
|
|
4941
|
+
//#endregion
|
|
4942
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/math/deltaE.js
|
|
4943
|
+
/**
|
|
4944
|
+
* Color-difference metrics. Inputs are `Lab` triples (L, a, b). The
|
|
4945
|
+
* CIELAB family (ΔE*76 / ΔE*94 / ΔE*00) takes coordinates from
|
|
4946
|
+
* `rgbaToLab`; ΔE*ok takes coordinates from `rgbaToOklab`. Both spaces
|
|
4947
|
+
* share the `Lab` tuple shape but are not interchangeable — see
|
|
4948
|
+
* `deltaEokSquared` below.
|
|
4949
|
+
*
|
|
4950
|
+
* Within the CIELAB family, the metrics differ in how each region of
|
|
4951
|
+
* Lab space is weighted:
|
|
4952
|
+
* ΔE*76 — simple Euclidean in Lab (CIE 1976). Fast, decent.
|
|
4953
|
+
* ΔE*94 — adds chroma/hue weighting (CIE 1994). Better saturation handling.
|
|
4954
|
+
* ΔE00 — also adjusts L/C/h + rotation correction in blue-purple region
|
|
4955
|
+
* (CIE 2000, aka CIEDE2000). Current industry standard.
|
|
4956
|
+
*
|
|
4957
|
+
* References:
|
|
4958
|
+
* CIE 15:2004 (Colorimetry), CIE TC1-29 (ΔE2000).
|
|
4959
|
+
* G. Sharma, W. Wu, E.N. Dalal, "The CIEDE2000 Color-Difference Formula"
|
|
4960
|
+
* (Color Research & Application, 2005) — canonical test vectors.
|
|
4961
|
+
*/
|
|
4962
|
+
/**
|
|
4963
|
+
* ΔE*ab (CIE 1976). Simple Euclidean distance in Lab.
|
|
4964
|
+
* Returns the *square* for speed — identify loops only need argmin, and
|
|
4965
|
+
* sqrt is monotonic. Use `deltaE76` if you need the actual distance.
|
|
4966
|
+
*/
|
|
4967
|
+
function deltaE76Squared(p, q) {
|
|
4968
|
+
const dl = p[0] - q[0];
|
|
4969
|
+
const da = p[1] - q[1];
|
|
4970
|
+
const db = p[2] - q[2];
|
|
4971
|
+
return dl * dl + da * da + db * db;
|
|
4972
|
+
}
|
|
4973
|
+
/**
|
|
4974
|
+
* ΔE*94 (CIE 1994). Weights the chroma and hue contributions relative to
|
|
4975
|
+
* Lab Euclidean distance — fixes the "saturated colors feel too far apart"
|
|
4976
|
+
* problem of ΔE*76. Uses graphic-arts constants (kL=1, K1=0.045, K2=0.015).
|
|
4977
|
+
*
|
|
4978
|
+
* Not symmetric in the strict sense (reference vs sample), but we treat
|
|
4979
|
+
* both inputs as graphic-arts samples — the formula reduces to a
|
|
4980
|
+
* symmetric form below.
|
|
4981
|
+
*/
|
|
4982
|
+
function deltaE94(p, q) {
|
|
4983
|
+
const [l1, a1, b1] = p;
|
|
4984
|
+
const [l2, a2, b2] = q;
|
|
4985
|
+
const dL = l1 - l2;
|
|
4986
|
+
const c1 = Math.hypot(a1, b1);
|
|
4987
|
+
const dC = c1 - Math.hypot(a2, b2);
|
|
4988
|
+
const da = a1 - a2;
|
|
4989
|
+
const db = b1 - b2;
|
|
4990
|
+
const dH2 = da * da + db * db - dC * dC;
|
|
4991
|
+
const dH2Safe = dH2 < 0 ? 0 : dH2;
|
|
4992
|
+
const K1 = .045;
|
|
4993
|
+
const K2 = .015;
|
|
4994
|
+
const sL = 1;
|
|
4995
|
+
const sC = 1 + K1 * c1;
|
|
4996
|
+
const sH = 1 + K2 * c1;
|
|
4997
|
+
const termL = dL / sL;
|
|
4998
|
+
const termC = dC / sC;
|
|
4999
|
+
const termH = Math.sqrt(dH2Safe) / sH;
|
|
5000
|
+
return Math.sqrt(termL * termL + termC * termC + termH * termH);
|
|
5001
|
+
}
|
|
5002
|
+
const DEG = Math.PI / 180;
|
|
5003
|
+
const RAD = 180 / Math.PI;
|
|
5004
|
+
function hueDeg(b, a) {
|
|
5005
|
+
if (b === 0 && a === 0) return 0;
|
|
5006
|
+
return (Math.atan2(b, a) * RAD + 360) % 360;
|
|
5007
|
+
}
|
|
5008
|
+
/**
|
|
5009
|
+
* ΔE*00 (CIE 2000 / CIEDE2000). Current industry-standard perceptual
|
|
5010
|
+
* color-difference formula. Fixes the saturated-blue failure of ΔE76/94
|
|
5011
|
+
* with a rotation term in the blue-purple region (h ≈ 275°).
|
|
5012
|
+
*
|
|
5013
|
+
* kL / kC / kH are parametric factors (default 1/1/1 = graphic arts).
|
|
5014
|
+
* Reference: G. Sharma, W. Wu, E.N. Dalal, "The CIEDE2000 Color-Difference
|
|
5015
|
+
* Formula" (Color Research & Application, 2005).
|
|
5016
|
+
*/
|
|
5017
|
+
const POW_25_7 = 6103515625;
|
|
5018
|
+
function pow7(x) {
|
|
5019
|
+
const x2 = x * x;
|
|
5020
|
+
return x2 * x2 * x2 * x;
|
|
5021
|
+
}
|
|
5022
|
+
function deltaE2000(p, q, kL = 1, kC = 1, kH = 1) {
|
|
5023
|
+
const l1 = p[0];
|
|
5024
|
+
const a1 = p[1];
|
|
5025
|
+
const b1 = p[2];
|
|
5026
|
+
const l2 = q[0];
|
|
5027
|
+
const a2 = q[1];
|
|
5028
|
+
const b2 = q[2];
|
|
5029
|
+
const cBar7 = pow7((Math.sqrt(a1 * a1 + b1 * b1) + Math.sqrt(a2 * a2 + b2 * b2)) / 2);
|
|
5030
|
+
const g = .5 * (1 - Math.sqrt(cBar7 / (cBar7 + POW_25_7)));
|
|
5031
|
+
const a1p = (1 + g) * a1;
|
|
5032
|
+
const a2p = (1 + g) * a2;
|
|
5033
|
+
const c1p = Math.sqrt(a1p * a1p + b1 * b1);
|
|
5034
|
+
const c2p = Math.sqrt(a2p * a2p + b2 * b2);
|
|
5035
|
+
const h1p = hueDeg(b1, a1p);
|
|
5036
|
+
const h2p = hueDeg(b2, a2p);
|
|
5037
|
+
const dLp = l2 - l1;
|
|
5038
|
+
const dCp = c2p - c1p;
|
|
5039
|
+
let dhp;
|
|
5040
|
+
if (c1p * c2p === 0) dhp = 0;
|
|
5041
|
+
else {
|
|
5042
|
+
const raw = h2p - h1p;
|
|
5043
|
+
if (Math.abs(raw) <= 180) dhp = raw;
|
|
5044
|
+
else if (raw > 180) dhp = raw - 360;
|
|
5045
|
+
else dhp = raw + 360;
|
|
5046
|
+
}
|
|
5047
|
+
const dHp = 2 * Math.sqrt(c1p * c2p) * Math.sin(dhp * DEG / 2);
|
|
5048
|
+
const lBarP = (l1 + l2) / 2;
|
|
5049
|
+
const cBarP = (c1p + c2p) / 2;
|
|
5050
|
+
let hBarP;
|
|
5051
|
+
if (c1p * c2p === 0) hBarP = h1p + h2p;
|
|
5052
|
+
else if (Math.abs(h1p - h2p) <= 180) hBarP = (h1p + h2p) / 2;
|
|
5053
|
+
else if (h1p + h2p < 360) hBarP = (h1p + h2p + 360) / 2;
|
|
5054
|
+
else hBarP = (h1p + h2p - 360) / 2;
|
|
5055
|
+
const hBarRad = hBarP * DEG;
|
|
5056
|
+
const t = 1 - .17 * Math.cos(hBarRad - 30 * DEG) + .24 * Math.cos(2 * hBarRad) + .32 * Math.cos(3 * hBarRad + 6 * DEG) - .2 * Math.cos(4 * hBarRad - 63 * DEG);
|
|
5057
|
+
const lBarMinus50Sq = (lBarP - 50) ** 2;
|
|
5058
|
+
const sL = 1 + .015 * lBarMinus50Sq / Math.sqrt(20 + lBarMinus50Sq);
|
|
5059
|
+
const sC = 1 + .045 * cBarP;
|
|
5060
|
+
const sH = 1 + .015 * cBarP * t;
|
|
5061
|
+
const hShift = (hBarP - 275) / 25;
|
|
5062
|
+
const dTheta = 30 * Math.exp(-(hShift * hShift));
|
|
5063
|
+
const cBarP7 = pow7(cBarP);
|
|
5064
|
+
const rC = 2 * Math.sqrt(cBarP7 / (cBarP7 + POW_25_7));
|
|
5065
|
+
const rT = -Math.sin(2 * dTheta * DEG) * rC;
|
|
5066
|
+
const termL = dLp / (kL * sL);
|
|
5067
|
+
const termC = dCp / (kC * sC);
|
|
5068
|
+
const termH = dHp / (kH * sH);
|
|
5069
|
+
return Math.sqrt(termL * termL + termC * termC + termH * termH + rT * termC * termH);
|
|
5070
|
+
}
|
|
5071
|
+
/**
|
|
5072
|
+
* Squared Euclidean distance in OKLAB space (Björn Ottosson, 2020).
|
|
5073
|
+
* OKLAB is perceptually uniform by construction — plain Euclidean IS the
|
|
5074
|
+
* perceptual distance, no weighting needed. Returns the square for
|
|
5075
|
+
* argmin speed; `deltaEok` returns the actual distance.
|
|
5076
|
+
*
|
|
5077
|
+
* Often gives more visually-accurate nearest-matches than CIEDE2000 in
|
|
5078
|
+
* the saturated blue/purple region.
|
|
5079
|
+
*
|
|
5080
|
+
* NOTE: the body is byte-identical to `deltaE76Squared` — both compute
|
|
5081
|
+
* `dl² + da² + db²`. The semantic difference is entirely in *which* space
|
|
5082
|
+
* the caller passes coordinates from: CIELAB (for ΔE*76) vs OKLAB (for this).
|
|
5083
|
+
* Kept separate so callers and tests can't cross-wire the indexes.
|
|
5084
|
+
*/
|
|
5085
|
+
function deltaEokSquared(p, q) {
|
|
5086
|
+
const dl = p[0] - q[0];
|
|
5087
|
+
const da = p[1] - q[1];
|
|
5088
|
+
const db = p[2] - q[2];
|
|
5089
|
+
return dl * dl + da * da + db * db;
|
|
5090
|
+
}
|
|
5091
|
+
//#endregion
|
|
5092
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/math/euclideanDistance.js
|
|
5093
|
+
/**
|
|
5094
|
+
* Squared Euclidean distance between two colors in RGB space.
|
|
5095
|
+
* Alpha channel is ignored. Faster than `euclideanDistance` — use this
|
|
5096
|
+
* when you only need to compare or minimize (sqrt is monotonic, so
|
|
5097
|
+
* argmin(d) === argmin(d²)).
|
|
5098
|
+
*/
|
|
5099
|
+
function squaredDistanceRgb(a, b) {
|
|
5100
|
+
const dr = a.r - b.r;
|
|
5101
|
+
const dg = a.g - b.g;
|
|
5102
|
+
const db = a.b - b.b;
|
|
5103
|
+
return dr * dr + dg * dg + db * db;
|
|
5104
|
+
}
|
|
5105
|
+
//#endregion
|
|
5106
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/indexing.js
|
|
5107
|
+
const nameIndexCache = /* @__PURE__ */ new WeakMap();
|
|
5108
|
+
const rgbaIndexCache = /* @__PURE__ */ new WeakMap();
|
|
5109
|
+
/**
|
|
5110
|
+
* Normalized-name → canonical-key map for a given palette. Built once
|
|
5111
|
+
* per palette using its own `normalize` function.
|
|
5112
|
+
*/
|
|
5113
|
+
function getNameIndex(space) {
|
|
5114
|
+
let idx = nameIndexCache.get(space);
|
|
5115
|
+
if (idx === void 0) {
|
|
5116
|
+
idx = /* @__PURE__ */ new Map();
|
|
5117
|
+
const { normalize } = space;
|
|
5118
|
+
for (const key of Object.keys(space.colors)) idx.set(normalize(key), key);
|
|
5119
|
+
nameIndexCache.set(space, idx);
|
|
5120
|
+
}
|
|
5121
|
+
return idx;
|
|
5122
|
+
}
|
|
5123
|
+
/**
|
|
5124
|
+
* Canonical-key → Rgba entries for a given palette, built by parsing
|
|
5125
|
+
* each hex value once. Used by nearest-match lookups (identify, rgbaToPantone).
|
|
5126
|
+
*/
|
|
5127
|
+
function getRgbaIndex(space) {
|
|
5128
|
+
let idx = rgbaIndexCache.get(space);
|
|
5129
|
+
if (idx === void 0) {
|
|
5130
|
+
idx = Object.entries(space.colors).map(([name, hex]) => [name, hexToRgba(hex)]);
|
|
5131
|
+
rgbaIndexCache.set(space, idx);
|
|
5132
|
+
}
|
|
5133
|
+
return idx;
|
|
5134
|
+
}
|
|
5135
|
+
/**
|
|
5136
|
+
* Find the nearest-named entry in a palette to the given Rgba, using
|
|
5137
|
+
* squared Euclidean distance in sRGB (alpha ignored). Used by `identify`
|
|
5138
|
+
* and `rgbaToPantone` when metric === 'euclidean-srgb'.
|
|
5139
|
+
*/
|
|
5140
|
+
function nearestByRgb(target, space) {
|
|
5141
|
+
const entries = getRgbaIndex(space);
|
|
5142
|
+
let bestName = entries[0]?.[0] ?? "";
|
|
5143
|
+
let bestDistance = Number.POSITIVE_INFINITY;
|
|
5144
|
+
for (const [name, candidate] of entries) {
|
|
5145
|
+
const d = squaredDistanceRgb(target, candidate);
|
|
5146
|
+
if (d < bestDistance) {
|
|
5147
|
+
bestDistance = d;
|
|
5148
|
+
bestName = name;
|
|
5149
|
+
}
|
|
5150
|
+
}
|
|
5151
|
+
return bestName;
|
|
5152
|
+
}
|
|
5153
|
+
const labIndexCache = /* @__PURE__ */ new WeakMap();
|
|
5154
|
+
function getLabIndex(space) {
|
|
5155
|
+
let idx = labIndexCache.get(space);
|
|
5156
|
+
if (idx === void 0) {
|
|
5157
|
+
idx = getRgbaIndex(space).map(([name, rgba]) => [name, rgbaToLab(rgba)]);
|
|
5158
|
+
labIndexCache.set(space, idx);
|
|
5159
|
+
}
|
|
5160
|
+
return idx;
|
|
5161
|
+
}
|
|
5162
|
+
const linearIndexCache = /* @__PURE__ */ new WeakMap();
|
|
5163
|
+
function getLinearIndex(space) {
|
|
5164
|
+
let idx = linearIndexCache.get(space);
|
|
5165
|
+
if (idx === void 0) {
|
|
5166
|
+
idx = getRgbaIndex(space).map(([name, rgba]) => [name, rgbaToLinearRgb(rgba)]);
|
|
5167
|
+
linearIndexCache.set(space, idx);
|
|
5168
|
+
}
|
|
5169
|
+
return idx;
|
|
5170
|
+
}
|
|
5171
|
+
const oklabIndexCache = /* @__PURE__ */ new WeakMap();
|
|
5172
|
+
function getOklabIndex(space) {
|
|
5173
|
+
let idx = oklabIndexCache.get(space);
|
|
5174
|
+
if (idx === void 0) {
|
|
5175
|
+
idx = getRgbaIndex(space).map(([name, rgba]) => [name, rgbaToOklab(rgba)]);
|
|
5176
|
+
oklabIndexCache.set(space, idx);
|
|
5177
|
+
}
|
|
5178
|
+
return idx;
|
|
5179
|
+
}
|
|
5180
|
+
/**
|
|
5181
|
+
* Generic argmin over an `[name, value]` entries array with a custom
|
|
5182
|
+
* distance function. Factored so the three metric branches in `nearest`
|
|
5183
|
+
* share one loop body instead of duplicating it three times.
|
|
5184
|
+
*/
|
|
5185
|
+
function argminBy(entries, target, dist) {
|
|
5186
|
+
let bestName = entries[0]?.[0] ?? "";
|
|
5187
|
+
let bestDistance = Number.POSITIVE_INFINITY;
|
|
5188
|
+
for (const [name, candidate] of entries) {
|
|
5189
|
+
const d = dist(target, candidate);
|
|
5190
|
+
if (d < bestDistance) {
|
|
5191
|
+
bestDistance = d;
|
|
5192
|
+
bestName = name;
|
|
5193
|
+
}
|
|
5194
|
+
}
|
|
5195
|
+
return bestName;
|
|
5196
|
+
}
|
|
5197
|
+
function squaredDistanceTriple(a, b) {
|
|
5198
|
+
const d0 = a[0] - b[0];
|
|
5199
|
+
const d1 = a[1] - b[1];
|
|
5200
|
+
const d2 = a[2] - b[2];
|
|
5201
|
+
return d0 * d0 + d1 * d1 + d2 * d2;
|
|
5202
|
+
}
|
|
5203
|
+
/**
|
|
5204
|
+
* Find the nearest-named entry in a palette under the specified distance
|
|
5205
|
+
* metric. Dispatches to the right index (rgba / linear-rgb / Lab) and
|
|
5206
|
+
* the right distance function. See `DistanceMetric` in types.ts for how
|
|
5207
|
+
* to pick a metric.
|
|
5208
|
+
*
|
|
5209
|
+
* `metric` is required — callers should pass `space.defaultMetric` if
|
|
5210
|
+
* they want the palette's declared preference. A silent default would
|
|
5211
|
+
* hide the distance-metric choice from the hot path.
|
|
5212
|
+
*/
|
|
5213
|
+
function nearest(target, space, metric) {
|
|
5214
|
+
if (metric === "euclidean-srgb") return nearestByRgb(target, space);
|
|
5215
|
+
if (metric === "euclidean-linear") return argminBy(getLinearIndex(space), rgbaToLinearRgb(target), squaredDistanceTriple);
|
|
5216
|
+
if (metric === "deltaEok") return argminBy(getOklabIndex(space), rgbaToOklab(target), deltaEokSquared);
|
|
5217
|
+
const labTarget = rgbaToLab(target);
|
|
5218
|
+
const labIndex = getLabIndex(space);
|
|
5219
|
+
if (metric === "deltaE76") return argminBy(labIndex, labTarget, deltaE76Squared);
|
|
5220
|
+
if (metric === "deltaE94") return argminBy(labIndex, labTarget, deltaE94);
|
|
5221
|
+
return argminBy(labIndex, labTarget, deltaE2000);
|
|
5222
|
+
}
|
|
5223
|
+
/**
|
|
5224
|
+
* Rank every palette entry by distance to `target`. Returns an array of
|
|
5225
|
+
* `{ name, distance }` sorted ascending (nearest first). Optional `k`
|
|
5226
|
+
* truncates to the top-k matches.
|
|
5227
|
+
*
|
|
5228
|
+
* Distances are **real** metric values (not squared) — ΔE76 / ΔE94 /
|
|
5229
|
+
* ΔE2000 / ΔE-OK are in standard ΔE units (≈1 = just-noticeable for
|
|
5230
|
+
* most of the gamut on ΔE76/2000); `euclidean-srgb` / `euclidean-linear`
|
|
5231
|
+
* are in their respective channel-unit Euclidean distances.
|
|
5232
|
+
*
|
|
5233
|
+
* Cost:
|
|
5234
|
+
* - `k < n`: O(n · k) via bounded insertion-sort; much faster than a
|
|
5235
|
+
* full sort for small k on cheap metrics where allocation dominates.
|
|
5236
|
+
* - `k >= n` or `k === undefined`: O(n log n) via full push-and-sort,
|
|
5237
|
+
* returning every entry ranked.
|
|
5238
|
+
*
|
|
5239
|
+
* Tie-breaking: on exact-distance ties, the first-declared entry in
|
|
5240
|
+
* the palette's `colors` object wins. Matches the single-match
|
|
5241
|
+
* `nearest` contract.
|
|
5242
|
+
*
|
|
5243
|
+
* `k` normalization is forgiving: fractional values are rounded,
|
|
5244
|
+
* negatives clamp to 0, and `NaN` / `±Infinity` collapse to 0
|
|
5245
|
+
* (empty result). No throws.
|
|
5246
|
+
*/
|
|
5247
|
+
function nearestAll(target, space, metric, k) {
|
|
5248
|
+
const rgbaIndex = getRgbaIndex(space);
|
|
5249
|
+
const n = rgbaIndex.length;
|
|
5250
|
+
const safeK = k === void 0 ? n : Number.isFinite(k) ? Math.max(0, Math.round(k)) : 0;
|
|
5251
|
+
if (safeK === 0) return [];
|
|
5252
|
+
const useBounded = safeK < n;
|
|
5253
|
+
const best = [];
|
|
5254
|
+
const offer = useBounded ? (name, dist) => {
|
|
5255
|
+
if (best.length < safeK) {
|
|
5256
|
+
let j = best.length;
|
|
5257
|
+
while (j > 0 && best[j - 1].distance > dist) j--;
|
|
5258
|
+
best.splice(j, 0, {
|
|
5259
|
+
name,
|
|
5260
|
+
distance: dist
|
|
5261
|
+
});
|
|
5262
|
+
} else if (dist < best[safeK - 1].distance) {
|
|
5263
|
+
let j = safeK - 1;
|
|
5264
|
+
while (j > 0 && best[j - 1].distance > dist) j--;
|
|
5265
|
+
best.splice(j, 0, {
|
|
5266
|
+
name,
|
|
5267
|
+
distance: dist
|
|
5268
|
+
});
|
|
5269
|
+
best.pop();
|
|
5270
|
+
}
|
|
5271
|
+
} : (name, dist) => {
|
|
5272
|
+
best.push({
|
|
5273
|
+
name,
|
|
5274
|
+
distance: dist
|
|
5275
|
+
});
|
|
5276
|
+
};
|
|
5277
|
+
if (metric === "euclidean-srgb") for (const [name, candidate] of rgbaIndex) offer(name, Math.sqrt(squaredDistanceRgb(target, candidate)));
|
|
5278
|
+
else if (metric === "euclidean-linear") {
|
|
5279
|
+
const tgt = rgbaToLinearRgb(target);
|
|
5280
|
+
for (const [name, candidate] of getLinearIndex(space)) offer(name, Math.sqrt(squaredDistanceTriple(tgt, candidate)));
|
|
5281
|
+
} else if (metric === "deltaEok") {
|
|
5282
|
+
const tgt = rgbaToOklab(target);
|
|
5283
|
+
for (const [name, candidate] of getOklabIndex(space)) offer(name, Math.sqrt(deltaEokSquared(tgt, candidate)));
|
|
5284
|
+
} else {
|
|
5285
|
+
const tgt = rgbaToLab(target);
|
|
5286
|
+
const labIndex = getLabIndex(space);
|
|
5287
|
+
if (metric === "deltaE76") for (const [name, candidate] of labIndex) offer(name, Math.sqrt(deltaE76Squared(tgt, candidate)));
|
|
5288
|
+
else if (metric === "deltaE94") for (const [name, candidate] of labIndex) offer(name, deltaE94(tgt, candidate));
|
|
5289
|
+
else for (const [name, candidate] of labIndex) offer(name, deltaE2000(tgt, candidate));
|
|
5290
|
+
}
|
|
5291
|
+
if (!useBounded) best.sort((a, b) => a.distance - b.distance);
|
|
5292
|
+
return best;
|
|
5293
|
+
}
|
|
5294
|
+
//#endregion
|
|
5295
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/palettes/normalize.js
|
|
5296
|
+
/**
|
|
5297
|
+
* Name normalizers used by palettes.
|
|
5298
|
+
*
|
|
5299
|
+
* Tree-shake note: this module has zero imports beyond a type. Palette
|
|
5300
|
+
* modules (`web`, `x11`, `pantone`, or user BYO palettes) can reference
|
|
5301
|
+
* these without dragging in the full `indexing.ts` graph, which pulls
|
|
5302
|
+
* math modules needed only when `identify` / `resolve` actually runs.
|
|
5303
|
+
*/
|
|
5304
|
+
/** Lowercase + strip non-alphanumeric. Works for web, x11, and most BYO. */
|
|
5305
|
+
const standardNormalize = (s) => s.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
5306
|
+
//#endregion
|
|
5307
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/conversions/rgb.js
|
|
5308
|
+
const RGB_RE = /^rgba?\s*\(\s*(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s*(?:,\s*(\d+(?:\.\d+)?|\.\d+)\s*)?\)$/i;
|
|
5309
|
+
function sanitizeChannel(n, label) {
|
|
5310
|
+
return clamp(requireFinite(n, label), 0, 255);
|
|
5311
|
+
}
|
|
5312
|
+
function sanitizeAlpha(n) {
|
|
5313
|
+
return clamp(requireFinite(n, "alpha"), 0, 1);
|
|
5314
|
+
}
|
|
5315
|
+
/**
|
|
5316
|
+
* Normalize any RGB/RGBA input shape (string, tuple, or object) into
|
|
5317
|
+
* the canonical Rgba representation. Alpha defaults to 1 when absent.
|
|
5318
|
+
* Rejects non-finite numeric inputs; clamps r/g/b to [0,255] and a to [0,1].
|
|
5319
|
+
* Throws on malformed strings. String parsing is linear-time; no polynomial
|
|
5320
|
+
* backtracking on pathological input. Leading-dot alpha (e.g. `.5`) is
|
|
5321
|
+
* accepted per the CSS Color spec.
|
|
5322
|
+
*
|
|
5323
|
+
* @example
|
|
5324
|
+
* rgbToRgba('rgba(255, 0, 0, .5)');
|
|
5325
|
+
* // => { r: 255, g: 0, b: 0, a: 0.5 }
|
|
5326
|
+
*/
|
|
5327
|
+
function rgbToRgba(input) {
|
|
5328
|
+
if (Array.isArray(input)) {
|
|
5329
|
+
const rawA = input.length === 4 ? input[3] : 1;
|
|
5330
|
+
return {
|
|
5331
|
+
r: sanitizeChannel(input[0], "r"),
|
|
5332
|
+
g: sanitizeChannel(input[1], "g"),
|
|
5333
|
+
b: sanitizeChannel(input[2], "b"),
|
|
5334
|
+
a: sanitizeAlpha(rawA)
|
|
5335
|
+
};
|
|
5336
|
+
}
|
|
5337
|
+
if (typeof input === "string") {
|
|
5338
|
+
const match = RGB_RE.exec(input);
|
|
5339
|
+
if (!match) throw new Error(`Invalid rgb(a) string: ${input}`);
|
|
5340
|
+
return {
|
|
5341
|
+
r: sanitizeChannel(Number(match[1]), "r"),
|
|
5342
|
+
g: sanitizeChannel(Number(match[2]), "g"),
|
|
5343
|
+
b: sanitizeChannel(Number(match[3]), "b"),
|
|
5344
|
+
a: sanitizeAlpha(match[4] !== void 0 ? Number(match[4]) : 1)
|
|
5345
|
+
};
|
|
5346
|
+
}
|
|
5347
|
+
const obj = input;
|
|
5348
|
+
return {
|
|
5349
|
+
r: sanitizeChannel(obj.r, "r"),
|
|
5350
|
+
g: sanitizeChannel(obj.g, "g"),
|
|
5351
|
+
b: sanitizeChannel(obj.b, "b"),
|
|
5352
|
+
a: sanitizeAlpha("a" in obj ? obj.a : 1)
|
|
5353
|
+
};
|
|
5354
|
+
}
|
|
5355
|
+
//#endregion
|
|
5356
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/convert.js
|
|
5357
|
+
function safeStringify(x) {
|
|
5358
|
+
if (x === void 0) return "undefined";
|
|
5359
|
+
try {
|
|
5360
|
+
const s = JSON.stringify(x);
|
|
5361
|
+
return s === void 0 ? String(x) : s;
|
|
5362
|
+
} catch {
|
|
5363
|
+
return Object.prototype.toString.call(x);
|
|
5364
|
+
}
|
|
5365
|
+
}
|
|
5366
|
+
/**
|
|
5367
|
+
* Normalize any recognized color input to canonical `Rgba`.
|
|
5368
|
+
* Pass `knownFormat` when the caller has already run `detectFormat` to skip
|
|
5369
|
+
* the redundant detection. Throws on `UNKNOWN` input.
|
|
5370
|
+
*
|
|
5371
|
+
* Palette names (Pantone codes, BYO keys) are not accepted here; they
|
|
5372
|
+
* require palette data to parse. Use `convert(name, { palette })` or
|
|
5373
|
+
* `resolve(name, { palette })` at the higher level.
|
|
5374
|
+
*
|
|
5375
|
+
* @example
|
|
5376
|
+
* toRgba('#ff0000'); // { r: 255, g: 0, b: 0, a: 1 }
|
|
5377
|
+
* toRgba('rgb(255, 0, 0)'); // { r: 255, g: 0, b: 0, a: 1 }
|
|
5378
|
+
* toRgba([255, 0, 0]); // { r: 255, g: 0, b: 0, a: 1 }
|
|
5379
|
+
* toRgba({ h: 0, s: 100, l: 50 }); // { r: 255, g: 0, b: 0, a: 1 }
|
|
5380
|
+
*/
|
|
5381
|
+
function toRgba(input, knownFormat) {
|
|
5382
|
+
switch (knownFormat ?? detectFormat(input)) {
|
|
5383
|
+
case "HEX": return hexToRgba(input);
|
|
5384
|
+
case "RGB": return rgbToRgba(input);
|
|
5385
|
+
case "RGBA": return rgbToRgba(input);
|
|
5386
|
+
case "HSL": return hslToRgba(input);
|
|
5387
|
+
case "HSV": return hsvToRgba(input);
|
|
5388
|
+
default: throw new Error(`Unrecognized color input: ${safeStringify(input)}`);
|
|
5389
|
+
}
|
|
5390
|
+
}
|
|
5391
|
+
/**
|
|
5392
|
+
* The CSS / SVG named-color palette. Default target of `identify`,
|
|
5393
|
+
* `resolve`, and `convert` when no `palette` option is provided.
|
|
5394
|
+
*
|
|
5395
|
+
* @example
|
|
5396
|
+
* identify('#ff8080'); // 'lightcoral'
|
|
5397
|
+
* resolve('rebeccapurple'); // '#663399'
|
|
5398
|
+
* convert('rebeccapurple', { palette: web }); // '#663399'
|
|
5399
|
+
* web.colors.crimson; // '#dc143c'
|
|
5400
|
+
*/
|
|
5401
|
+
const web = {
|
|
5402
|
+
name: "web",
|
|
5403
|
+
colors: {
|
|
5404
|
+
aliceblue: "#f0f8ff",
|
|
5405
|
+
antiquewhite: "#faebd7",
|
|
5406
|
+
aqua: "#00ffff",
|
|
5407
|
+
aquamarine: "#7fffd4",
|
|
5408
|
+
azure: "#f0ffff",
|
|
5409
|
+
beige: "#f5f5dc",
|
|
5410
|
+
bisque: "#ffe4c4",
|
|
5411
|
+
black: "#000000",
|
|
5412
|
+
blanchedalmond: "#ffebcd",
|
|
5413
|
+
blue: "#0000ff",
|
|
5414
|
+
blueviolet: "#8a2be2",
|
|
5415
|
+
brown: "#a52a2a",
|
|
5416
|
+
burlywood: "#deb887",
|
|
5417
|
+
cadetblue: "#5f9ea0",
|
|
5418
|
+
chartreuse: "#7fff00",
|
|
5419
|
+
chocolate: "#d2691e",
|
|
5420
|
+
coral: "#ff7f50",
|
|
5421
|
+
cornflowerblue: "#6495ed",
|
|
5422
|
+
cornsilk: "#fff8dc",
|
|
5423
|
+
crimson: "#dc143c",
|
|
5424
|
+
cyan: "#00ffff",
|
|
5425
|
+
darkblue: "#00008b",
|
|
5426
|
+
darkcyan: "#008b8b",
|
|
5427
|
+
darkgoldenrod: "#b8860b",
|
|
5428
|
+
darkgray: "#a9a9a9",
|
|
5429
|
+
darkgreen: "#006400",
|
|
5430
|
+
darkgrey: "#a9a9a9",
|
|
5431
|
+
darkkhaki: "#bdb76b",
|
|
5432
|
+
darkmagenta: "#8b008b",
|
|
5433
|
+
darkolivegreen: "#556b2f",
|
|
5434
|
+
darkorange: "#ff8c00",
|
|
5435
|
+
darkorchid: "#9932cc",
|
|
5436
|
+
darkred: "#8b0000",
|
|
5437
|
+
darksalmon: "#e9967a",
|
|
5438
|
+
darkseagreen: "#8fbc8f",
|
|
5439
|
+
darkslateblue: "#483d8b",
|
|
5440
|
+
darkslategray: "#2f4f4f",
|
|
5441
|
+
darkslategrey: "#2f4f4f",
|
|
5442
|
+
darkturquoise: "#00ced1",
|
|
5443
|
+
darkviolet: "#9400d3",
|
|
5444
|
+
deeppink: "#ff1493",
|
|
5445
|
+
deepskyblue: "#00bfff",
|
|
5446
|
+
dimgray: "#696969",
|
|
5447
|
+
dimgrey: "#696969",
|
|
5448
|
+
dodgerblue: "#1e90ff",
|
|
5449
|
+
firebrick: "#b22222",
|
|
5450
|
+
floralwhite: "#fffaf0",
|
|
5451
|
+
forestgreen: "#228b22",
|
|
5452
|
+
fuchsia: "#ff00ff",
|
|
5453
|
+
gainsboro: "#dcdcdc",
|
|
5454
|
+
ghostwhite: "#f8f8ff",
|
|
5455
|
+
goldenrod: "#daa520",
|
|
5456
|
+
gold: "#ffd700",
|
|
5457
|
+
gray: "#808080",
|
|
5458
|
+
green: "#008000",
|
|
5459
|
+
greenyellow: "#adff2f",
|
|
5460
|
+
grey: "#808080",
|
|
5461
|
+
honeydew: "#f0fff0",
|
|
5462
|
+
hotpink: "#ff69b4",
|
|
5463
|
+
indianred: "#cd5c5c",
|
|
5464
|
+
indigo: "#4b0082",
|
|
5465
|
+
ivory: "#fffff0",
|
|
5466
|
+
khaki: "#f0e68c",
|
|
5467
|
+
lavenderblush: "#fff0f5",
|
|
5468
|
+
lavender: "#e6e6fa",
|
|
5469
|
+
lawngreen: "#7cfc00",
|
|
5470
|
+
lemonchiffon: "#fffacd",
|
|
5471
|
+
lightblue: "#add8e6",
|
|
5472
|
+
lightcoral: "#f08080",
|
|
5473
|
+
lightcyan: "#e0ffff",
|
|
5474
|
+
lightgoldenrodyellow: "#fafad2",
|
|
5475
|
+
lightgray: "#d3d3d3",
|
|
5476
|
+
lightgreen: "#90ee90",
|
|
5477
|
+
lightgrey: "#d3d3d3",
|
|
5478
|
+
lightpink: "#ffb6c1",
|
|
5479
|
+
lightsalmon: "#ffa07a",
|
|
5480
|
+
lightseagreen: "#20b2aa",
|
|
5481
|
+
lightskyblue: "#87cefa",
|
|
5482
|
+
lightslategray: "#778899",
|
|
5483
|
+
lightslategrey: "#778899",
|
|
5484
|
+
lightsteelblue: "#b0c4de",
|
|
5485
|
+
lightyellow: "#ffffe0",
|
|
5486
|
+
lime: "#00ff00",
|
|
5487
|
+
limegreen: "#32cd32",
|
|
5488
|
+
linen: "#faf0e6",
|
|
5489
|
+
magenta: "#ff00ff",
|
|
5490
|
+
maroon: "#800000",
|
|
5491
|
+
mediumaquamarine: "#66cdaa",
|
|
5492
|
+
mediumblue: "#0000cd",
|
|
5493
|
+
mediumorchid: "#ba55d3",
|
|
5494
|
+
mediumpurple: "#9370db",
|
|
5495
|
+
mediumseagreen: "#3cb371",
|
|
5496
|
+
mediumslateblue: "#7b68ee",
|
|
5497
|
+
mediumspringgreen: "#00fa9a",
|
|
5498
|
+
mediumturquoise: "#48d1cc",
|
|
5499
|
+
mediumvioletred: "#c71585",
|
|
5500
|
+
midnightblue: "#191970",
|
|
5501
|
+
mintcream: "#f5fffa",
|
|
5502
|
+
mistyrose: "#ffe4e1",
|
|
5503
|
+
moccasin: "#ffe4b5",
|
|
5504
|
+
navajowhite: "#ffdead",
|
|
5505
|
+
navy: "#000080",
|
|
5506
|
+
oldlace: "#fdf5e6",
|
|
5507
|
+
olive: "#808000",
|
|
5508
|
+
olivedrab: "#6b8e23",
|
|
5509
|
+
orange: "#ffa500",
|
|
5510
|
+
orangered: "#ff4500",
|
|
5511
|
+
orchid: "#da70d6",
|
|
5512
|
+
palegoldenrod: "#eee8aa",
|
|
5513
|
+
palegreen: "#98fb98",
|
|
5514
|
+
paleturquoise: "#afeeee",
|
|
5515
|
+
palevioletred: "#db7093",
|
|
5516
|
+
papayawhip: "#ffefd5",
|
|
5517
|
+
peachpuff: "#ffdab9",
|
|
5518
|
+
peru: "#cd853f",
|
|
5519
|
+
pink: "#ffc0cb",
|
|
5520
|
+
plum: "#dda0dd",
|
|
5521
|
+
powderblue: "#b0e0e6",
|
|
5522
|
+
purple: "#800080",
|
|
5523
|
+
rebeccapurple: "#663399",
|
|
5524
|
+
red: "#ff0000",
|
|
5525
|
+
rosybrown: "#bc8f8f",
|
|
5526
|
+
royalblue: "#4169e1",
|
|
5527
|
+
saddlebrown: "#8b4513",
|
|
5528
|
+
salmon: "#fa8072",
|
|
5529
|
+
sandybrown: "#f4a460",
|
|
5530
|
+
seagreen: "#2e8b57",
|
|
5531
|
+
seashell: "#fff5ee",
|
|
5532
|
+
sienna: "#a0522d",
|
|
5533
|
+
silver: "#c0c0c0",
|
|
5534
|
+
skyblue: "#87ceeb",
|
|
5535
|
+
slateblue: "#6a5acd",
|
|
5536
|
+
slategray: "#708090",
|
|
5537
|
+
slategrey: "#708090",
|
|
5538
|
+
snow: "#fffafa",
|
|
5539
|
+
springgreen: "#00ff7f",
|
|
5540
|
+
steelblue: "#4682b4",
|
|
5541
|
+
tan: "#d2b48c",
|
|
5542
|
+
teal: "#008080",
|
|
5543
|
+
thistle: "#d8bfd8",
|
|
5544
|
+
tomato: "#ff6347",
|
|
5545
|
+
turquoise: "#40e0d0",
|
|
5546
|
+
violet: "#ee82ee",
|
|
5547
|
+
wheat: "#f5deb3",
|
|
5548
|
+
white: "#ffffff",
|
|
5549
|
+
whitesmoke: "#f5f5f5",
|
|
5550
|
+
yellow: "#ffff00",
|
|
5551
|
+
yellowgreen: "#9acd32"
|
|
5552
|
+
},
|
|
5553
|
+
normalize: standardNormalize,
|
|
5554
|
+
defaultMetric: "deltaE76"
|
|
5555
|
+
};
|
|
5556
|
+
//#endregion
|
|
5557
|
+
//#region node_modules/.pnpm/chromonym@3.5.0/node_modules/chromonym/dist/identify.js
|
|
5558
|
+
/**
|
|
5559
|
+
* Parse a string input that may be a color literal or a palette name.
|
|
5560
|
+
* Returns the canonical Rgba, or `null` if nothing matches.
|
|
5561
|
+
*/
|
|
5562
|
+
function parseInput(input, source) {
|
|
5563
|
+
const detected = detectFormat(input);
|
|
5564
|
+
if (detected !== "UNKNOWN") return toRgba(input, detected);
|
|
5565
|
+
if (source !== void 0 && typeof input === "string") {
|
|
5566
|
+
const canonical = getNameIndex(source).get(source.normalize(input));
|
|
5567
|
+
if (canonical === void 0) return null;
|
|
5568
|
+
const hex = source.colors[canonical];
|
|
5569
|
+
if (hex === void 0) return null;
|
|
5570
|
+
return hexToRgba(hex);
|
|
5571
|
+
}
|
|
5572
|
+
return null;
|
|
5573
|
+
}
|
|
5574
|
+
function identify(input, opts = {}) {
|
|
5575
|
+
const palette = opts.palette ?? web;
|
|
5576
|
+
const metric = opts.metric ?? palette.defaultMetric;
|
|
5577
|
+
const rgba = parseInput(input, opts.source);
|
|
5578
|
+
if (opts.k !== void 0) {
|
|
5579
|
+
if (rgba === null) return [];
|
|
5580
|
+
return nearestAll(rgba, palette, metric, opts.k).map((m) => {
|
|
5581
|
+
const value = palette.colors[m.name];
|
|
5582
|
+
return {
|
|
5583
|
+
name: m.name,
|
|
5584
|
+
value,
|
|
5585
|
+
distance: m.distance
|
|
5586
|
+
};
|
|
5587
|
+
});
|
|
5588
|
+
}
|
|
5589
|
+
if (rgba === null) return null;
|
|
5590
|
+
return nearest(rgba, palette, metric) || null;
|
|
5591
|
+
}
|
|
5592
|
+
/**
|
|
5593
|
+
* Name That Color (NTC): Chirag Mehta's broad color-name dataset.
|
|
5594
|
+
* 1566 entries covering design, fashion, and common
|
|
5595
|
+
* hardware / UI colors that CSS and X11 don't name. Default metric
|
|
5596
|
+
* is CIEDE2000 for best ranking across the dense saturated regions;
|
|
5597
|
+
* override per call with `'deltaEok'` for a cheaper perceptual
|
|
5598
|
+
* metric when scrubbing many colors per second.
|
|
5599
|
+
*
|
|
5600
|
+
* @example
|
|
5601
|
+
* identify('#bada55', { palette: ntc }); // 'Conifer'
|
|
5602
|
+
* resolve('International Klein Blue', { palette: ntc }); // '#002fa7'
|
|
5603
|
+
* ntc.colors.Stratos; // '#000741'
|
|
5604
|
+
*/
|
|
5605
|
+
const ntc = {
|
|
5606
|
+
name: "ntc",
|
|
5607
|
+
colors: {
|
|
5608
|
+
Abbey: "#4c4f56",
|
|
5609
|
+
Acadia: "#1b1404",
|
|
5610
|
+
Acapulco: "#7cb0a1",
|
|
5611
|
+
"Aero Blue": "#c9ffe5",
|
|
5612
|
+
Affair: "#714693",
|
|
5613
|
+
Akaroa: "#d4c4a8",
|
|
5614
|
+
Alabaster: "#fafafa",
|
|
5615
|
+
"Albescent White": "#f5e9d3",
|
|
5616
|
+
"Algae Green": "#93dfb8",
|
|
5617
|
+
"Alice Blue": "#f0f8ff",
|
|
5618
|
+
"Alizarin Crimson": "#e32636",
|
|
5619
|
+
Allports: "#0076a3",
|
|
5620
|
+
Almond: "#eed9c4",
|
|
5621
|
+
"Almond Frost": "#907b71",
|
|
5622
|
+
Alpine: "#af8f2c",
|
|
5623
|
+
Alto: "#dbdbdb",
|
|
5624
|
+
Aluminium: "#a9acb6",
|
|
5625
|
+
Amaranth: "#e52b50",
|
|
5626
|
+
Amazon: "#3b7a57",
|
|
5627
|
+
Amber: "#ffbf00",
|
|
5628
|
+
Americano: "#87756e",
|
|
5629
|
+
Amethyst: "#9966cc",
|
|
5630
|
+
"Amethyst Smoke": "#a397b4",
|
|
5631
|
+
Amour: "#f9eaf3",
|
|
5632
|
+
Amulet: "#7b9f80",
|
|
5633
|
+
Anakiwa: "#9de5ff",
|
|
5634
|
+
"Antique Brass": "#c88a65",
|
|
5635
|
+
"Antique Bronze": "#704a07",
|
|
5636
|
+
Anzac: "#e0b646",
|
|
5637
|
+
Apache: "#dfbe6f",
|
|
5638
|
+
Apple: "#4fa83d",
|
|
5639
|
+
"Apple Blossom": "#af4d43",
|
|
5640
|
+
"Apple Green": "#e2f3ec",
|
|
5641
|
+
Apricot: "#eb9373",
|
|
5642
|
+
"Apricot Peach": "#fbceb1",
|
|
5643
|
+
"Apricot White": "#fffeec",
|
|
5644
|
+
"Aqua Deep": "#014b43",
|
|
5645
|
+
"Aqua Forest": "#5fa777",
|
|
5646
|
+
"Aqua Haze": "#edf5f5",
|
|
5647
|
+
"Aqua Island": "#a1dad7",
|
|
5648
|
+
"Aqua Spring": "#eaf9f5",
|
|
5649
|
+
"Aqua Squeeze": "#e8f5f2",
|
|
5650
|
+
Aquamarine: "#7fffd4",
|
|
5651
|
+
"Aquamarine Blue": "#71d9e2",
|
|
5652
|
+
Arapawa: "#110c6c",
|
|
5653
|
+
Armadillo: "#433e37",
|
|
5654
|
+
Arrowtown: "#948771",
|
|
5655
|
+
Ash: "#c6c3b5",
|
|
5656
|
+
Asparagus: "#7ba05b",
|
|
5657
|
+
Asphalt: "#130a06",
|
|
5658
|
+
Astra: "#faeab9",
|
|
5659
|
+
Astral: "#327da0",
|
|
5660
|
+
Astronaut: "#283a77",
|
|
5661
|
+
"Astronaut Blue": "#013e62",
|
|
5662
|
+
"Athens Gray": "#eef0f3",
|
|
5663
|
+
"Aths Special": "#ecebce",
|
|
5664
|
+
Atlantis: "#97cd2d",
|
|
5665
|
+
Atoll: "#0a6f75",
|
|
5666
|
+
"Atomic Tangerine": "#ff9966",
|
|
5667
|
+
"Au Chico": "#97605d",
|
|
5668
|
+
Aubergine: "#3b0910",
|
|
5669
|
+
"Australian Mint": "#f5ffbe",
|
|
5670
|
+
Avocado: "#888d65",
|
|
5671
|
+
Axolotl: "#4e6649",
|
|
5672
|
+
Azalea: "#f7c8da",
|
|
5673
|
+
Aztec: "#0d1c19",
|
|
5674
|
+
Azure: "#315ba1",
|
|
5675
|
+
"Azure Radiance": "#007fff",
|
|
5676
|
+
"Baby Blue": "#e0ffff",
|
|
5677
|
+
"Bahama Blue": "#026395",
|
|
5678
|
+
Bahia: "#a5cb0c",
|
|
5679
|
+
"Baja White": "#fff8d1",
|
|
5680
|
+
"Bali Hai": "#859faf",
|
|
5681
|
+
"Baltic Sea": "#2a2630",
|
|
5682
|
+
Bamboo: "#da6304",
|
|
5683
|
+
"Banana Mania": "#fbe7b2",
|
|
5684
|
+
Bandicoot: "#858470",
|
|
5685
|
+
Barberry: "#ded717",
|
|
5686
|
+
"Barley Corn": "#a68b5b",
|
|
5687
|
+
"Barley White": "#fff4ce",
|
|
5688
|
+
Barossa: "#44012d",
|
|
5689
|
+
Bastille: "#292130",
|
|
5690
|
+
"Battleship Gray": "#828f72",
|
|
5691
|
+
"Bay Leaf": "#7da98d",
|
|
5692
|
+
"Bay of Many": "#273a81",
|
|
5693
|
+
Bazaar: "#98777b",
|
|
5694
|
+
Bean: "#3d0c02",
|
|
5695
|
+
"Beauty Bush": "#eec1be",
|
|
5696
|
+
Beaver: "#926f5b",
|
|
5697
|
+
Beeswax: "#fef2c7",
|
|
5698
|
+
Beige: "#f5f5dc",
|
|
5699
|
+
Bermuda: "#7dd8c6",
|
|
5700
|
+
"Bermuda Gray": "#6b8ba2",
|
|
5701
|
+
"Beryl Green": "#dee5c0",
|
|
5702
|
+
Bianca: "#fcfbf3",
|
|
5703
|
+
"Big Stone": "#162a40",
|
|
5704
|
+
Bilbao: "#327c14",
|
|
5705
|
+
"Biloba Flower": "#b2a1ea",
|
|
5706
|
+
Birch: "#373021",
|
|
5707
|
+
"Bird Flower": "#d4cd16",
|
|
5708
|
+
Biscay: "#1b3162",
|
|
5709
|
+
Bismark: "#497183",
|
|
5710
|
+
"Bison Hide": "#c1b7a4",
|
|
5711
|
+
Bistre: "#3d2b1f",
|
|
5712
|
+
Bitter: "#868974",
|
|
5713
|
+
"Bitter Lemon": "#cae00d",
|
|
5714
|
+
Bittersweet: "#fe6f5e",
|
|
5715
|
+
Bizarre: "#eededa",
|
|
5716
|
+
Black: "#000000",
|
|
5717
|
+
"Black Bean": "#081910",
|
|
5718
|
+
"Black Forest": "#0b1304",
|
|
5719
|
+
"Black Haze": "#f6f7f7",
|
|
5720
|
+
"Black Marlin": "#3e2c1c",
|
|
5721
|
+
"Black Olive": "#242e16",
|
|
5722
|
+
"Black Pearl": "#041322",
|
|
5723
|
+
"Black Rock": "#0d0332",
|
|
5724
|
+
"Black Rose": "#67032d",
|
|
5725
|
+
"Black Russian": "#0a001c",
|
|
5726
|
+
"Black Squeeze": "#f2fafa",
|
|
5727
|
+
"Black White": "#fffef6",
|
|
5728
|
+
Blackberry: "#4d0135",
|
|
5729
|
+
Blackcurrant: "#32293a",
|
|
5730
|
+
"Blaze Orange": "#ff6600",
|
|
5731
|
+
"Bleach White": "#fef3d8",
|
|
5732
|
+
"Bleached Cedar": "#2c2133",
|
|
5733
|
+
"Blizzard Blue": "#a3e3ed",
|
|
5734
|
+
Blossom: "#dcb4bc",
|
|
5735
|
+
Blue: "#0000ff",
|
|
5736
|
+
"Blue Bayoux": "#496679",
|
|
5737
|
+
"Blue Bell": "#9999cc",
|
|
5738
|
+
"Blue Chalk": "#f1e9ff",
|
|
5739
|
+
"Blue Charcoal": "#010d1a",
|
|
5740
|
+
"Blue Chill": "#0c8990",
|
|
5741
|
+
"Blue Diamond": "#380474",
|
|
5742
|
+
"Blue Dianne": "#204852",
|
|
5743
|
+
"Blue Gem": "#2c0e8c",
|
|
5744
|
+
"Blue Haze": "#bfbed8",
|
|
5745
|
+
"Blue Lagoon": "#017987",
|
|
5746
|
+
"Blue Marguerite": "#7666c6",
|
|
5747
|
+
"Blue Ribbon": "#0066ff",
|
|
5748
|
+
"Blue Romance": "#d2f6de",
|
|
5749
|
+
"Blue Smoke": "#748881",
|
|
5750
|
+
"Blue Stone": "#016162",
|
|
5751
|
+
"Blue Violet": "#6456b7",
|
|
5752
|
+
"Blue Whale": "#042e4c",
|
|
5753
|
+
"Blue Zodiac": "#13264d",
|
|
5754
|
+
Blumine: "#18587a",
|
|
5755
|
+
Blush: "#b44668",
|
|
5756
|
+
"Blush Pink": "#ff6fff",
|
|
5757
|
+
Bombay: "#afb1b8",
|
|
5758
|
+
"Bon Jour": "#e5e0e1",
|
|
5759
|
+
"Bondi Blue": "#0095b6",
|
|
5760
|
+
Bone: "#e4d1c0",
|
|
5761
|
+
Bordeaux: "#5c0120",
|
|
5762
|
+
Bossanova: "#4e2a5a",
|
|
5763
|
+
"Boston Blue": "#3b91b4",
|
|
5764
|
+
Botticelli: "#c7dde5",
|
|
5765
|
+
"Bottle Green": "#093624",
|
|
5766
|
+
Boulder: "#7a7a7a",
|
|
5767
|
+
Bouquet: "#ae809e",
|
|
5768
|
+
Bourbon: "#ba6f1e",
|
|
5769
|
+
Bracken: "#4a2a04",
|
|
5770
|
+
Brandy: "#dec196",
|
|
5771
|
+
"Brandy Punch": "#cd8429",
|
|
5772
|
+
"Brandy Rose": "#bb8983",
|
|
5773
|
+
"Breaker Bay": "#5da19f",
|
|
5774
|
+
"Brick Red": "#c62d42",
|
|
5775
|
+
"Bridal Heath": "#fffaf4",
|
|
5776
|
+
Bridesmaid: "#fef0ec",
|
|
5777
|
+
"Bright Gray": "#3c4151",
|
|
5778
|
+
"Bright Green": "#66ff00",
|
|
5779
|
+
"Bright Red": "#b10000",
|
|
5780
|
+
"Bright Sun": "#fed33c",
|
|
5781
|
+
"Bright Turquoise": "#08e8de",
|
|
5782
|
+
"Brilliant Rose": "#f653a6",
|
|
5783
|
+
"Brink Pink": "#fb607f",
|
|
5784
|
+
Bronco: "#aba196",
|
|
5785
|
+
Bronze: "#3f2109",
|
|
5786
|
+
"Bronze Olive": "#4e420c",
|
|
5787
|
+
Bronzetone: "#4d400f",
|
|
5788
|
+
Broom: "#ffec13",
|
|
5789
|
+
Brown: "#964b00",
|
|
5790
|
+
"Brown Bramble": "#592804",
|
|
5791
|
+
"Brown Derby": "#492615",
|
|
5792
|
+
"Brown Pod": "#401801",
|
|
5793
|
+
"Brown Rust": "#af593e",
|
|
5794
|
+
"Brown Tumbleweed": "#37290e",
|
|
5795
|
+
Bubbles: "#e7feff",
|
|
5796
|
+
Buccaneer: "#622f30",
|
|
5797
|
+
Bud: "#a8ae9c",
|
|
5798
|
+
"Buddha Gold": "#c1a004",
|
|
5799
|
+
Buff: "#f0dc82",
|
|
5800
|
+
"Bulgarian Rose": "#480607",
|
|
5801
|
+
"Bull Shot": "#864d1e",
|
|
5802
|
+
Bunker: "#0d1117",
|
|
5803
|
+
Bunting: "#151f4c",
|
|
5804
|
+
Burgundy: "#900020",
|
|
5805
|
+
Burnham: "#002e20",
|
|
5806
|
+
"Burning Orange": "#ff7034",
|
|
5807
|
+
"Burning Sand": "#d99376",
|
|
5808
|
+
"Burnt Maroon": "#420303",
|
|
5809
|
+
"Burnt Orange": "#cc5500",
|
|
5810
|
+
"Burnt Sienna": "#e97451",
|
|
5811
|
+
"Burnt Umber": "#8a3324",
|
|
5812
|
+
Bush: "#0d2e1c",
|
|
5813
|
+
Buttercup: "#f3ad16",
|
|
5814
|
+
"Buttered Rum": "#a1750d",
|
|
5815
|
+
"Butterfly Bush": "#624e9a",
|
|
5816
|
+
Buttermilk: "#fff1b5",
|
|
5817
|
+
"Buttery White": "#fffcea",
|
|
5818
|
+
"Cab Sav": "#4d0a18",
|
|
5819
|
+
Cabaret: "#d94972",
|
|
5820
|
+
"Cabbage Pont": "#3f4c3a",
|
|
5821
|
+
Cactus: "#587156",
|
|
5822
|
+
"Cadet Blue": "#a9b2c3",
|
|
5823
|
+
Cadillac: "#b04c6a",
|
|
5824
|
+
"Cafe Royale": "#6f440c",
|
|
5825
|
+
Calico: "#e0c095",
|
|
5826
|
+
California: "#fe9d04",
|
|
5827
|
+
Calypso: "#31728d",
|
|
5828
|
+
Camarone: "#00581a",
|
|
5829
|
+
Camelot: "#893456",
|
|
5830
|
+
Cameo: "#d9b99b",
|
|
5831
|
+
Camouflage: "#3c3910",
|
|
5832
|
+
"Camouflage Green": "#78866b",
|
|
5833
|
+
"Can Can": "#d591a4",
|
|
5834
|
+
Canary: "#f3fb62",
|
|
5835
|
+
Candlelight: "#fcd917",
|
|
5836
|
+
"Candy Corn": "#fbec5d",
|
|
5837
|
+
"Cannon Black": "#251706",
|
|
5838
|
+
"Cannon Pink": "#894367",
|
|
5839
|
+
"Cape Cod": "#3c4443",
|
|
5840
|
+
"Cape Honey": "#fee5ac",
|
|
5841
|
+
"Cape Palliser": "#a26645",
|
|
5842
|
+
Caper: "#dcedb4",
|
|
5843
|
+
Caramel: "#ffddaf",
|
|
5844
|
+
Cararra: "#eeeee8",
|
|
5845
|
+
"Cardin Green": "#01361c",
|
|
5846
|
+
Cardinal: "#c41e3a",
|
|
5847
|
+
"Cardinal Pink": "#8c055e",
|
|
5848
|
+
"Careys Pink": "#d29eaa",
|
|
5849
|
+
"Caribbean Green": "#00cc99",
|
|
5850
|
+
Carissma: "#ea88a8",
|
|
5851
|
+
Carla: "#f3ffd8",
|
|
5852
|
+
Carmine: "#960018",
|
|
5853
|
+
"Carnaby Tan": "#5c2e01",
|
|
5854
|
+
Carnation: "#f95a61",
|
|
5855
|
+
"Carnation Pink": "#ffa6c9",
|
|
5856
|
+
"Carousel Pink": "#f9e0ed",
|
|
5857
|
+
"Carrot Orange": "#ed9121",
|
|
5858
|
+
Casablanca: "#f8b853",
|
|
5859
|
+
Casal: "#2f6168",
|
|
5860
|
+
Cascade: "#8ba9a5",
|
|
5861
|
+
Cashmere: "#e6bea5",
|
|
5862
|
+
Casper: "#adbed1",
|
|
5863
|
+
Castro: "#52001f",
|
|
5864
|
+
"Catalina Blue": "#062a78",
|
|
5865
|
+
"Catskill White": "#eef6f7",
|
|
5866
|
+
"Cavern Pink": "#e3bebe",
|
|
5867
|
+
Cedar: "#3e1c14",
|
|
5868
|
+
"Cedar Wood Finish": "#711a00",
|
|
5869
|
+
Celadon: "#ace1af",
|
|
5870
|
+
Celery: "#b8c25d",
|
|
5871
|
+
Celeste: "#d1d2ca",
|
|
5872
|
+
Cello: "#1e385b",
|
|
5873
|
+
Celtic: "#163222",
|
|
5874
|
+
Cement: "#8d7662",
|
|
5875
|
+
Ceramic: "#fcfff9",
|
|
5876
|
+
Cerise: "#da3287",
|
|
5877
|
+
"Cerise Red": "#de3163",
|
|
5878
|
+
Cerulean: "#02a4d3",
|
|
5879
|
+
"Cerulean Blue": "#2a52be",
|
|
5880
|
+
Chablis: "#fff4f3",
|
|
5881
|
+
"Chalet Green": "#516e3d",
|
|
5882
|
+
Chalky: "#eed794",
|
|
5883
|
+
Chambray: "#354e8c",
|
|
5884
|
+
Chamois: "#eddcb1",
|
|
5885
|
+
Champagne: "#faeccc",
|
|
5886
|
+
Chantilly: "#f8c3df",
|
|
5887
|
+
Charade: "#292937",
|
|
5888
|
+
Chardon: "#fff3f1",
|
|
5889
|
+
Chardonnay: "#ffcd8c",
|
|
5890
|
+
Charlotte: "#baeef9",
|
|
5891
|
+
Charm: "#d47494",
|
|
5892
|
+
Chartreuse: "#7fff00",
|
|
5893
|
+
"Chartreuse Yellow": "#dfff00",
|
|
5894
|
+
"Chateau Green": "#40a860",
|
|
5895
|
+
Chatelle: "#bdb3c7",
|
|
5896
|
+
"Chathams Blue": "#175579",
|
|
5897
|
+
"Chelsea Cucumber": "#83aa5d",
|
|
5898
|
+
"Chelsea Gem": "#9e5302",
|
|
5899
|
+
Chenin: "#dfcd6f",
|
|
5900
|
+
Cherokee: "#fcda98",
|
|
5901
|
+
"Cherry Pie": "#2a0359",
|
|
5902
|
+
Cherrywood: "#651a14",
|
|
5903
|
+
Cherub: "#f8d9e9",
|
|
5904
|
+
Chestnut: "#b94e48",
|
|
5905
|
+
"Chestnut Rose": "#cd5c5c",
|
|
5906
|
+
"Chetwode Blue": "#8581d9",
|
|
5907
|
+
Chicago: "#5d5c58",
|
|
5908
|
+
Chiffon: "#f1ffc8",
|
|
5909
|
+
"Chilean Fire": "#f77703",
|
|
5910
|
+
"Chilean Heath": "#fffde6",
|
|
5911
|
+
"China Ivory": "#fcffe7",
|
|
5912
|
+
Chino: "#cec7a7",
|
|
5913
|
+
Chinook: "#a8e3bd",
|
|
5914
|
+
Chocolate: "#370202",
|
|
5915
|
+
Christalle: "#33036b",
|
|
5916
|
+
Christi: "#67a712",
|
|
5917
|
+
Christine: "#e7730a",
|
|
5918
|
+
"Chrome White": "#e8f1d4",
|
|
5919
|
+
Cinder: "#0e0e18",
|
|
5920
|
+
Cinderella: "#fde1dc",
|
|
5921
|
+
Cinnabar: "#e34234",
|
|
5922
|
+
Cinnamon: "#7b3f00",
|
|
5923
|
+
Cioccolato: "#55280c",
|
|
5924
|
+
"Citrine White": "#faf7d6",
|
|
5925
|
+
Citron: "#9ea91f",
|
|
5926
|
+
Citrus: "#a1c50a",
|
|
5927
|
+
Clairvoyant: "#480656",
|
|
5928
|
+
"Clam Shell": "#d4b6af",
|
|
5929
|
+
Claret: "#7f1734",
|
|
5930
|
+
"Classic Rose": "#fbcce7",
|
|
5931
|
+
"Clay Ash": "#bdc8b3",
|
|
5932
|
+
"Clay Creek": "#8a8360",
|
|
5933
|
+
"Clear Day": "#e9fffd",
|
|
5934
|
+
Clementine: "#e96e00",
|
|
5935
|
+
Clinker: "#371d09",
|
|
5936
|
+
Cloud: "#c7c4bf",
|
|
5937
|
+
"Cloud Burst": "#202e54",
|
|
5938
|
+
Cloudy: "#aca59f",
|
|
5939
|
+
Clover: "#384910",
|
|
5940
|
+
Cobalt: "#0047ab",
|
|
5941
|
+
"Cocoa Bean": "#481c1c",
|
|
5942
|
+
"Cocoa Brown": "#301f1e",
|
|
5943
|
+
"Coconut Cream": "#f8f7dc",
|
|
5944
|
+
"Cod Gray": "#0b0b0b",
|
|
5945
|
+
Coffee: "#706555",
|
|
5946
|
+
"Coffee Bean": "#2a140e",
|
|
5947
|
+
Cognac: "#9f381d",
|
|
5948
|
+
Cola: "#3f2500",
|
|
5949
|
+
"Cold Purple": "#aba0d9",
|
|
5950
|
+
"Cold Turkey": "#cebaba",
|
|
5951
|
+
"Colonial White": "#ffedbc",
|
|
5952
|
+
Comet: "#5c5d75",
|
|
5953
|
+
Como: "#517c66",
|
|
5954
|
+
Conch: "#c9d9d2",
|
|
5955
|
+
Concord: "#7c7b7a",
|
|
5956
|
+
Concrete: "#f2f2f2",
|
|
5957
|
+
Confetti: "#e9d75a",
|
|
5958
|
+
"Congo Brown": "#593737",
|
|
5959
|
+
"Congress Blue": "#02478e",
|
|
5960
|
+
Conifer: "#acdd4d",
|
|
5961
|
+
Contessa: "#c6726b",
|
|
5962
|
+
Copper: "#b87333",
|
|
5963
|
+
"Copper Canyon": "#7e3a15",
|
|
5964
|
+
"Copper Rose": "#996666",
|
|
5965
|
+
"Copper Rust": "#944747",
|
|
5966
|
+
Copperfield: "#da8a67",
|
|
5967
|
+
Coral: "#ff7f50",
|
|
5968
|
+
"Coral Red": "#ff4040",
|
|
5969
|
+
"Coral Reef": "#c7bca2",
|
|
5970
|
+
"Coral Tree": "#a86b6b",
|
|
5971
|
+
Corduroy: "#606e68",
|
|
5972
|
+
Coriander: "#c4d0b0",
|
|
5973
|
+
Cork: "#40291d",
|
|
5974
|
+
Corn: "#e7bf05",
|
|
5975
|
+
"Corn Field": "#f8facd",
|
|
5976
|
+
"Corn Harvest": "#8b6b0b",
|
|
5977
|
+
Cornflower: "#93ccea",
|
|
5978
|
+
"Cornflower Blue": "#6495ed",
|
|
5979
|
+
"Cornflower Lilac": "#ffb0ac",
|
|
5980
|
+
Corvette: "#fad3a2",
|
|
5981
|
+
Cosmic: "#76395d",
|
|
5982
|
+
Cosmos: "#ffd8d9",
|
|
5983
|
+
"Costa Del Sol": "#615d30",
|
|
5984
|
+
"Cotton Candy": "#ffb7d5",
|
|
5985
|
+
"Cotton Seed": "#c2bdb6",
|
|
5986
|
+
"County Green": "#01371a",
|
|
5987
|
+
Cowboy: "#4d282d",
|
|
5988
|
+
Crail: "#b95140",
|
|
5989
|
+
Cranberry: "#db5079",
|
|
5990
|
+
"Crater Brown": "#462425",
|
|
5991
|
+
Cream: "#fffdd0",
|
|
5992
|
+
"Cream Brulee": "#ffe5a0",
|
|
5993
|
+
"Cream Can": "#f5c85c",
|
|
5994
|
+
Creole: "#1e0f04",
|
|
5995
|
+
Crete: "#737829",
|
|
5996
|
+
Crimson: "#dc143c",
|
|
5997
|
+
Crocodile: "#736d58",
|
|
5998
|
+
"Crown of Thorns": "#771f1f",
|
|
5999
|
+
Crowshead: "#1c1208",
|
|
6000
|
+
Cruise: "#b5ecdf",
|
|
6001
|
+
Crusoe: "#004816",
|
|
6002
|
+
Crusta: "#fd7b33",
|
|
6003
|
+
Cumin: "#924321",
|
|
6004
|
+
Cumulus: "#fdffd5",
|
|
6005
|
+
Cupid: "#fbbeda",
|
|
6006
|
+
"Curious Blue": "#2596d1",
|
|
6007
|
+
"Cutty Sark": "#507672",
|
|
6008
|
+
"Cyan / Aqua": "#00ffff",
|
|
6009
|
+
Cyprus: "#003e40",
|
|
6010
|
+
Daintree: "#012731",
|
|
6011
|
+
"Dairy Cream": "#f9e4bc",
|
|
6012
|
+
"Daisy Bush": "#4f2398",
|
|
6013
|
+
Dallas: "#6e4b26",
|
|
6014
|
+
Dandelion: "#fed85d",
|
|
6015
|
+
Danube: "#6093d1",
|
|
6016
|
+
"Dark Blue": "#0000c8",
|
|
6017
|
+
"Dark Burgundy": "#770f05",
|
|
6018
|
+
"Dark Ebony": "#3c2005",
|
|
6019
|
+
"Dark Fern": "#0a480d",
|
|
6020
|
+
"Dark Tan": "#661010",
|
|
6021
|
+
Dawn: "#a6a29a",
|
|
6022
|
+
"Dawn Pink": "#f3e9e5",
|
|
6023
|
+
"De York": "#7ac488",
|
|
6024
|
+
Deco: "#d2da97",
|
|
6025
|
+
"Deep Blue": "#220878",
|
|
6026
|
+
"Deep Blush": "#e47698",
|
|
6027
|
+
"Deep Bronze": "#4a3004",
|
|
6028
|
+
"Deep Cerulean": "#007ba7",
|
|
6029
|
+
"Deep Cove": "#051040",
|
|
6030
|
+
"Deep Fir": "#002900",
|
|
6031
|
+
"Deep Forest Green": "#182d09",
|
|
6032
|
+
"Deep Koamaru": "#1b127b",
|
|
6033
|
+
"Deep Oak": "#412010",
|
|
6034
|
+
"Deep Sapphire": "#082567",
|
|
6035
|
+
"Deep Sea": "#01826b",
|
|
6036
|
+
"Deep Sea Green": "#095859",
|
|
6037
|
+
"Deep Teal": "#003532",
|
|
6038
|
+
"Del Rio": "#b09a95",
|
|
6039
|
+
Dell: "#396413",
|
|
6040
|
+
Delta: "#a4a49d",
|
|
6041
|
+
Deluge: "#7563a8",
|
|
6042
|
+
Denim: "#1560bd",
|
|
6043
|
+
Derby: "#ffeed8",
|
|
6044
|
+
Desert: "#ae6020",
|
|
6045
|
+
"Desert Sand": "#edc9af",
|
|
6046
|
+
"Desert Storm": "#f8f8f7",
|
|
6047
|
+
Dew: "#eafffe",
|
|
6048
|
+
"Di Serria": "#db995e",
|
|
6049
|
+
Diesel: "#130000",
|
|
6050
|
+
Dingley: "#5d7747",
|
|
6051
|
+
Disco: "#871550",
|
|
6052
|
+
Dixie: "#e29418",
|
|
6053
|
+
"Dodger Blue": "#1e90ff",
|
|
6054
|
+
Dolly: "#f9ff8b",
|
|
6055
|
+
Dolphin: "#646077",
|
|
6056
|
+
Domino: "#8e775e",
|
|
6057
|
+
"Don Juan": "#5d4c51",
|
|
6058
|
+
"Donkey Brown": "#a69279",
|
|
6059
|
+
Dorado: "#6b5755",
|
|
6060
|
+
"Double Colonial White": "#eee3ad",
|
|
6061
|
+
"Double Pearl Lusta": "#fcf4d0",
|
|
6062
|
+
"Double Spanish White": "#e6d7b9",
|
|
6063
|
+
"Dove Gray": "#6d6c6c",
|
|
6064
|
+
Downriver: "#092256",
|
|
6065
|
+
Downy: "#6fd0c5",
|
|
6066
|
+
Driftwood: "#af8751",
|
|
6067
|
+
Drover: "#fdf7ad",
|
|
6068
|
+
"Dull Lavender": "#a899e6",
|
|
6069
|
+
Dune: "#383533",
|
|
6070
|
+
"Dust Storm": "#e5ccc9",
|
|
6071
|
+
"Dusty Gray": "#a8989b",
|
|
6072
|
+
Eagle: "#b6baa4",
|
|
6073
|
+
"Earls Green": "#c9b93b",
|
|
6074
|
+
"Early Dawn": "#fff9e6",
|
|
6075
|
+
"East Bay": "#414c7d",
|
|
6076
|
+
"East Side": "#ac91ce",
|
|
6077
|
+
"Eastern Blue": "#1e9ab0",
|
|
6078
|
+
Ebb: "#e9e3e3",
|
|
6079
|
+
Ebony: "#0c0b1d",
|
|
6080
|
+
"Ebony Clay": "#26283b",
|
|
6081
|
+
Eclipse: "#311c17",
|
|
6082
|
+
"Ecru White": "#f5f3e5",
|
|
6083
|
+
Ecstasy: "#fa7814",
|
|
6084
|
+
Eden: "#105852",
|
|
6085
|
+
Edgewater: "#c8e3d7",
|
|
6086
|
+
Edward: "#a2aeab",
|
|
6087
|
+
"Egg Sour": "#fff4dd",
|
|
6088
|
+
"Egg White": "#ffefc1",
|
|
6089
|
+
Eggplant: "#614051",
|
|
6090
|
+
"El Paso": "#1e1708",
|
|
6091
|
+
"El Salva": "#8f3e33",
|
|
6092
|
+
"Electric Lime": "#ccff00",
|
|
6093
|
+
"Electric Violet": "#8b00ff",
|
|
6094
|
+
Elephant: "#123447",
|
|
6095
|
+
"Elf Green": "#088370",
|
|
6096
|
+
Elm: "#1c7c7d",
|
|
6097
|
+
Emerald: "#50c878",
|
|
6098
|
+
Eminence: "#6c3082",
|
|
6099
|
+
Emperor: "#514649",
|
|
6100
|
+
Empress: "#817377",
|
|
6101
|
+
Endeavour: "#0056a7",
|
|
6102
|
+
"Energy Yellow": "#f8dd5c",
|
|
6103
|
+
"English Holly": "#022d15",
|
|
6104
|
+
"English Walnut": "#3e2b23",
|
|
6105
|
+
Envy: "#8ba690",
|
|
6106
|
+
Equator: "#e1bc64",
|
|
6107
|
+
Espresso: "#612718",
|
|
6108
|
+
Eternity: "#211a0e",
|
|
6109
|
+
Eucalyptus: "#278a5b",
|
|
6110
|
+
Eunry: "#cfa39d",
|
|
6111
|
+
"Evening Sea": "#024e46",
|
|
6112
|
+
Everglade: "#1c402e",
|
|
6113
|
+
"Faded Jade": "#427977",
|
|
6114
|
+
"Fair Pink": "#ffefec",
|
|
6115
|
+
Falcon: "#7f626d",
|
|
6116
|
+
"Fall Green": "#ecebbd",
|
|
6117
|
+
"Falu Red": "#801818",
|
|
6118
|
+
Fantasy: "#faf3f0",
|
|
6119
|
+
Fedora: "#796a78",
|
|
6120
|
+
Feijoa: "#9fdd8c",
|
|
6121
|
+
Fern: "#63b76c",
|
|
6122
|
+
"Fern Frond": "#657220",
|
|
6123
|
+
"Fern Green": "#4f7942",
|
|
6124
|
+
Ferra: "#704f50",
|
|
6125
|
+
Festival: "#fbe96c",
|
|
6126
|
+
Feta: "#f0fcea",
|
|
6127
|
+
"Fiery Orange": "#b35213",
|
|
6128
|
+
Finch: "#626649",
|
|
6129
|
+
Finlandia: "#556d56",
|
|
6130
|
+
Finn: "#692d54",
|
|
6131
|
+
Fiord: "#405169",
|
|
6132
|
+
Fire: "#aa4203",
|
|
6133
|
+
"Fire Bush": "#e89928",
|
|
6134
|
+
Firefly: "#0e2a30",
|
|
6135
|
+
"Flame Pea": "#da5b38",
|
|
6136
|
+
Flamenco: "#ff7d07",
|
|
6137
|
+
Flamingo: "#f2552a",
|
|
6138
|
+
Flax: "#eedc82",
|
|
6139
|
+
"Flax Smoke": "#7b8265",
|
|
6140
|
+
Flesh: "#ffcba4",
|
|
6141
|
+
Flint: "#6f6a61",
|
|
6142
|
+
Flirt: "#a2006d",
|
|
6143
|
+
"Flush Mahogany": "#ca3435",
|
|
6144
|
+
"Flush Orange": "#ff7f00",
|
|
6145
|
+
Foam: "#d8fcfa",
|
|
6146
|
+
Fog: "#d7d0ff",
|
|
6147
|
+
"Foggy Gray": "#cbcab6",
|
|
6148
|
+
"Forest Green": "#228b22",
|
|
6149
|
+
"Forget Me Not": "#fff1ee",
|
|
6150
|
+
"Fountain Blue": "#56b4be",
|
|
6151
|
+
Frangipani: "#ffdeb3",
|
|
6152
|
+
"French Gray": "#bdbdc6",
|
|
6153
|
+
"French Lilac": "#ecc7ee",
|
|
6154
|
+
"French Pass": "#bdedfd",
|
|
6155
|
+
"French Rose": "#f64a8a",
|
|
6156
|
+
"Fresh Eggplant": "#990066",
|
|
6157
|
+
"Friar Gray": "#807e79",
|
|
6158
|
+
"Fringy Flower": "#b1e2c1",
|
|
6159
|
+
Froly: "#f57584",
|
|
6160
|
+
Frost: "#edf5dd",
|
|
6161
|
+
"Frosted Mint": "#dbfff8",
|
|
6162
|
+
Frostee: "#e4f6e7",
|
|
6163
|
+
"Fruit Salad": "#4f9d5d",
|
|
6164
|
+
"Fuchsia Blue": "#7a58c1",
|
|
6165
|
+
"Fuchsia Pink": "#c154c1",
|
|
6166
|
+
Fuego: "#bede0d",
|
|
6167
|
+
"Fuel Yellow": "#eca927",
|
|
6168
|
+
"Fun Blue": "#1959a8",
|
|
6169
|
+
"Fun Green": "#016d39",
|
|
6170
|
+
"Fuscous Gray": "#54534d",
|
|
6171
|
+
"Fuzzy Wuzzy Brown": "#c45655",
|
|
6172
|
+
"Gable Green": "#163531",
|
|
6173
|
+
Gallery: "#efefef",
|
|
6174
|
+
Galliano: "#dcb20c",
|
|
6175
|
+
Gamboge: "#e49b0f",
|
|
6176
|
+
Geebung: "#d18f1b",
|
|
6177
|
+
Genoa: "#15736b",
|
|
6178
|
+
Geraldine: "#fb8989",
|
|
6179
|
+
Geyser: "#d4dfe2",
|
|
6180
|
+
Ghost: "#c7c9d5",
|
|
6181
|
+
Gigas: "#523c94",
|
|
6182
|
+
Gimblet: "#b8b56a",
|
|
6183
|
+
Gin: "#e8f2eb",
|
|
6184
|
+
"Gin Fizz": "#fff9e2",
|
|
6185
|
+
Givry: "#f8e4bf",
|
|
6186
|
+
Glacier: "#80b3c4",
|
|
6187
|
+
"Glade Green": "#61845f",
|
|
6188
|
+
"Go Ben": "#726d4e",
|
|
6189
|
+
Goblin: "#3d7d52",
|
|
6190
|
+
Gold: "#ffd700",
|
|
6191
|
+
"Gold Drop": "#f18200",
|
|
6192
|
+
"Gold Sand": "#e6be8a",
|
|
6193
|
+
"Gold Tips": "#deba13",
|
|
6194
|
+
"Golden Bell": "#e28913",
|
|
6195
|
+
"Golden Dream": "#f0d52d",
|
|
6196
|
+
"Golden Fizz": "#f5fb3d",
|
|
6197
|
+
"Golden Glow": "#fde295",
|
|
6198
|
+
"Golden Grass": "#daa520",
|
|
6199
|
+
"Golden Sand": "#f0db7d",
|
|
6200
|
+
"Golden Tainoi": "#ffcc5c",
|
|
6201
|
+
Goldenrod: "#fcd667",
|
|
6202
|
+
Gondola: "#261414",
|
|
6203
|
+
"Gordons Green": "#0b1107",
|
|
6204
|
+
Gorse: "#fff14f",
|
|
6205
|
+
Gossamer: "#069b81",
|
|
6206
|
+
Gossip: "#d2f8b0",
|
|
6207
|
+
Gothic: "#6d92a1",
|
|
6208
|
+
"Governor Bay": "#2f3cb3",
|
|
6209
|
+
"Grain Brown": "#e4d5b7",
|
|
6210
|
+
Grandis: "#ffd38c",
|
|
6211
|
+
"Granite Green": "#8d8974",
|
|
6212
|
+
"Granny Apple": "#d5f6e3",
|
|
6213
|
+
"Granny Smith": "#84a0a0",
|
|
6214
|
+
"Granny Smith Apple": "#9de093",
|
|
6215
|
+
Grape: "#381a51",
|
|
6216
|
+
Graphite: "#251607",
|
|
6217
|
+
Gravel: "#4a444b",
|
|
6218
|
+
Gray: "#808080",
|
|
6219
|
+
"Gray Asparagus": "#465945",
|
|
6220
|
+
"Gray Chateau": "#a2aab3",
|
|
6221
|
+
"Gray Nickel": "#c3c3bd",
|
|
6222
|
+
"Gray Nurse": "#e7ece6",
|
|
6223
|
+
"Gray Olive": "#a9a491",
|
|
6224
|
+
"Gray Suit": "#c1becd",
|
|
6225
|
+
Green: "#00ff00",
|
|
6226
|
+
"Green Haze": "#01a368",
|
|
6227
|
+
"Green House": "#24500f",
|
|
6228
|
+
"Green Kelp": "#25311c",
|
|
6229
|
+
"Green Leaf": "#436a0d",
|
|
6230
|
+
"Green Mist": "#cbd3b0",
|
|
6231
|
+
"Green Pea": "#1d6142",
|
|
6232
|
+
"Green Smoke": "#a4af6e",
|
|
6233
|
+
"Green Spring": "#b8c1b1",
|
|
6234
|
+
"Green Vogue": "#032b52",
|
|
6235
|
+
"Green Waterloo": "#101405",
|
|
6236
|
+
"Green White": "#e8ebe0",
|
|
6237
|
+
"Green Yellow": "#adff2f",
|
|
6238
|
+
Grenadier: "#d54600",
|
|
6239
|
+
"Guardsman Red": "#ba0101",
|
|
6240
|
+
"Gulf Blue": "#051657",
|
|
6241
|
+
"Gulf Stream": "#80b3ae",
|
|
6242
|
+
"Gull Gray": "#9dacb7",
|
|
6243
|
+
"Gum Leaf": "#b6d3bf",
|
|
6244
|
+
Gumbo: "#7ca1a6",
|
|
6245
|
+
"Gun Powder": "#414257",
|
|
6246
|
+
Gunsmoke: "#828685",
|
|
6247
|
+
Gurkha: "#9a9577",
|
|
6248
|
+
Hacienda: "#98811b",
|
|
6249
|
+
"Hairy Heath": "#6b2a14",
|
|
6250
|
+
Haiti: "#1b1035",
|
|
6251
|
+
"Half and Half": "#fffee1",
|
|
6252
|
+
"Half Baked": "#85c4cc",
|
|
6253
|
+
"Half Colonial White": "#fdf6d3",
|
|
6254
|
+
"Half Dutch White": "#fef7de",
|
|
6255
|
+
"Half Spanish White": "#fef4db",
|
|
6256
|
+
Hampton: "#e5d8af",
|
|
6257
|
+
Harlequin: "#3fff00",
|
|
6258
|
+
Harp: "#e6f2ea",
|
|
6259
|
+
"Harvest Gold": "#e0b974",
|
|
6260
|
+
"Havelock Blue": "#5590d9",
|
|
6261
|
+
"Hawaiian Tan": "#9d5616",
|
|
6262
|
+
"Hawkes Blue": "#d4e2fc",
|
|
6263
|
+
Heath: "#541012",
|
|
6264
|
+
Heather: "#b7c3d0",
|
|
6265
|
+
"Heathered Gray": "#b6b095",
|
|
6266
|
+
"Heavy Metal": "#2b3228",
|
|
6267
|
+
Heliotrope: "#df73ff",
|
|
6268
|
+
Hemlock: "#5e5d3b",
|
|
6269
|
+
Hemp: "#907874",
|
|
6270
|
+
Hibiscus: "#b6316c",
|
|
6271
|
+
Highland: "#6f8e63",
|
|
6272
|
+
Hillary: "#aca586",
|
|
6273
|
+
Himalaya: "#6a5d1b",
|
|
6274
|
+
"Hint of Green": "#e6ffe9",
|
|
6275
|
+
"Hint of Red": "#fbf9f9",
|
|
6276
|
+
"Hint of Yellow": "#fafde4",
|
|
6277
|
+
"Hippie Blue": "#589aaf",
|
|
6278
|
+
"Hippie Green": "#53824b",
|
|
6279
|
+
"Hippie Pink": "#ae4560",
|
|
6280
|
+
"Hit Gray": "#a1adb5",
|
|
6281
|
+
"Hit Pink": "#ffab81",
|
|
6282
|
+
"Hokey Pokey": "#c8a528",
|
|
6283
|
+
Hoki: "#65869f",
|
|
6284
|
+
Holly: "#011d13",
|
|
6285
|
+
"Hollywood Cerise": "#f400a1",
|
|
6286
|
+
"Honey Flower": "#4f1c70",
|
|
6287
|
+
Honeysuckle: "#edfc84",
|
|
6288
|
+
Hopbush: "#d06da1",
|
|
6289
|
+
Horizon: "#5a87a0",
|
|
6290
|
+
"Horses Neck": "#604913",
|
|
6291
|
+
"Hot Cinnamon": "#d2691e",
|
|
6292
|
+
"Hot Pink": "#ff69b4",
|
|
6293
|
+
"Hot Toddy": "#b38007",
|
|
6294
|
+
"Humming Bird": "#cff9f3",
|
|
6295
|
+
"Hunter Green": "#161d10",
|
|
6296
|
+
Hurricane: "#877c7b",
|
|
6297
|
+
Husk: "#b7a458",
|
|
6298
|
+
"Ice Cold": "#b1f4e7",
|
|
6299
|
+
Iceberg: "#daf4f0",
|
|
6300
|
+
Illusion: "#f6a4c9",
|
|
6301
|
+
"Inch Worm": "#b0e313",
|
|
6302
|
+
"Indian Khaki": "#c3b091",
|
|
6303
|
+
"Indian Tan": "#4d1e01",
|
|
6304
|
+
Indigo: "#4f69c6",
|
|
6305
|
+
Indochine: "#c26b03",
|
|
6306
|
+
"International Klein Blue": "#002fa7",
|
|
6307
|
+
"International Orange": "#ff4f00",
|
|
6308
|
+
"Irish Coffee": "#5f3d26",
|
|
6309
|
+
Iroko: "#433120",
|
|
6310
|
+
Iron: "#d4d7d9",
|
|
6311
|
+
"Ironside Gray": "#676662",
|
|
6312
|
+
Ironstone: "#86483c",
|
|
6313
|
+
"Island Spice": "#fffcee",
|
|
6314
|
+
Ivory: "#fffff0",
|
|
6315
|
+
Jacaranda: "#2e0329",
|
|
6316
|
+
Jacarta: "#3a2a6a",
|
|
6317
|
+
"Jacko Bean": "#2e1905",
|
|
6318
|
+
"Jacksons Purple": "#20208d",
|
|
6319
|
+
Jade: "#00a86b",
|
|
6320
|
+
Jaffa: "#ef863f",
|
|
6321
|
+
"Jagged Ice": "#c2e8e5",
|
|
6322
|
+
Jagger: "#350e57",
|
|
6323
|
+
Jaguar: "#080110",
|
|
6324
|
+
Jambalaya: "#5b3013",
|
|
6325
|
+
Janna: "#f4ebd3",
|
|
6326
|
+
"Japanese Laurel": "#0a6906",
|
|
6327
|
+
"Japanese Maple": "#780109",
|
|
6328
|
+
Japonica: "#d87c63",
|
|
6329
|
+
Java: "#1fc2c2",
|
|
6330
|
+
"Jazzberry Jam": "#a50b5e",
|
|
6331
|
+
"Jelly Bean": "#297b9a",
|
|
6332
|
+
"Jet Stream": "#b5d2ce",
|
|
6333
|
+
Jewel: "#126b40",
|
|
6334
|
+
Jon: "#3b1f1f",
|
|
6335
|
+
Jonquil: "#eeff9a",
|
|
6336
|
+
"Jordy Blue": "#8ab9f1",
|
|
6337
|
+
"Judge Gray": "#544333",
|
|
6338
|
+
Jumbo: "#7c7b82",
|
|
6339
|
+
"Jungle Green": "#29ab87",
|
|
6340
|
+
"Jungle Mist": "#b4cfd3",
|
|
6341
|
+
Juniper: "#6d9292",
|
|
6342
|
+
"Just Right": "#eccdb9",
|
|
6343
|
+
Kabul: "#5e483e",
|
|
6344
|
+
"Kaitoke Green": "#004620",
|
|
6345
|
+
Kangaroo: "#c6c8bd",
|
|
6346
|
+
Karaka: "#1e1609",
|
|
6347
|
+
Karry: "#ffead4",
|
|
6348
|
+
"Kashmir Blue": "#507096",
|
|
6349
|
+
Kelp: "#454936",
|
|
6350
|
+
"Kenyan Copper": "#7c1c05",
|
|
6351
|
+
Keppel: "#3ab09e",
|
|
6352
|
+
"Key Lime Pie": "#bfc921",
|
|
6353
|
+
Khaki: "#f0e68c",
|
|
6354
|
+
Kidnapper: "#e1ead4",
|
|
6355
|
+
Kilamanjaro: "#240c02",
|
|
6356
|
+
Killarney: "#3a6a47",
|
|
6357
|
+
Kimberly: "#736c9f",
|
|
6358
|
+
"Kingfisher Daisy": "#3e0480",
|
|
6359
|
+
Kobi: "#e79fc4",
|
|
6360
|
+
Kokoda: "#6e6d57",
|
|
6361
|
+
Korma: "#8f4b0e",
|
|
6362
|
+
Koromiko: "#ffbd5f",
|
|
6363
|
+
Kournikova: "#ffe772",
|
|
6364
|
+
Kumera: "#886221",
|
|
6365
|
+
"La Palma": "#368716",
|
|
6366
|
+
"La Rioja": "#b3c110",
|
|
6367
|
+
"Las Palmas": "#c6e610",
|
|
6368
|
+
Laser: "#c8b568",
|
|
6369
|
+
"Laser Lemon": "#ffff66",
|
|
6370
|
+
Laurel: "#749378",
|
|
6371
|
+
Lavender: "#b57edc",
|
|
6372
|
+
"Lavender blush": "#fff0f5",
|
|
6373
|
+
"Lavender Gray": "#bdbbd7",
|
|
6374
|
+
"Lavender Magenta": "#ee82ee",
|
|
6375
|
+
"Lavender Pink": "#fbaed2",
|
|
6376
|
+
"Lavender Purple": "#967bb6",
|
|
6377
|
+
"Lavender Rose": "#fba0e3",
|
|
6378
|
+
Leather: "#967059",
|
|
6379
|
+
Lemon: "#fde910",
|
|
6380
|
+
"Lemon Chiffon": "#fffacd",
|
|
6381
|
+
"Lemon Ginger": "#ac9e22",
|
|
6382
|
+
"Lemon Grass": "#9b9e8f",
|
|
6383
|
+
"Light Apricot": "#fdd5b1",
|
|
6384
|
+
"Light Orchid": "#e29cd2",
|
|
6385
|
+
"Light Wisteria": "#c9a0dc",
|
|
6386
|
+
"Lightning Yellow": "#fcc01e",
|
|
6387
|
+
Lilac: "#c8a2c8",
|
|
6388
|
+
"Lilac Bush": "#9874d3",
|
|
6389
|
+
Lily: "#c8aabf",
|
|
6390
|
+
"Lily White": "#e7f8ff",
|
|
6391
|
+
Lima: "#76bd17",
|
|
6392
|
+
Lime: "#bfff00",
|
|
6393
|
+
Limeade: "#6f9d02",
|
|
6394
|
+
"Limed Ash": "#747d63",
|
|
6395
|
+
"Limed Oak": "#ac8a56",
|
|
6396
|
+
"Limed Spruce": "#394851",
|
|
6397
|
+
Linen: "#faf0e6",
|
|
6398
|
+
"Link Water": "#d9e4f5",
|
|
6399
|
+
Lipstick: "#ab0563",
|
|
6400
|
+
"Lisbon Brown": "#423921",
|
|
6401
|
+
"Livid Brown": "#4d282e",
|
|
6402
|
+
Loafer: "#eef4de",
|
|
6403
|
+
Loblolly: "#bdc9ce",
|
|
6404
|
+
Lochinvar: "#2c8c84",
|
|
6405
|
+
Lochmara: "#007ec7",
|
|
6406
|
+
Locust: "#a8af8e",
|
|
6407
|
+
"Log Cabin": "#242a1d",
|
|
6408
|
+
Logan: "#aaa9cd",
|
|
6409
|
+
Lola: "#dfcfdb",
|
|
6410
|
+
"London Hue": "#bea6c3",
|
|
6411
|
+
Lonestar: "#6d0101",
|
|
6412
|
+
Lotus: "#863c3c",
|
|
6413
|
+
Loulou: "#460b41",
|
|
6414
|
+
Lucky: "#af9f1c",
|
|
6415
|
+
"Lucky Point": "#1a1a68",
|
|
6416
|
+
"Lunar Green": "#3c493a",
|
|
6417
|
+
"Luxor Gold": "#a7882c",
|
|
6418
|
+
Lynch: "#697e9a",
|
|
6419
|
+
Mabel: "#d9f7ff",
|
|
6420
|
+
"Macaroni and Cheese": "#ffb97b",
|
|
6421
|
+
Madang: "#b7f0be",
|
|
6422
|
+
Madison: "#09255d",
|
|
6423
|
+
Madras: "#3f3002",
|
|
6424
|
+
"Magenta / Fuchsia": "#ff00ff",
|
|
6425
|
+
"Magic Mint": "#aaf0d1",
|
|
6426
|
+
Magnolia: "#f8f4ff",
|
|
6427
|
+
Mahogany: "#4e0606",
|
|
6428
|
+
"Mai Tai": "#b06608",
|
|
6429
|
+
Maize: "#f5d5a0",
|
|
6430
|
+
Makara: "#897d6d",
|
|
6431
|
+
Mako: "#444954",
|
|
6432
|
+
Malachite: "#0bda51",
|
|
6433
|
+
Malibu: "#7dc8f7",
|
|
6434
|
+
Mallard: "#233418",
|
|
6435
|
+
Malta: "#bdb2a1",
|
|
6436
|
+
Mamba: "#8e8190",
|
|
6437
|
+
Manatee: "#8d90a1",
|
|
6438
|
+
Mandalay: "#ad781b",
|
|
6439
|
+
Mandy: "#e25465",
|
|
6440
|
+
"Mandys Pink": "#f2c3b2",
|
|
6441
|
+
"Mango Tango": "#e77200",
|
|
6442
|
+
Manhattan: "#f5c999",
|
|
6443
|
+
Mantis: "#74c365",
|
|
6444
|
+
Mantle: "#8b9c90",
|
|
6445
|
+
Manz: "#eeef78",
|
|
6446
|
+
"Mardi Gras": "#350036",
|
|
6447
|
+
Marigold: "#b98d28",
|
|
6448
|
+
"Marigold Yellow": "#fbe870",
|
|
6449
|
+
Mariner: "#286acd",
|
|
6450
|
+
Maroon: "#800000",
|
|
6451
|
+
"Maroon Flush": "#c32148",
|
|
6452
|
+
"Maroon Oak": "#520c17",
|
|
6453
|
+
Marshland: "#0b0f08",
|
|
6454
|
+
Martini: "#afa09e",
|
|
6455
|
+
Martinique: "#363050",
|
|
6456
|
+
Marzipan: "#f8db9d",
|
|
6457
|
+
Masala: "#403b38",
|
|
6458
|
+
Matisse: "#1b659d",
|
|
6459
|
+
Matrix: "#b05d54",
|
|
6460
|
+
Matterhorn: "#4e3b41",
|
|
6461
|
+
Mauve: "#e0b0ff",
|
|
6462
|
+
Mauvelous: "#f091a9",
|
|
6463
|
+
Maverick: "#d8c2d5",
|
|
6464
|
+
"Medium Carmine": "#af4035",
|
|
6465
|
+
"Medium Purple": "#9370db",
|
|
6466
|
+
"Medium Red Violet": "#bb3385",
|
|
6467
|
+
Melanie: "#e4c2d5",
|
|
6468
|
+
Melanzane: "#300529",
|
|
6469
|
+
Melon: "#febaad",
|
|
6470
|
+
Melrose: "#c7c1ff",
|
|
6471
|
+
Mercury: "#e5e5e5",
|
|
6472
|
+
Merino: "#f6f0e6",
|
|
6473
|
+
Merlin: "#413c37",
|
|
6474
|
+
Merlot: "#831923",
|
|
6475
|
+
"Metallic Bronze": "#49371b",
|
|
6476
|
+
"Metallic Copper": "#71291d",
|
|
6477
|
+
Meteor: "#d07d12",
|
|
6478
|
+
Meteorite: "#3c1f76",
|
|
6479
|
+
"Mexican Red": "#a72525",
|
|
6480
|
+
"Mid Gray": "#5f5f6e",
|
|
6481
|
+
Midnight: "#011635",
|
|
6482
|
+
"Midnight Blue": "#003366",
|
|
6483
|
+
"Midnight Moss": "#041004",
|
|
6484
|
+
Mikado: "#2d2510",
|
|
6485
|
+
Milan: "#faffa4",
|
|
6486
|
+
"Milano Red": "#b81104",
|
|
6487
|
+
"Milk Punch": "#fff6d4",
|
|
6488
|
+
Millbrook: "#594433",
|
|
6489
|
+
Mimosa: "#f8fdd3",
|
|
6490
|
+
Mindaro: "#e3f988",
|
|
6491
|
+
"Mine Shaft": "#323232",
|
|
6492
|
+
"Mineral Green": "#3f5d53",
|
|
6493
|
+
Ming: "#36747d",
|
|
6494
|
+
Minsk: "#3f307f",
|
|
6495
|
+
"Mint Green": "#98ff98",
|
|
6496
|
+
"Mint Julep": "#f1eec1",
|
|
6497
|
+
"Mint Tulip": "#c4f4eb",
|
|
6498
|
+
Mirage: "#161928",
|
|
6499
|
+
Mischka: "#d1d2dd",
|
|
6500
|
+
"Mist Gray": "#c4c4bc",
|
|
6501
|
+
Mobster: "#7f7589",
|
|
6502
|
+
Moccaccino: "#6e1d14",
|
|
6503
|
+
Mocha: "#782d19",
|
|
6504
|
+
Mojo: "#c04737",
|
|
6505
|
+
"Mona Lisa": "#ffa194",
|
|
6506
|
+
Monarch: "#8b0723",
|
|
6507
|
+
Mondo: "#4a3c30",
|
|
6508
|
+
Mongoose: "#b5a27f",
|
|
6509
|
+
Monsoon: "#8a8389",
|
|
6510
|
+
"Monte Carlo": "#83d0c6",
|
|
6511
|
+
Monza: "#c7031e",
|
|
6512
|
+
"Moody Blue": "#7f76d3",
|
|
6513
|
+
"Moon Glow": "#fcfeda",
|
|
6514
|
+
"Moon Mist": "#dcddcc",
|
|
6515
|
+
"Moon Raker": "#d6cef6",
|
|
6516
|
+
"Morning Glory": "#9edee0",
|
|
6517
|
+
"Morocco Brown": "#441d00",
|
|
6518
|
+
Mortar: "#504351",
|
|
6519
|
+
Mosque: "#036a6e",
|
|
6520
|
+
"Moss Green": "#addfad",
|
|
6521
|
+
"Mountain Meadow": "#1ab385",
|
|
6522
|
+
"Mountain Mist": "#959396",
|
|
6523
|
+
"Mountbatten Pink": "#997a8d",
|
|
6524
|
+
"Muddy Waters": "#b78e5c",
|
|
6525
|
+
Muesli: "#aa8b5b",
|
|
6526
|
+
Mulberry: "#c54b8c",
|
|
6527
|
+
"Mulberry Wood": "#5c0536",
|
|
6528
|
+
"Mule Fawn": "#8c472f",
|
|
6529
|
+
"Mulled Wine": "#4e4562",
|
|
6530
|
+
Mustard: "#ffdb58",
|
|
6531
|
+
"My Pink": "#d69188",
|
|
6532
|
+
"My Sin": "#ffb31f",
|
|
6533
|
+
Mystic: "#e2ebed",
|
|
6534
|
+
Nandor: "#4b5d52",
|
|
6535
|
+
Napa: "#aca494",
|
|
6536
|
+
Narvik: "#edf9f1",
|
|
6537
|
+
"Natural Gray": "#8b8680",
|
|
6538
|
+
"Navajo White": "#ffdead",
|
|
6539
|
+
"Navy Blue": "#000080",
|
|
6540
|
+
Nebula: "#cbdbd6",
|
|
6541
|
+
Negroni: "#ffe2c5",
|
|
6542
|
+
"Neon Carrot": "#ff9933",
|
|
6543
|
+
Nepal: "#8eabc1",
|
|
6544
|
+
Neptune: "#7cb7bb",
|
|
6545
|
+
Nero: "#140600",
|
|
6546
|
+
Nevada: "#646e75",
|
|
6547
|
+
"New Orleans": "#f3d69d",
|
|
6548
|
+
"New York Pink": "#d7837f",
|
|
6549
|
+
Niagara: "#06a189",
|
|
6550
|
+
"Night Rider": "#1f120f",
|
|
6551
|
+
"Night Shadz": "#aa375a",
|
|
6552
|
+
"Nile Blue": "#193751",
|
|
6553
|
+
Nobel: "#b7b1b1",
|
|
6554
|
+
Nomad: "#bab1a2",
|
|
6555
|
+
Norway: "#a8bd9f",
|
|
6556
|
+
Nugget: "#c59922",
|
|
6557
|
+
Nutmeg: "#81422c",
|
|
6558
|
+
"Nutmeg Wood Finish": "#683600",
|
|
6559
|
+
Oasis: "#feefce",
|
|
6560
|
+
Observatory: "#02866f",
|
|
6561
|
+
"Ocean Green": "#41aa78",
|
|
6562
|
+
Ochre: "#cc7722",
|
|
6563
|
+
"Off Green": "#e6f8f3",
|
|
6564
|
+
"Off Yellow": "#fef9e3",
|
|
6565
|
+
Oil: "#281e15",
|
|
6566
|
+
"Old Brick": "#901e1e",
|
|
6567
|
+
"Old Copper": "#724a2f",
|
|
6568
|
+
"Old Gold": "#cfb53b",
|
|
6569
|
+
"Old Lace": "#fdf5e6",
|
|
6570
|
+
"Old Lavender": "#796878",
|
|
6571
|
+
"Old Rose": "#c08081",
|
|
6572
|
+
Olive: "#808000",
|
|
6573
|
+
"Olive Drab": "#6b8e23",
|
|
6574
|
+
"Olive Green": "#b5b35c",
|
|
6575
|
+
"Olive Haze": "#8b8470",
|
|
6576
|
+
Olivetone: "#716e10",
|
|
6577
|
+
Olivine: "#9ab973",
|
|
6578
|
+
Onahau: "#cdf4ff",
|
|
6579
|
+
Onion: "#2f270e",
|
|
6580
|
+
Opal: "#a9c6c2",
|
|
6581
|
+
Opium: "#8e6f70",
|
|
6582
|
+
Oracle: "#377475",
|
|
6583
|
+
Orange: "#ff681f",
|
|
6584
|
+
"Orange Peel": "#ffa000",
|
|
6585
|
+
"Orange Roughy": "#c45719",
|
|
6586
|
+
"Orange White": "#fefced",
|
|
6587
|
+
Orchid: "#da70d6",
|
|
6588
|
+
"Orchid White": "#fffdf3",
|
|
6589
|
+
Oregon: "#9b4703",
|
|
6590
|
+
Orient: "#015e85",
|
|
6591
|
+
"Oriental Pink": "#c69191",
|
|
6592
|
+
Orinoco: "#f3fbd4",
|
|
6593
|
+
"Oslo Gray": "#878d91",
|
|
6594
|
+
Ottoman: "#e9f8ed",
|
|
6595
|
+
"Outer Space": "#2d383a",
|
|
6596
|
+
"Outrageous Orange": "#ff6037",
|
|
6597
|
+
"Oxford Blue": "#384555",
|
|
6598
|
+
Oxley: "#779e86",
|
|
6599
|
+
"Oyster Bay": "#dafaff",
|
|
6600
|
+
"Oyster Pink": "#e9cecd",
|
|
6601
|
+
Paarl: "#a65529",
|
|
6602
|
+
Pablo: "#776f61",
|
|
6603
|
+
"Pacific Blue": "#009dc4",
|
|
6604
|
+
Pacifika: "#778120",
|
|
6605
|
+
Paco: "#411f10",
|
|
6606
|
+
Padua: "#ade6c4",
|
|
6607
|
+
"Pale Canary": "#ffff99",
|
|
6608
|
+
"Pale Leaf": "#c0d3b9",
|
|
6609
|
+
"Pale Oyster": "#988d77",
|
|
6610
|
+
"Pale Prim": "#fdfeb8",
|
|
6611
|
+
"Pale Rose": "#ffe1f2",
|
|
6612
|
+
"Pale Sky": "#6e7783",
|
|
6613
|
+
"Pale Slate": "#c3bfc1",
|
|
6614
|
+
"Palm Green": "#09230f",
|
|
6615
|
+
"Palm Leaf": "#19330e",
|
|
6616
|
+
Pampas: "#f4f2ee",
|
|
6617
|
+
Panache: "#eaf6ee",
|
|
6618
|
+
Pancho: "#edcdab",
|
|
6619
|
+
"Papaya Whip": "#ffefd5",
|
|
6620
|
+
Paprika: "#8d0226",
|
|
6621
|
+
Paradiso: "#317d82",
|
|
6622
|
+
Parchment: "#f1e9d2",
|
|
6623
|
+
"Paris Daisy": "#fff46e",
|
|
6624
|
+
"Paris M": "#26056a",
|
|
6625
|
+
"Paris White": "#cadcd4",
|
|
6626
|
+
Parsley: "#134f19",
|
|
6627
|
+
"Pastel Green": "#77dd77",
|
|
6628
|
+
"Pastel Pink": "#ffd1dc",
|
|
6629
|
+
Patina: "#639a8f",
|
|
6630
|
+
"Pattens Blue": "#def5ff",
|
|
6631
|
+
Paua: "#260368",
|
|
6632
|
+
Pavlova: "#d7c498",
|
|
6633
|
+
Peach: "#ffe5b4",
|
|
6634
|
+
"Peach Cream": "#fff0db",
|
|
6635
|
+
"Peach Orange": "#ffcc99",
|
|
6636
|
+
"Peach Schnapps": "#ffdcd6",
|
|
6637
|
+
"Peach Yellow": "#fadfad",
|
|
6638
|
+
Peanut: "#782f16",
|
|
6639
|
+
Pear: "#d1e231",
|
|
6640
|
+
"Pearl Bush": "#e8e0d5",
|
|
6641
|
+
"Pearl Lusta": "#fcf4dc",
|
|
6642
|
+
Peat: "#716b56",
|
|
6643
|
+
Pelorous: "#3eabbf",
|
|
6644
|
+
Peppermint: "#e3f5e1",
|
|
6645
|
+
Perano: "#a9bef2",
|
|
6646
|
+
Perfume: "#d0bef8",
|
|
6647
|
+
"Periglacial Blue": "#e1e6d6",
|
|
6648
|
+
Periwinkle: "#ccccff",
|
|
6649
|
+
"Periwinkle Gray": "#c3cde6",
|
|
6650
|
+
"Persian Blue": "#1c39bb",
|
|
6651
|
+
"Persian Green": "#00a693",
|
|
6652
|
+
"Persian Indigo": "#32127a",
|
|
6653
|
+
"Persian Pink": "#f77fbe",
|
|
6654
|
+
"Persian Plum": "#701c1c",
|
|
6655
|
+
"Persian Red": "#cc3333",
|
|
6656
|
+
"Persian Rose": "#fe28a2",
|
|
6657
|
+
Persimmon: "#ff6b53",
|
|
6658
|
+
"Peru Tan": "#7f3a02",
|
|
6659
|
+
Pesto: "#7c7631",
|
|
6660
|
+
"Petite Orchid": "#db9690",
|
|
6661
|
+
Pewter: "#96a8a1",
|
|
6662
|
+
Pharlap: "#a3807b",
|
|
6663
|
+
Picasso: "#fff39d",
|
|
6664
|
+
"Pickled Bean": "#6e4826",
|
|
6665
|
+
"Pickled Bluewood": "#314459",
|
|
6666
|
+
"Picton Blue": "#45b1e8",
|
|
6667
|
+
"Pig Pink": "#fdd7e4",
|
|
6668
|
+
"Pigeon Post": "#afbdd9",
|
|
6669
|
+
"Pigment Indigo": "#4b0082",
|
|
6670
|
+
"Pine Cone": "#6d5e54",
|
|
6671
|
+
"Pine Glade": "#c7cd90",
|
|
6672
|
+
"Pine Green": "#01796f",
|
|
6673
|
+
"Pine Tree": "#171f04",
|
|
6674
|
+
Pink: "#ffc0cb",
|
|
6675
|
+
"Pink Flamingo": "#ff66ff",
|
|
6676
|
+
"Pink Flare": "#e1c0c8",
|
|
6677
|
+
"Pink Lace": "#ffddf4",
|
|
6678
|
+
"Pink Lady": "#fff1d8",
|
|
6679
|
+
"Pink Salmon": "#ff91a4",
|
|
6680
|
+
"Pink Swan": "#beb5b7",
|
|
6681
|
+
Piper: "#c96323",
|
|
6682
|
+
Pipi: "#fef4cc",
|
|
6683
|
+
Pippin: "#ffe1df",
|
|
6684
|
+
"Pirate Gold": "#ba7f03",
|
|
6685
|
+
Pistachio: "#9dc209",
|
|
6686
|
+
"Pixie Green": "#c0d8b6",
|
|
6687
|
+
Pizazz: "#ff9000",
|
|
6688
|
+
Pizza: "#c99415",
|
|
6689
|
+
Plantation: "#27504b",
|
|
6690
|
+
Plum: "#843179",
|
|
6691
|
+
Pohutukawa: "#8f021c",
|
|
6692
|
+
Polar: "#e5f9f6",
|
|
6693
|
+
"Polo Blue": "#8da8cc",
|
|
6694
|
+
Pomegranate: "#f34723",
|
|
6695
|
+
Pompadour: "#660045",
|
|
6696
|
+
Porcelain: "#eff2f3",
|
|
6697
|
+
Porsche: "#eaae69",
|
|
6698
|
+
"Port Gore": "#251f4f",
|
|
6699
|
+
Portafino: "#ffffb4",
|
|
6700
|
+
Portage: "#8b9fee",
|
|
6701
|
+
Portica: "#f9e663",
|
|
6702
|
+
"Pot Pourri": "#f5e7e2",
|
|
6703
|
+
"Potters Clay": "#8c5738",
|
|
6704
|
+
"Powder Ash": "#bcc9c2",
|
|
6705
|
+
"Powder Blue": "#b0e0e6",
|
|
6706
|
+
"Prairie Sand": "#9a3820",
|
|
6707
|
+
Prelude: "#d0c0e5",
|
|
6708
|
+
Prim: "#f0e2ec",
|
|
6709
|
+
Primrose: "#edea99",
|
|
6710
|
+
"Provincial Pink": "#fef5f1",
|
|
6711
|
+
"Prussian Blue": "#003153",
|
|
6712
|
+
Puce: "#cc8899",
|
|
6713
|
+
Pueblo: "#7d2c14",
|
|
6714
|
+
"Puerto Rico": "#3fc1aa",
|
|
6715
|
+
Pumice: "#c2cac4",
|
|
6716
|
+
Pumpkin: "#ff7518",
|
|
6717
|
+
"Pumpkin Skin": "#b1610b",
|
|
6718
|
+
Punch: "#dc4333",
|
|
6719
|
+
Punga: "#4d3d14",
|
|
6720
|
+
Purple: "#660099",
|
|
6721
|
+
"Purple Heart": "#652dc1",
|
|
6722
|
+
"Purple Mountain's Majesty": "#9678b6",
|
|
6723
|
+
"Purple Pizzazz": "#ff00cc",
|
|
6724
|
+
Putty: "#e7cd8c",
|
|
6725
|
+
"Quarter Pearl Lusta": "#fffdf4",
|
|
6726
|
+
"Quarter Spanish White": "#f7f2e1",
|
|
6727
|
+
Quicksand: "#bd978e",
|
|
6728
|
+
"Quill Gray": "#d6d6d1",
|
|
6729
|
+
Quincy: "#623f2d",
|
|
6730
|
+
"Racing Green": "#0c1911",
|
|
6731
|
+
"Radical Red": "#ff355e",
|
|
6732
|
+
Raffia: "#eadab8",
|
|
6733
|
+
Rainee: "#b9c8ac",
|
|
6734
|
+
Rajah: "#f7b668",
|
|
6735
|
+
Rangitoto: "#2e3222",
|
|
6736
|
+
"Rangoon Green": "#1c1e13",
|
|
6737
|
+
Raven: "#727b89",
|
|
6738
|
+
"Raw Sienna": "#d27d46",
|
|
6739
|
+
"Raw Umber": "#734a12",
|
|
6740
|
+
"Razzle Dazzle Rose": "#ff33cc",
|
|
6741
|
+
Razzmatazz: "#e30b5c",
|
|
6742
|
+
Rebel: "#3c1206",
|
|
6743
|
+
Red: "#ff0000",
|
|
6744
|
+
"Red Beech": "#7b3801",
|
|
6745
|
+
"Red Berry": "#8e0000",
|
|
6746
|
+
"Red Damask": "#da6a41",
|
|
6747
|
+
"Red Devil": "#860111",
|
|
6748
|
+
"Red Orange": "#ff3f34",
|
|
6749
|
+
"Red Oxide": "#6e0902",
|
|
6750
|
+
"Red Ribbon": "#ed0a3f",
|
|
6751
|
+
"Red Robin": "#80341f",
|
|
6752
|
+
"Red Stage": "#d05f04",
|
|
6753
|
+
"Red Violet": "#c71585",
|
|
6754
|
+
Redwood: "#5d1e0f",
|
|
6755
|
+
Reef: "#c9ffa2",
|
|
6756
|
+
"Reef Gold": "#9f821c",
|
|
6757
|
+
"Regal Blue": "#013f6a",
|
|
6758
|
+
"Regent Gray": "#86949f",
|
|
6759
|
+
"Regent St Blue": "#aad6e6",
|
|
6760
|
+
Remy: "#feebf3",
|
|
6761
|
+
"Reno Sand": "#a86515",
|
|
6762
|
+
"Resolution Blue": "#002387",
|
|
6763
|
+
Revolver: "#2c1632",
|
|
6764
|
+
Rhino: "#2e3f62",
|
|
6765
|
+
"Rice Cake": "#fffef0",
|
|
6766
|
+
"Rice Flower": "#eeffe2",
|
|
6767
|
+
"Rich Gold": "#a85307",
|
|
6768
|
+
"Rio Grande": "#bbd009",
|
|
6769
|
+
"Ripe Lemon": "#f4d81c",
|
|
6770
|
+
"Ripe Plum": "#410056",
|
|
6771
|
+
Riptide: "#8be6d8",
|
|
6772
|
+
"River Bed": "#434c59",
|
|
6773
|
+
"Rob Roy": "#eac674",
|
|
6774
|
+
"Robin's Egg Blue": "#00cccc",
|
|
6775
|
+
Rock: "#4d3833",
|
|
6776
|
+
"Rock Blue": "#9eb1cd",
|
|
6777
|
+
"Rock Spray": "#ba450c",
|
|
6778
|
+
"Rodeo Dust": "#c9b29b",
|
|
6779
|
+
"Rolling Stone": "#747d83",
|
|
6780
|
+
Roman: "#de6360",
|
|
6781
|
+
"Roman Coffee": "#795d4c",
|
|
6782
|
+
Romance: "#fffefd",
|
|
6783
|
+
Romantic: "#ffd2b7",
|
|
6784
|
+
Ronchi: "#ecc54e",
|
|
6785
|
+
"Roof Terracotta": "#a62f20",
|
|
6786
|
+
Rope: "#8e4d1e",
|
|
6787
|
+
Rose: "#ff007f",
|
|
6788
|
+
"Rose Bud": "#fbb2a3",
|
|
6789
|
+
"Rose Bud Cherry": "#800b47",
|
|
6790
|
+
"Rose Fog": "#e7bcb4",
|
|
6791
|
+
"Rose of Sharon": "#bf5500",
|
|
6792
|
+
"Rose White": "#fff6f5",
|
|
6793
|
+
Rosewood: "#65000b",
|
|
6794
|
+
Roti: "#c6a84b",
|
|
6795
|
+
Rouge: "#a23b6c",
|
|
6796
|
+
"Royal Blue": "#4169e1",
|
|
6797
|
+
"Royal Heath": "#ab3472",
|
|
6798
|
+
"Royal Purple": "#6b3fa0",
|
|
6799
|
+
Rum: "#796989",
|
|
6800
|
+
"Rum Swizzle": "#f9f8e4",
|
|
6801
|
+
Russet: "#80461b",
|
|
6802
|
+
Russett: "#755a57",
|
|
6803
|
+
Rust: "#b7410e",
|
|
6804
|
+
"Rustic Red": "#480404",
|
|
6805
|
+
"Rusty Nail": "#86560a",
|
|
6806
|
+
Saddle: "#4c3024",
|
|
6807
|
+
"Saddle Brown": "#583401",
|
|
6808
|
+
Saffron: "#f4c430",
|
|
6809
|
+
"Saffron Mango": "#f9bf58",
|
|
6810
|
+
Sage: "#9ea587",
|
|
6811
|
+
Sahara: "#b7a214",
|
|
6812
|
+
"Sahara Sand": "#f1e788",
|
|
6813
|
+
Sail: "#b8e0f9",
|
|
6814
|
+
Salem: "#097f4b",
|
|
6815
|
+
Salmon: "#ff8c69",
|
|
6816
|
+
Salomie: "#fedb8d",
|
|
6817
|
+
"Salt Box": "#685e6e",
|
|
6818
|
+
Saltpan: "#f1f7f2",
|
|
6819
|
+
Sambuca: "#3a2010",
|
|
6820
|
+
"San Felix": "#0b6207",
|
|
6821
|
+
"San Juan": "#304b6a",
|
|
6822
|
+
"San Marino": "#456cac",
|
|
6823
|
+
"Sand Dune": "#826f65",
|
|
6824
|
+
Sandal: "#aa8d6f",
|
|
6825
|
+
Sandrift: "#ab917a",
|
|
6826
|
+
Sandstone: "#796d62",
|
|
6827
|
+
Sandwisp: "#f5e7a2",
|
|
6828
|
+
"Sandy Beach": "#ffeac8",
|
|
6829
|
+
"Sandy brown": "#f4a460",
|
|
6830
|
+
Sangria: "#92000a",
|
|
6831
|
+
"Sanguine Brown": "#8d3d38",
|
|
6832
|
+
"Santa Fe": "#b16d52",
|
|
6833
|
+
"Santas Gray": "#9fa0b1",
|
|
6834
|
+
Sapling: "#ded4a4",
|
|
6835
|
+
Sapphire: "#2f519e",
|
|
6836
|
+
Saratoga: "#555b10",
|
|
6837
|
+
"Satin Linen": "#e6e4d4",
|
|
6838
|
+
Sauvignon: "#fff5f3",
|
|
6839
|
+
Sazerac: "#fff4e0",
|
|
6840
|
+
Scampi: "#675fa6",
|
|
6841
|
+
Scandal: "#cffaf4",
|
|
6842
|
+
Scarlet: "#ff2400",
|
|
6843
|
+
"Scarlet Gum": "#431560",
|
|
6844
|
+
Scarlett: "#950015",
|
|
6845
|
+
"Scarpa Flow": "#585562",
|
|
6846
|
+
Schist: "#a9b497",
|
|
6847
|
+
"School bus Yellow": "#ffd800",
|
|
6848
|
+
Schooner: "#8b847e",
|
|
6849
|
+
"Science Blue": "#0066cc",
|
|
6850
|
+
Scooter: "#2ebfd4",
|
|
6851
|
+
Scorpion: "#695f62",
|
|
6852
|
+
"Scotch Mist": "#fffbdc",
|
|
6853
|
+
"Screamin' Green": "#66ff66",
|
|
6854
|
+
"Sea Buckthorn": "#fba129",
|
|
6855
|
+
"Sea Green": "#2e8b57",
|
|
6856
|
+
"Sea Mist": "#c5dbca",
|
|
6857
|
+
"Sea Nymph": "#78a39c",
|
|
6858
|
+
"Sea Pink": "#ed989e",
|
|
6859
|
+
Seagull: "#80ccea",
|
|
6860
|
+
Seance: "#731e8f",
|
|
6861
|
+
Seashell: "#f1f1f1",
|
|
6862
|
+
"Seashell Peach": "#fff5ee",
|
|
6863
|
+
Seaweed: "#1b2f11",
|
|
6864
|
+
Selago: "#f0eefd",
|
|
6865
|
+
"Selective Yellow": "#ffba00",
|
|
6866
|
+
Sepia: "#704214",
|
|
6867
|
+
"Sepia Black": "#2b0202",
|
|
6868
|
+
"Sepia Skin": "#9e5b40",
|
|
6869
|
+
Serenade: "#fff4e8",
|
|
6870
|
+
Shadow: "#837050",
|
|
6871
|
+
"Shadow Green": "#9ac2b8",
|
|
6872
|
+
"Shady Lady": "#aaa5a9",
|
|
6873
|
+
Shakespeare: "#4eabd1",
|
|
6874
|
+
Shalimar: "#fbffba",
|
|
6875
|
+
Shamrock: "#33cc99",
|
|
6876
|
+
Shark: "#25272c",
|
|
6877
|
+
"Sherpa Blue": "#004950",
|
|
6878
|
+
"Sherwood Green": "#02402c",
|
|
6879
|
+
Shilo: "#e8b9b3",
|
|
6880
|
+
"Shingle Fawn": "#6b4e31",
|
|
6881
|
+
"Ship Cove": "#788bba",
|
|
6882
|
+
"Ship Gray": "#3e3a44",
|
|
6883
|
+
Shiraz: "#b20931",
|
|
6884
|
+
Shocking: "#e292c0",
|
|
6885
|
+
"Shocking Pink": "#fc0fc0",
|
|
6886
|
+
"Shuttle Gray": "#5f6672",
|
|
6887
|
+
Siam: "#646a54",
|
|
6888
|
+
Sidecar: "#f3e7bb",
|
|
6889
|
+
Silk: "#bdb1a8",
|
|
6890
|
+
Silver: "#c0c0c0",
|
|
6891
|
+
"Silver Chalice": "#acacac",
|
|
6892
|
+
"Silver Rust": "#c9c0bb",
|
|
6893
|
+
"Silver Sand": "#bfc1c2",
|
|
6894
|
+
"Silver Tree": "#66b58f",
|
|
6895
|
+
Sinbad: "#9fd7d3",
|
|
6896
|
+
Siren: "#7a013a",
|
|
6897
|
+
Sirocco: "#718080",
|
|
6898
|
+
Sisal: "#d3cbba",
|
|
6899
|
+
Skeptic: "#cae6da",
|
|
6900
|
+
"Sky Blue": "#76d7ea",
|
|
6901
|
+
"Slate Gray": "#708090",
|
|
6902
|
+
Smalt: "#003399",
|
|
6903
|
+
"Smalt Blue": "#51808f",
|
|
6904
|
+
Smoky: "#605b73",
|
|
6905
|
+
"Snow Drift": "#f7faf7",
|
|
6906
|
+
"Snow Flurry": "#e4ffd1",
|
|
6907
|
+
"Snowy Mint": "#d6ffdb",
|
|
6908
|
+
Snuff: "#e2d8ed",
|
|
6909
|
+
Soapstone: "#fffbf9",
|
|
6910
|
+
"Soft Amber": "#d1c6b4",
|
|
6911
|
+
"Soft Peach": "#f5edef",
|
|
6912
|
+
"Solid Pink": "#893843",
|
|
6913
|
+
Solitaire: "#fef8e2",
|
|
6914
|
+
Solitude: "#eaf6ff",
|
|
6915
|
+
Sorbus: "#fd7c07",
|
|
6916
|
+
"Sorrell Brown": "#ceb98f",
|
|
6917
|
+
"Soya Bean": "#6a6051",
|
|
6918
|
+
"Spanish Green": "#819885",
|
|
6919
|
+
Spectra: "#2f5a57",
|
|
6920
|
+
Spice: "#6a442e",
|
|
6921
|
+
"Spicy Mix": "#885342",
|
|
6922
|
+
"Spicy Mustard": "#74640d",
|
|
6923
|
+
"Spicy Pink": "#816e71",
|
|
6924
|
+
Spindle: "#b6d1ea",
|
|
6925
|
+
Spray: "#79deec",
|
|
6926
|
+
"Spring Green": "#00ff7f",
|
|
6927
|
+
"Spring Leaves": "#578363",
|
|
6928
|
+
"Spring Rain": "#accbb1",
|
|
6929
|
+
"Spring Sun": "#f6ffdc",
|
|
6930
|
+
"Spring Wood": "#f8f6f1",
|
|
6931
|
+
Sprout: "#c1d7b0",
|
|
6932
|
+
"Spun Pearl": "#aaabb7",
|
|
6933
|
+
Squirrel: "#8f8176",
|
|
6934
|
+
"St Tropaz": "#2d569b",
|
|
6935
|
+
Stack: "#8a8f8a",
|
|
6936
|
+
"Star Dust": "#9f9f9c",
|
|
6937
|
+
"Stark White": "#e5d7bd",
|
|
6938
|
+
Starship: "#ecf245",
|
|
6939
|
+
"Steel Blue": "#4682b4",
|
|
6940
|
+
"Steel Gray": "#262335",
|
|
6941
|
+
Stiletto: "#9c3336",
|
|
6942
|
+
Stonewall: "#928573",
|
|
6943
|
+
"Storm Dust": "#646463",
|
|
6944
|
+
"Storm Gray": "#717486",
|
|
6945
|
+
Stratos: "#000741",
|
|
6946
|
+
Straw: "#d4bf8d",
|
|
6947
|
+
Strikemaster: "#956387",
|
|
6948
|
+
Stromboli: "#325d52",
|
|
6949
|
+
Studio: "#714ab2",
|
|
6950
|
+
Submarine: "#bac7c9",
|
|
6951
|
+
"Sugar Cane": "#f9fff6",
|
|
6952
|
+
Sulu: "#c1f07c",
|
|
6953
|
+
"Summer Green": "#96bbab",
|
|
6954
|
+
Sun: "#fbac13",
|
|
6955
|
+
Sundance: "#c9b35b",
|
|
6956
|
+
Sundown: "#ffb1b3",
|
|
6957
|
+
Sunflower: "#e4d422",
|
|
6958
|
+
Sunglo: "#e16865",
|
|
6959
|
+
Sunglow: "#ffcc33",
|
|
6960
|
+
"Sunset Orange": "#fe4c40",
|
|
6961
|
+
Sunshade: "#ff9e2c",
|
|
6962
|
+
Supernova: "#ffc901",
|
|
6963
|
+
Surf: "#bbd7c1",
|
|
6964
|
+
"Surf Crest": "#cfe5d2",
|
|
6965
|
+
"Surfie Green": "#0c7a79",
|
|
6966
|
+
Sushi: "#87ab39",
|
|
6967
|
+
"Suva Gray": "#888387",
|
|
6968
|
+
Swamp: "#001b1c",
|
|
6969
|
+
"Swamp Green": "#acb78e",
|
|
6970
|
+
"Swans Down": "#dcf0ea",
|
|
6971
|
+
"Sweet Corn": "#fbea8c",
|
|
6972
|
+
"Sweet Pink": "#fd9fa2",
|
|
6973
|
+
Swirl: "#d3cdc5",
|
|
6974
|
+
"Swiss Coffee": "#ddd6d5",
|
|
6975
|
+
Sycamore: "#908d39",
|
|
6976
|
+
Tabasco: "#a02712",
|
|
6977
|
+
Tacao: "#edb381",
|
|
6978
|
+
Tacha: "#d6c562",
|
|
6979
|
+
"Tahiti Gold": "#e97c07",
|
|
6980
|
+
"Tahuna Sands": "#eef0c8",
|
|
6981
|
+
"Tall Poppy": "#b32d29",
|
|
6982
|
+
Tallow: "#a8a589",
|
|
6983
|
+
Tamarillo: "#991613",
|
|
6984
|
+
Tamarind: "#341515",
|
|
6985
|
+
Tan: "#d2b48c",
|
|
6986
|
+
"Tan Hide": "#fa9d5a",
|
|
6987
|
+
Tana: "#d9dcc1",
|
|
6988
|
+
Tangaroa: "#03163c",
|
|
6989
|
+
Tangerine: "#f28500",
|
|
6990
|
+
Tango: "#ed7a1c",
|
|
6991
|
+
Tapa: "#7b7874",
|
|
6992
|
+
Tapestry: "#b05e81",
|
|
6993
|
+
Tara: "#e1f6e8",
|
|
6994
|
+
Tarawera: "#073a50",
|
|
6995
|
+
Tasman: "#cfdccf",
|
|
6996
|
+
Taupe: "#483c32",
|
|
6997
|
+
"Taupe Gray": "#b3af95",
|
|
6998
|
+
"Tawny Port": "#692545",
|
|
6999
|
+
"Te Papa Green": "#1e433c",
|
|
7000
|
+
Tea: "#c1bab0",
|
|
7001
|
+
"Tea Green": "#d0f0c0",
|
|
7002
|
+
Teak: "#b19461",
|
|
7003
|
+
Teal: "#008080",
|
|
7004
|
+
"Teal Blue": "#044259",
|
|
7005
|
+
Temptress: "#3b000b",
|
|
7006
|
+
Tenn: "#cd5700",
|
|
7007
|
+
Tequila: "#ffe6c7",
|
|
7008
|
+
Terracotta: "#e2725b",
|
|
7009
|
+
Texas: "#f8f99c",
|
|
7010
|
+
"Texas Rose": "#ffb555",
|
|
7011
|
+
Thatch: "#b69d98",
|
|
7012
|
+
"Thatch Green": "#403d19",
|
|
7013
|
+
Thistle: "#d8bfd8",
|
|
7014
|
+
"Thistle Green": "#cccaa8",
|
|
7015
|
+
Thunder: "#33292f",
|
|
7016
|
+
Thunderbird: "#c02b18",
|
|
7017
|
+
"Tia Maria": "#c1440e",
|
|
7018
|
+
Tiara: "#c3d1d1",
|
|
7019
|
+
Tiber: "#063537",
|
|
7020
|
+
"Tickle Me Pink": "#fc80a5",
|
|
7021
|
+
Tidal: "#f1ffad",
|
|
7022
|
+
Tide: "#bfb8b0",
|
|
7023
|
+
"Timber Green": "#16322c",
|
|
7024
|
+
Timberwolf: "#d9d6cf",
|
|
7025
|
+
"Titan White": "#f0eeff",
|
|
7026
|
+
Toast: "#9a6e61",
|
|
7027
|
+
"Tobacco Brown": "#715d47",
|
|
7028
|
+
Toledo: "#3a0020",
|
|
7029
|
+
Tolopea: "#1b0245",
|
|
7030
|
+
"Tom Thumb": "#3f583b",
|
|
7031
|
+
"Tonys Pink": "#e79f8c",
|
|
7032
|
+
Topaz: "#7c778a",
|
|
7033
|
+
"Torch Red": "#fd0e35",
|
|
7034
|
+
"Torea Bay": "#0f2d9e",
|
|
7035
|
+
"Tory Blue": "#1450aa",
|
|
7036
|
+
Tosca: "#8d3f3f",
|
|
7037
|
+
"Totem Pole": "#991b07",
|
|
7038
|
+
"Tower Gray": "#a9bdbf",
|
|
7039
|
+
Tradewind: "#5fb3ac",
|
|
7040
|
+
Tranquil: "#e6ffff",
|
|
7041
|
+
Travertine: "#fffde8",
|
|
7042
|
+
"Tree Poppy": "#fc9c1d",
|
|
7043
|
+
Treehouse: "#3b2820",
|
|
7044
|
+
"Trendy Green": "#7c881a",
|
|
7045
|
+
"Trendy Pink": "#8c6495",
|
|
7046
|
+
Trinidad: "#e64e03",
|
|
7047
|
+
"Tropical Blue": "#c3ddf9",
|
|
7048
|
+
"Tropical Rain Forest": "#00755e",
|
|
7049
|
+
Trout: "#4a4e5a",
|
|
7050
|
+
"True V": "#8a73d6",
|
|
7051
|
+
Tuatara: "#363534",
|
|
7052
|
+
"Tuft Bush": "#ffddcd",
|
|
7053
|
+
"Tulip Tree": "#eab33b",
|
|
7054
|
+
Tumbleweed: "#dea681",
|
|
7055
|
+
Tuna: "#353542",
|
|
7056
|
+
Tundora: "#4a4244",
|
|
7057
|
+
Turbo: "#fae600",
|
|
7058
|
+
"Turkish Rose": "#b57281",
|
|
7059
|
+
Turmeric: "#cabb48",
|
|
7060
|
+
Turquoise: "#30d5c8",
|
|
7061
|
+
"Turquoise Blue": "#6cdae7",
|
|
7062
|
+
"Turtle Green": "#2a380b",
|
|
7063
|
+
Tuscany: "#bd5e2e",
|
|
7064
|
+
Tusk: "#eef3c3",
|
|
7065
|
+
Tussock: "#c5994b",
|
|
7066
|
+
Tutu: "#fff1f9",
|
|
7067
|
+
Twilight: "#e4cfde",
|
|
7068
|
+
"Twilight Blue": "#eefdff",
|
|
7069
|
+
Twine: "#c2955d",
|
|
7070
|
+
"Tyrian Purple": "#66023c",
|
|
7071
|
+
Ultramarine: "#120a8f",
|
|
7072
|
+
Valencia: "#d84437",
|
|
7073
|
+
Valentino: "#350e42",
|
|
7074
|
+
Valhalla: "#2b194f",
|
|
7075
|
+
"Van Cleef": "#49170c",
|
|
7076
|
+
Vanilla: "#d1bea8",
|
|
7077
|
+
"Vanilla Ice": "#f3d9df",
|
|
7078
|
+
Varden: "#fff6df",
|
|
7079
|
+
"Venetian Red": "#72010f",
|
|
7080
|
+
"Venice Blue": "#055989",
|
|
7081
|
+
Venus: "#928590",
|
|
7082
|
+
Verdigris: "#5d5e37",
|
|
7083
|
+
"Verdun Green": "#495400",
|
|
7084
|
+
Vermilion: "#ff4d00",
|
|
7085
|
+
Vesuvius: "#b14a0b",
|
|
7086
|
+
Victoria: "#534491",
|
|
7087
|
+
"Vida Loca": "#549019",
|
|
7088
|
+
Viking: "#64ccdb",
|
|
7089
|
+
"Vin Rouge": "#983d61",
|
|
7090
|
+
Viola: "#cb8fa9",
|
|
7091
|
+
"Violent Violet": "#290c5e",
|
|
7092
|
+
Violet: "#240a40",
|
|
7093
|
+
"Violet Eggplant": "#991199",
|
|
7094
|
+
"Violet Red": "#f7468a",
|
|
7095
|
+
Viridian: "#40826d",
|
|
7096
|
+
"Viridian Green": "#678975",
|
|
7097
|
+
"Vis Vis": "#ffefa1",
|
|
7098
|
+
"Vista Blue": "#8fd6b4",
|
|
7099
|
+
"Vista White": "#fcf8f7",
|
|
7100
|
+
"Vivid Tangerine": "#ff9980",
|
|
7101
|
+
"Vivid Violet": "#803790",
|
|
7102
|
+
Voodoo: "#533455",
|
|
7103
|
+
Vulcan: "#10121d",
|
|
7104
|
+
Wafer: "#decbc6",
|
|
7105
|
+
"Waikawa Gray": "#5a6e9c",
|
|
7106
|
+
Waiouru: "#363c0d",
|
|
7107
|
+
Walnut: "#773f1a",
|
|
7108
|
+
Wasabi: "#788a25",
|
|
7109
|
+
"Water Leaf": "#a1e9de",
|
|
7110
|
+
Watercourse: "#056f57",
|
|
7111
|
+
Waterloo: "#7b7c94",
|
|
7112
|
+
Wattle: "#dcd747",
|
|
7113
|
+
Watusi: "#ffddcf",
|
|
7114
|
+
"Wax Flower": "#ffc0a8",
|
|
7115
|
+
"We Peep": "#f7dbe6",
|
|
7116
|
+
"Web Orange": "#ffa500",
|
|
7117
|
+
Wedgewood: "#4e7f9e",
|
|
7118
|
+
"Well Read": "#b43332",
|
|
7119
|
+
"West Coast": "#625119",
|
|
7120
|
+
"West Side": "#ff910f",
|
|
7121
|
+
Westar: "#dcd9d2",
|
|
7122
|
+
Wewak: "#f19bab",
|
|
7123
|
+
Wheat: "#f5deb3",
|
|
7124
|
+
Wheatfield: "#f3edcf",
|
|
7125
|
+
Whiskey: "#d59a6f",
|
|
7126
|
+
Whisper: "#f7f5fa",
|
|
7127
|
+
White: "#ffffff",
|
|
7128
|
+
"White Ice": "#ddf9f1",
|
|
7129
|
+
"White Lilac": "#f8f7fc",
|
|
7130
|
+
"White Linen": "#f8f0e8",
|
|
7131
|
+
"White Pointer": "#fef8ff",
|
|
7132
|
+
"White Rock": "#eae8d4",
|
|
7133
|
+
"Wild Blue Yonder": "#7a89b8",
|
|
7134
|
+
"Wild Rice": "#ece090",
|
|
7135
|
+
"Wild Sand": "#f4f4f4",
|
|
7136
|
+
"Wild Strawberry": "#ff3399",
|
|
7137
|
+
"Wild Watermelon": "#fd5b78",
|
|
7138
|
+
"Wild Willow": "#b9c46a",
|
|
7139
|
+
William: "#3a686c",
|
|
7140
|
+
"Willow Brook": "#dfecda",
|
|
7141
|
+
"Willow Grove": "#65745d",
|
|
7142
|
+
Windsor: "#3c0878",
|
|
7143
|
+
"Wine Berry": "#591d35",
|
|
7144
|
+
"Winter Hazel": "#d5d195",
|
|
7145
|
+
"Wisp Pink": "#fef4f8",
|
|
7146
|
+
Wisteria: "#9771b5",
|
|
7147
|
+
Wistful: "#a4a6d3",
|
|
7148
|
+
"Witch Haze": "#fffc99",
|
|
7149
|
+
"Wood Bark": "#261105",
|
|
7150
|
+
Woodland: "#4d5328",
|
|
7151
|
+
Woodrush: "#302a0f",
|
|
7152
|
+
Woodsmoke: "#0c0d0f",
|
|
7153
|
+
"Woody Brown": "#483131",
|
|
7154
|
+
Xanadu: "#738678",
|
|
7155
|
+
Yellow: "#ffff00",
|
|
7156
|
+
"Yellow Green": "#c5e17a",
|
|
7157
|
+
"Yellow Metal": "#716338",
|
|
7158
|
+
"Yellow Orange": "#ffae42",
|
|
7159
|
+
"Yellow Sea": "#fea904",
|
|
7160
|
+
"Your Pink": "#ffc3c0",
|
|
7161
|
+
"Yukon Gold": "#7b6608",
|
|
7162
|
+
Yuma: "#cec291",
|
|
7163
|
+
Zambezi: "#685558",
|
|
7164
|
+
Zanah: "#daecd6",
|
|
7165
|
+
Zest: "#e5841b",
|
|
7166
|
+
Zeus: "#292319",
|
|
7167
|
+
Ziggurat: "#bfdbe2",
|
|
7168
|
+
Zinnwaldite: "#ebc2af",
|
|
7169
|
+
Zircon: "#f4f8ff",
|
|
7170
|
+
Zombie: "#e4d69b",
|
|
7171
|
+
Zorba: "#a59b91",
|
|
7172
|
+
Zuccini: "#044022",
|
|
7173
|
+
Zumthor: "#edf6ff"
|
|
7174
|
+
},
|
|
7175
|
+
normalize: standardNormalize,
|
|
7176
|
+
defaultMetric: "deltaE2000"
|
|
7177
|
+
};
|
|
7178
|
+
//#endregion
|
|
4630
7179
|
//#region src/ui/shadowMenu.tsx
|
|
4631
7180
|
const shadowMenuContext = X$2(null);
|
|
4632
7181
|
function ShadowMenu(props) {
|
|
@@ -5187,6 +7736,8 @@ const CREATE_DIALOG_RANGE_STYLE = {
|
|
|
5187
7736
|
width: "100%",
|
|
5188
7737
|
height: "18px"
|
|
5189
7738
|
};
|
|
7739
|
+
const CREATE_COLOR_TOKEN_SECTION = "tokens.colors";
|
|
7740
|
+
const CREATE_SEMANTIC_COLOR_TOKEN_SECTION = "semanticTokens.colors";
|
|
5190
7741
|
function colorTokenSelectorOptions(metadata) {
|
|
5191
7742
|
if (!metadata) return [];
|
|
5192
7743
|
return [...metadata.semanticColorTokens.items.map(colorTokenSelectorOption), ...metadata.colorTokens.items.map(colorTokenSelectorOption)];
|
|
@@ -5194,16 +7745,27 @@ function colorTokenSelectorOptions(metadata) {
|
|
|
5194
7745
|
function shouldUseColorTokenSelector(path, value, options) {
|
|
5195
7746
|
const property = pandaPreviewRootProperty(path);
|
|
5196
7747
|
if (!property || !COLOR_TOKEN_PROPERTIES.has(property)) return false;
|
|
7748
|
+
if (validHexColor(value)) return true;
|
|
5197
7749
|
const tokenPath = tokenPathFromValueOrTokenReference(value, "colors");
|
|
5198
7750
|
return options.some((option) => option.tokenPath === tokenPath);
|
|
5199
7751
|
}
|
|
5200
7752
|
function colorTokenOpacityInputValue(value) {
|
|
5201
7753
|
const colorTokenValue = pandaColorTokenValueFromString(value);
|
|
5202
|
-
if (
|
|
5203
|
-
|
|
7754
|
+
if (colorTokenValue) return {
|
|
7755
|
+
kind: "token",
|
|
5204
7756
|
tokenPath: colorTokenValue.tokenPath,
|
|
5205
7757
|
opacity: colorTokenValue.opacity,
|
|
5206
|
-
collapsedEditable: colorTokenValue.opacity === "100"
|
|
7758
|
+
collapsedEditable: colorTokenValue.opacity === "100",
|
|
7759
|
+
wrapped: colorTokenValue.wrapped
|
|
7760
|
+
};
|
|
7761
|
+
const hexColorValue = hexColorOpacityValueFromString(value);
|
|
7762
|
+
if (!hexColorValue) return void 0;
|
|
7763
|
+
return {
|
|
7764
|
+
kind: "hex",
|
|
7765
|
+
colorValue: hexColorValue.colorValue,
|
|
7766
|
+
opacity: hexColorValue.opacity,
|
|
7767
|
+
collapsedEditable: hexColorValue.opacity === "100",
|
|
7768
|
+
swatch: hexColorValue.colorValue
|
|
5207
7769
|
};
|
|
5208
7770
|
}
|
|
5209
7771
|
function colorTokenSelectorOption(token) {
|
|
@@ -5291,6 +7853,54 @@ function searchableTokenValue(value) {
|
|
|
5291
7853
|
function validHexColor(value) {
|
|
5292
7854
|
return /^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(value.trim());
|
|
5293
7855
|
}
|
|
7856
|
+
function rawHexColorOption(value) {
|
|
7857
|
+
const hex = value.trim();
|
|
7858
|
+
if (!validHexColor(hex)) return void 0;
|
|
7859
|
+
return {
|
|
7860
|
+
id: `raw-color:${hex}`,
|
|
7861
|
+
label: hex,
|
|
7862
|
+
groupLabel: "Raw colors",
|
|
7863
|
+
detail: "Use exact hex color",
|
|
7864
|
+
swatch: hex,
|
|
7865
|
+
rawValue: hex
|
|
7866
|
+
};
|
|
7867
|
+
}
|
|
7868
|
+
function hexColorOpacityValueFromString(value) {
|
|
7869
|
+
const channels = hexColorChannels(value);
|
|
7870
|
+
if (!channels) return void 0;
|
|
7871
|
+
return {
|
|
7872
|
+
colorValue: `#${hexPair(channels.red)}${hexPair(channels.green)}${hexPair(channels.blue)}`,
|
|
7873
|
+
opacity: channels.alpha === void 0 ? "100" : String(Math.round(channels.alpha / 255 * 100))
|
|
7874
|
+
};
|
|
7875
|
+
}
|
|
7876
|
+
function hexColorChannels(value) {
|
|
7877
|
+
if (!validHexColor(value)) return void 0;
|
|
7878
|
+
const hex = value.trim().replace(/^#/, "");
|
|
7879
|
+
if (hex.length === 3 || hex.length === 4) return {
|
|
7880
|
+
red: Number.parseInt(`${hex[0]}${hex[0]}`, 16),
|
|
7881
|
+
green: Number.parseInt(`${hex[1]}${hex[1]}`, 16),
|
|
7882
|
+
blue: Number.parseInt(`${hex[2]}${hex[2]}`, 16),
|
|
7883
|
+
alpha: hex.length === 4 ? Number.parseInt(`${hex[3]}${hex[3]}`, 16) : void 0
|
|
7884
|
+
};
|
|
7885
|
+
return {
|
|
7886
|
+
red: Number.parseInt(hex.slice(0, 2), 16),
|
|
7887
|
+
green: Number.parseInt(hex.slice(2, 4), 16),
|
|
7888
|
+
blue: Number.parseInt(hex.slice(4, 6), 16),
|
|
7889
|
+
alpha: hex.length === 8 ? Number.parseInt(hex.slice(6, 8), 16) : void 0
|
|
7890
|
+
};
|
|
7891
|
+
}
|
|
7892
|
+
function hexColorValueForOpacity(value, opacity) {
|
|
7893
|
+
const channels = hexColorChannels(value);
|
|
7894
|
+
const opacityNumber = Number.parseFloat(opacity);
|
|
7895
|
+
if (!channels || Number.isNaN(opacityNumber)) return void 0;
|
|
7896
|
+
const color = `#${hexPair(channels.red)}${hexPair(channels.green)}${hexPair(channels.blue)}`;
|
|
7897
|
+
if (opacityNumber >= 100) return color;
|
|
7898
|
+
return `${color}${hexPair(clampNumber(opacityNumber, 0, 100) / 100 * 255)}`;
|
|
7899
|
+
}
|
|
7900
|
+
function hexColorEqual(left, right) {
|
|
7901
|
+
if (!left || !validHexColor(left) || !validHexColor(right)) return false;
|
|
7902
|
+
return expandHexColor(left).toLowerCase() === expandHexColor(right).toLowerCase();
|
|
7903
|
+
}
|
|
5294
7904
|
function clampNumber(value, min, max) {
|
|
5295
7905
|
if (Number.isNaN(value)) return min;
|
|
5296
7906
|
return Math.min(max, Math.max(min, value));
|
|
@@ -5308,7 +7918,6 @@ function hsvaFromHexColor(value) {
|
|
|
5308
7918
|
const red = Number.parseInt(hex.slice(0, 2), 16) / 255;
|
|
5309
7919
|
const green = Number.parseInt(hex.slice(2, 4), 16) / 255;
|
|
5310
7920
|
const blue = Number.parseInt(hex.slice(4, 6), 16) / 255;
|
|
5311
|
-
const alpha = hex.length === 8 ? Number.parseInt(hex.slice(6, 8), 16) / 255 * 100 : 100;
|
|
5312
7921
|
const max = Math.max(red, green, blue);
|
|
5313
7922
|
const delta = max - Math.min(red, green, blue);
|
|
5314
7923
|
let hue = 0;
|
|
@@ -5322,8 +7931,7 @@ function hsvaFromHexColor(value) {
|
|
|
5322
7931
|
return {
|
|
5323
7932
|
hue,
|
|
5324
7933
|
saturation: max === 0 ? 0 : delta / max * 100,
|
|
5325
|
-
value: max * 100
|
|
5326
|
-
alpha
|
|
7934
|
+
value: max * 100
|
|
5327
7935
|
};
|
|
5328
7936
|
}
|
|
5329
7937
|
function hexColorFromHsva(color) {
|
|
@@ -5356,19 +7964,14 @@ function hexColorFromHsva(color) {
|
|
|
5356
7964
|
red = chroma;
|
|
5357
7965
|
blue = x;
|
|
5358
7966
|
}
|
|
5359
|
-
|
|
5360
|
-
const hex = `#${hexPair((red + match) * 255)}${hexPair((green + match) * 255)}${hexPair((blue + match) * 255)}`;
|
|
5361
|
-
return alpha >= 100 ? hex : `${hex}${hexPair(alpha / 100 * 255)}`;
|
|
5362
|
-
}
|
|
5363
|
-
function opaqueHexColorFromHsva(color) {
|
|
5364
|
-
return hexColorFromHsva({
|
|
5365
|
-
...color,
|
|
5366
|
-
alpha: 100
|
|
5367
|
-
});
|
|
7967
|
+
return `#${hexPair((red + match) * 255)}${hexPair((green + match) * 255)}${hexPair((blue + match) * 255)}`;
|
|
5368
7968
|
}
|
|
5369
7969
|
function validTokenPath(value) {
|
|
5370
7970
|
return /^[A-Za-z_][\w-]*(?:\.[A-Za-z0-9_][\w-]*)*$/.test(value.trim());
|
|
5371
7971
|
}
|
|
7972
|
+
function ntcTokenPathFromHexColor(value) {
|
|
7973
|
+
return (identify(value, { palette: ntc }) ?? "color").trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "color";
|
|
7974
|
+
}
|
|
5372
7975
|
function jsonPrimitiveText$1(value) {
|
|
5373
7976
|
if (value === void 0) return void 0;
|
|
5374
7977
|
if (typeof value === "string") return value;
|
|
@@ -5471,8 +8074,19 @@ function ColorTokenOpacityInput(props) {
|
|
|
5471
8074
|
const variant = props.variant ?? "full";
|
|
5472
8075
|
const noAutoOpen = useSignal(null);
|
|
5473
8076
|
const colorTokenValue = pandaColorTokenValueFromString(props.value);
|
|
5474
|
-
|
|
5475
|
-
const
|
|
8077
|
+
const hexColorValue = hexColorOpacityValueFromString(props.value);
|
|
8078
|
+
const opacityValue = colorTokenValue ? {
|
|
8079
|
+
kind: "token",
|
|
8080
|
+
tokenPath: colorTokenValue.tokenPath,
|
|
8081
|
+
opacity: colorTokenValue.opacity,
|
|
8082
|
+
wrapped: colorTokenValue.wrapped
|
|
8083
|
+
} : hexColorValue ? {
|
|
8084
|
+
kind: "hex",
|
|
8085
|
+
colorValue: hexColorValue.colorValue,
|
|
8086
|
+
opacity: hexColorValue.opacity
|
|
8087
|
+
} : void 0;
|
|
8088
|
+
if (!opacityValue) return null;
|
|
8089
|
+
const colorOnlyValue = opacityValue.kind === "token" ? opacityValue.wrapped ? `token(colors.${opacityValue.tokenPath})` : opacityValue.tokenPath : opacityValue.colorValue;
|
|
5476
8090
|
const showInvalid = props.invalid;
|
|
5477
8091
|
const borderColor = showInvalid ? "#fca5a5" : props.changed ? "#93c5fd" : "#d6dde8";
|
|
5478
8092
|
const background = showInvalid ? "#fef2f2" : props.changed ? "#eff6ff" : "#fff";
|
|
@@ -5491,17 +8105,42 @@ function ColorTokenOpacityInput(props) {
|
|
|
5491
8105
|
const updateToken = (tokenValue, mode) => {
|
|
5492
8106
|
const nextToken = pandaColorTokenValueFromString(tokenValue);
|
|
5493
8107
|
if (!nextToken) return;
|
|
5494
|
-
props.onPreviewInput(props.targetId, props.path, props.originalValue, colorTokenValueForCurrentSyntax(props.value, nextToken.tokenPath,
|
|
8108
|
+
props.onPreviewInput(props.targetId, props.path, props.originalValue, colorTokenValueForCurrentSyntax(props.value, nextToken.tokenPath, opacityValue.opacity), mode);
|
|
8109
|
+
};
|
|
8110
|
+
const updateHexColor = (value, mode) => {
|
|
8111
|
+
const nextValue = hexColorValueForOpacity(value, opacityValue.opacity);
|
|
8112
|
+
if (!nextValue) return;
|
|
8113
|
+
props.onPreviewInput(props.targetId, props.path, props.originalValue, nextValue, mode);
|
|
5495
8114
|
};
|
|
5496
8115
|
const updateOpacity = (opacity) => {
|
|
5497
|
-
|
|
8116
|
+
const value = opacityValue.kind === "token" ? colorTokenValueForCurrentSyntax(props.value, opacityValue.tokenPath, opacity) : hexColorValueForOpacity(opacityValue.colorValue, opacity);
|
|
8117
|
+
if (!value) return;
|
|
8118
|
+
props.onPreviewInput(props.targetId, props.path, props.originalValue, value, "input");
|
|
5498
8119
|
};
|
|
5499
8120
|
_$2(() => {
|
|
5500
8121
|
if (!props.expanded || variant !== "expanded-parts") return;
|
|
5501
8122
|
(expandedRoot.current?.querySelector("button:not(:disabled), input:not(:disabled)"))?.focus();
|
|
5502
8123
|
}, []);
|
|
5503
|
-
if (
|
|
5504
|
-
|
|
8124
|
+
if (variant === "placeholder") return /* @__PURE__ */ u("button", {
|
|
8125
|
+
type: "button",
|
|
8126
|
+
"data-color-token-opacity-collapsed": "true",
|
|
8127
|
+
"data-preview-target-id": props.targetId,
|
|
8128
|
+
"data-preview-path": props.pathLabel,
|
|
8129
|
+
"data-preview-changed": props.changed ? "true" : "false",
|
|
8130
|
+
"data-preview-invalid": showInvalid ? "true" : "false",
|
|
8131
|
+
"data-preview-original-value": props.originalValue,
|
|
8132
|
+
tabIndex: -1,
|
|
8133
|
+
disabled: props.saving.value,
|
|
8134
|
+
"aria-hidden": "true",
|
|
8135
|
+
style: {
|
|
8136
|
+
...collapsedStyle,
|
|
8137
|
+
visibility: "hidden",
|
|
8138
|
+
pointerEvents: "none"
|
|
8139
|
+
},
|
|
8140
|
+
children: props.value
|
|
8141
|
+
});
|
|
8142
|
+
if (!props.expanded) {
|
|
8143
|
+
if (opacityValue.opacity === "100") return /* @__PURE__ */ u(ColorTokenValueInput, {
|
|
5505
8144
|
targetId: props.targetId,
|
|
5506
8145
|
path: props.path,
|
|
5507
8146
|
pathLabel: props.pathLabel,
|
|
@@ -5520,35 +8159,30 @@ function ColorTokenOpacityInput(props) {
|
|
|
5520
8159
|
onMenuOpenChange: props.onMenuOpenChange,
|
|
5521
8160
|
onArrowRight: props.onExpand
|
|
5522
8161
|
});
|
|
5523
|
-
return /* @__PURE__ */ u(
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
8162
|
+
return /* @__PURE__ */ u(ColorTokenValueInput, {
|
|
8163
|
+
targetId: props.targetId,
|
|
8164
|
+
path: props.path,
|
|
8165
|
+
pathLabel: props.pathLabel,
|
|
8166
|
+
originalValue: props.originalValue,
|
|
8167
|
+
value: props.value,
|
|
8168
|
+
changed: props.changed,
|
|
8169
|
+
invalid: props.invalid,
|
|
8170
|
+
autoOpen: props.autoOpen,
|
|
8171
|
+
options: props.options,
|
|
8172
|
+
tokenSources: props.tokenSources,
|
|
8173
|
+
saving: props.saving,
|
|
8174
|
+
onAutoOpenHandled: props.onAutoOpenHandled,
|
|
8175
|
+
onPreviewInput: (_editId, _path, _originalValue, value, mode) => {
|
|
8176
|
+
if (validHexColor(value)) {
|
|
8177
|
+
updateHexColor(value, mode);
|
|
5539
8178
|
return;
|
|
5540
8179
|
}
|
|
5541
|
-
|
|
5542
|
-
if (event.key !== "ArrowRight") return;
|
|
5543
|
-
event.preventDefault();
|
|
5544
|
-
props.onExpand();
|
|
8180
|
+
updateToken(value, mode);
|
|
5545
8181
|
},
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
} : collapsedStyle,
|
|
5551
|
-
children: props.value
|
|
8182
|
+
onModBackspace: props.onModBackspace,
|
|
8183
|
+
onCreateToken: props.onCreateToken,
|
|
8184
|
+
onMenuOpenChange: props.onMenuOpenChange,
|
|
8185
|
+
onArrowRight: props.onExpand
|
|
5552
8186
|
});
|
|
5553
8187
|
}
|
|
5554
8188
|
return /* @__PURE__ */ u("div", {
|
|
@@ -5589,6 +8223,10 @@ function ColorTokenOpacityInput(props) {
|
|
|
5589
8223
|
saving: props.saving,
|
|
5590
8224
|
onAutoOpenHandled: () => {},
|
|
5591
8225
|
onPreviewInput: (_editId, _path, _originalValue, value, mode) => {
|
|
8226
|
+
if (validHexColor(value)) {
|
|
8227
|
+
updateHexColor(value, mode);
|
|
8228
|
+
return;
|
|
8229
|
+
}
|
|
5592
8230
|
updateToken(value, mode);
|
|
5593
8231
|
},
|
|
5594
8232
|
onModBackspace: props.onModBackspace,
|
|
@@ -5615,7 +8253,7 @@ function ColorTokenOpacityInput(props) {
|
|
|
5615
8253
|
"data-color-token-opacity-control": "true",
|
|
5616
8254
|
children: /* @__PURE__ */ u(SteppableNumericInput, {
|
|
5617
8255
|
property: "colorTokenOpacity",
|
|
5618
|
-
value:
|
|
8256
|
+
value: opacityValue.opacity,
|
|
5619
8257
|
disabled: props.saving.value,
|
|
5620
8258
|
label: `${props.pathLabel} opacity`,
|
|
5621
8259
|
dataAttributes: {
|
|
@@ -5641,7 +8279,6 @@ function ColorTokenValueInput(props) {
|
|
|
5641
8279
|
const focused = useSignal(false);
|
|
5642
8280
|
const createDialogOpen = useSignal(false);
|
|
5643
8281
|
const createTokenPath = useSignal("");
|
|
5644
|
-
const createTokenKind = useSignal("token");
|
|
5645
8282
|
const createColor = useSignal(hsvaFromHexColor("#ff0000"));
|
|
5646
8283
|
const createColorHex = useSignal("#ff0000");
|
|
5647
8284
|
const createSourceTargetId = useSignal("");
|
|
@@ -5659,51 +8296,67 @@ function ColorTokenValueInput(props) {
|
|
|
5659
8296
|
const menuSelectionConfirmed = A$1(false);
|
|
5660
8297
|
const preparedOptions = useComputed(() => props.options.value.map(prepareColorTokenOption));
|
|
5661
8298
|
const filteredOptions = useComputed(() => filteredColorTokenOptions(query.value, preparedOptions.value));
|
|
8299
|
+
const searchedHexMatchesToken = useComputed(() => {
|
|
8300
|
+
const value = query.value.trim();
|
|
8301
|
+
if (!validHexColor(value)) return false;
|
|
8302
|
+
return props.options.value.some((option) => hexColorEqual(option.swatch, value) || hexColorEqual(option.detail, value));
|
|
8303
|
+
});
|
|
8304
|
+
const rawHexOption = useComputed(() => searchedHexMatchesToken.value ? void 0 : rawHexColorOption(query.value));
|
|
8305
|
+
const currentRawHexOption = useComputed(() => rawHexColorOption(props.value));
|
|
8306
|
+
const menuRawHexOption = useComputed(() => rawHexOption.value ?? (query.value.trim().length === 0 ? currentRawHexOption.value : void 0));
|
|
8307
|
+
const visibleOptions = useComputed(() => menuRawHexOption.value ? [menuRawHexOption.value, ...filteredOptions.value] : filteredOptions.value);
|
|
5662
8308
|
const hasFilterQuery = useComputed(() => query.value.trim().length > 0);
|
|
5663
8309
|
const groupedOptions = useComputed(() => groupedColorTokenOptions(filteredOptions.value));
|
|
8310
|
+
const createTokenPathExplicit = useComputed(() => createTokenPath.value.trim().length > 0);
|
|
8311
|
+
const createTokenSection = useComputed(() => createTokenPathExplicit.value ? CREATE_SEMANTIC_COLOR_TOKEN_SECTION : CREATE_COLOR_TOKEN_SECTION);
|
|
8312
|
+
const createTokenPathPlaceholder = useComputed(() => validHexColor(createColorHex.value) ? ntcTokenPathFromHexColor(createColorHex.value) : "");
|
|
5664
8313
|
const writableTokenSources = useComputed(() => props.tokenSources.value.filter((source) => source.writable && source.writableSections.length > 0));
|
|
5665
8314
|
const selectedCreateSource = useComputed(() => {
|
|
5666
|
-
const
|
|
5667
|
-
const matching = writableTokenSources.value.find((source) => source.id === createSourceTargetId.value && source.writableSections.includes(section));
|
|
8315
|
+
const matching = writableTokenSources.value.find((source) => source.id === createSourceTargetId.value && source.writableSections.includes(createTokenSection.value));
|
|
5668
8316
|
if (matching) return matching;
|
|
5669
|
-
return writableTokenSources.value.find((source) => source.writableSections.includes(
|
|
8317
|
+
return writableTokenSources.value.find((source) => source.writableSections.includes(createTokenSection.value));
|
|
5670
8318
|
});
|
|
5671
8319
|
const createTargetSources = useComputed(() => {
|
|
5672
|
-
|
|
5673
|
-
return writableTokenSources.value.filter((source) => source.writableSections.includes(section));
|
|
8320
|
+
return writableTokenSources.value.filter((source) => source.writableSections.includes(createTokenSection.value));
|
|
5674
8321
|
});
|
|
8322
|
+
const createTokenAvailable = useComputed(() => writableTokenSources.value.some((source) => source.writableSections.includes(CREATE_COLOR_TOKEN_SECTION) || source.writableSections.includes(CREATE_SEMANTIC_COLOR_TOKEN_SECTION)));
|
|
5675
8323
|
const createOptionVisible = useComputed(() => {
|
|
5676
8324
|
const value = query.value.trim();
|
|
5677
|
-
if (
|
|
8325
|
+
if (!createTokenAvailable.value) return false;
|
|
5678
8326
|
if (value.length === 0) return true;
|
|
5679
8327
|
return value.startsWith("#") && validHexColor(value) && filteredOptions.value.length === 0;
|
|
5680
8328
|
});
|
|
5681
|
-
const selectableOptionIds = useComputed(() => createOptionVisible.value ? [
|
|
8329
|
+
const selectableOptionIds = useComputed(() => createOptionVisible.value ? [
|
|
8330
|
+
...menuRawHexOption.value ? [menuRawHexOption.value.id] : [],
|
|
8331
|
+
"create-token",
|
|
8332
|
+
...filteredOptions.value.filter((option) => option.disabled !== true).map((option) => option.id)
|
|
8333
|
+
] : visibleOptions.value.filter((option) => option.disabled !== true).map((option) => option.id));
|
|
5682
8334
|
const activeSelectableOptionId = useComputed(() => selectableOptionIds.value.includes(activeOptionId.value ?? "") ? activeOptionId.value : selectableOptionIds.value[0]);
|
|
5683
8335
|
const showInvalid = props.invalid && !focused.value;
|
|
5684
8336
|
const borderColor = showInvalid ? "#fca5a5" : props.changed ? "#93c5fd" : "#d6dde8";
|
|
5685
8337
|
const background = showInvalid ? "#fef2f2" : props.changed ? "#eff6ff" : "#fff";
|
|
5686
8338
|
const selectedTokenPath = tokenPathFromValueOrTokenReference(props.value, "colors");
|
|
5687
|
-
const selectedOption = props.options.value.find((option) => option.tokenPath === selectedTokenPath);
|
|
8339
|
+
const selectedOption = props.options.value.find((option) => option.tokenPath === selectedTokenPath) ?? currentRawHexOption.value;
|
|
5688
8340
|
const selectedOptionId = selectedOption?.id;
|
|
5689
8341
|
const previewOption = (option) => {
|
|
5690
|
-
if (!option.tokenPath || props.saving.value) return;
|
|
5691
|
-
|
|
8342
|
+
if (!option.tokenPath && !option.rawValue || props.saving.value) return;
|
|
8343
|
+
const value = option.rawValue ?? colorTokenValueForCurrentSyntax(props.value, option.tokenPath);
|
|
8344
|
+
props.onPreviewInput(props.targetId, props.path, props.originalValue, value, "transient");
|
|
5692
8345
|
};
|
|
5693
8346
|
const selectOption = (option) => {
|
|
5694
|
-
if (!option.tokenPath || props.saving.value) return;
|
|
8347
|
+
if (!option.tokenPath && !option.rawValue || props.saving.value) return;
|
|
5695
8348
|
const baselineValue = menuBaselineValue.current;
|
|
5696
8349
|
if (baselineValue !== void 0) props.onPreviewInput(props.targetId, props.path, props.originalValue, baselineValue, "transient");
|
|
5697
8350
|
menuSelectionConfirmed.current = true;
|
|
5698
8351
|
menuOpen.value = false;
|
|
5699
|
-
|
|
8352
|
+
const value = option.rawValue ?? colorTokenValueForCurrentSyntax(props.value, option.tokenPath);
|
|
8353
|
+
props.onPreviewInput(props.targetId, props.path, props.originalValue, value, "immediate");
|
|
5700
8354
|
};
|
|
5701
8355
|
const openCreateDialog = () => {
|
|
5702
|
-
const
|
|
8356
|
+
const initialColor = hsvaFromHexColor(validHexColor(query.value) ? query.value.trim() : "#ff0000");
|
|
5703
8357
|
createTokenPath.value = "";
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
createColorHex.value = initialHex;
|
|
8358
|
+
createColor.value = initialColor;
|
|
8359
|
+
createColorHex.value = hexColorFromHsva(initialColor);
|
|
5707
8360
|
createSourceTargetId.value = selectedCreateSource.value?.id ?? "";
|
|
5708
8361
|
createApplyToInput.value = true;
|
|
5709
8362
|
createError.value = "";
|
|
@@ -5722,7 +8375,7 @@ function ColorTokenValueInput(props) {
|
|
|
5722
8375
|
activeOptionId.value = nextId;
|
|
5723
8376
|
if (nextId) {
|
|
5724
8377
|
scrollOptionIntoView(nextId);
|
|
5725
|
-
const option =
|
|
8378
|
+
const option = visibleOptions.value.find((item) => item.id === nextId);
|
|
5726
8379
|
if (option) previewOption(option);
|
|
5727
8380
|
}
|
|
5728
8381
|
};
|
|
@@ -5733,7 +8386,7 @@ function ColorTokenValueInput(props) {
|
|
|
5733
8386
|
openCreateDialog();
|
|
5734
8387
|
return;
|
|
5735
8388
|
}
|
|
5736
|
-
const option =
|
|
8389
|
+
const option = visibleOptions.value.find((item) => item.id === activeId);
|
|
5737
8390
|
if (option) selectOption(option);
|
|
5738
8391
|
};
|
|
5739
8392
|
const closeCreateDialog = () => {
|
|
@@ -5742,10 +8395,10 @@ function ColorTokenValueInput(props) {
|
|
|
5742
8395
|
trigger.current?.focus();
|
|
5743
8396
|
};
|
|
5744
8397
|
const submitCreateToken = () => {
|
|
5745
|
-
const tokenPath = createTokenPath.value.trim();
|
|
8398
|
+
const tokenPath = createTokenPath.value.trim() || createTokenPathPlaceholder.value;
|
|
5746
8399
|
const value = createColorHex.value.trim();
|
|
5747
|
-
const section = createTokenKind.value === "token" ? "tokens.colors" : "semanticTokens.colors";
|
|
5748
8400
|
const source = selectedCreateSource.value;
|
|
8401
|
+
const section = createTokenSection.value;
|
|
5749
8402
|
if (!validHexColor(value)) {
|
|
5750
8403
|
createError.value = "Enter a valid hex color value.";
|
|
5751
8404
|
return;
|
|
@@ -5759,14 +8412,13 @@ function ColorTokenValueInput(props) {
|
|
|
5759
8412
|
return;
|
|
5760
8413
|
}
|
|
5761
8414
|
if (!source || !source.writableSections.includes(section)) {
|
|
5762
|
-
createError.value = "Choose a writable Panda config target for
|
|
8415
|
+
createError.value = createTokenPathExplicit.value ? "Choose a writable Panda config target for semantic color tokens." : "Choose a writable Panda config target for color tokens.";
|
|
5763
8416
|
return;
|
|
5764
8417
|
}
|
|
5765
8418
|
createSaving.value = true;
|
|
5766
8419
|
createError.value = "";
|
|
5767
8420
|
props.onCreateToken({
|
|
5768
8421
|
tokenPath,
|
|
5769
|
-
tokenKind: createTokenKind.value,
|
|
5770
8422
|
value,
|
|
5771
8423
|
sourceTargetId: source.id,
|
|
5772
8424
|
section
|
|
@@ -5865,28 +8517,27 @@ function ColorTokenValueInput(props) {
|
|
|
5865
8517
|
};
|
|
5866
8518
|
const updateCreateColorHex = (value) => {
|
|
5867
8519
|
createColorHex.value = value;
|
|
5868
|
-
if (validHexColor(value))
|
|
8520
|
+
if (validHexColor(value)) {
|
|
8521
|
+
const nextColor = hsvaFromHexColor(value);
|
|
8522
|
+
createColor.value = nextColor;
|
|
8523
|
+
createColorHex.value = hexColorFromHsva(nextColor);
|
|
8524
|
+
}
|
|
5869
8525
|
};
|
|
5870
8526
|
const hueSliderBackground = "linear-gradient(90deg, #f00, #ff0 16.67%, #0f0 33.33%, #0ff 50%, #00f 66.67%, #f0f 83.33%, #f00)";
|
|
5871
|
-
const saturationSliderBackground = `linear-gradient(90deg, ${
|
|
8527
|
+
const saturationSliderBackground = `linear-gradient(90deg, ${hexColorFromHsva({
|
|
5872
8528
|
hue: createColor.value.hue,
|
|
5873
8529
|
saturation: 0,
|
|
5874
8530
|
value: createColor.value.value
|
|
5875
|
-
})}, ${
|
|
8531
|
+
})}, ${hexColorFromHsva({
|
|
5876
8532
|
hue: createColor.value.hue,
|
|
5877
8533
|
saturation: 100,
|
|
5878
8534
|
value: createColor.value.value
|
|
5879
8535
|
})})`;
|
|
5880
|
-
const valueSliderBackground = `linear-gradient(90deg, #000000, ${
|
|
8536
|
+
const valueSliderBackground = `linear-gradient(90deg, #000000, ${hexColorFromHsva({
|
|
5881
8537
|
hue: createColor.value.hue,
|
|
5882
8538
|
saturation: createColor.value.saturation,
|
|
5883
8539
|
value: 100
|
|
5884
8540
|
})})`;
|
|
5885
|
-
const alphaSliderBackground = "linear-gradient(90deg, transparent, " + opaqueHexColorFromHsva({
|
|
5886
|
-
hue: createColor.value.hue,
|
|
5887
|
-
saturation: createColor.value.saturation,
|
|
5888
|
-
value: createColor.value.value
|
|
5889
|
-
}) + "), linear-gradient(45deg, #d6dde8 25%, transparent 25%), linear-gradient(-45deg, #d6dde8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d6dde8 75%), linear-gradient(-45deg, transparent 75%, #d6dde8 75%)";
|
|
5890
8541
|
_$2(() => {
|
|
5891
8542
|
if (menuOpen.value) {
|
|
5892
8543
|
if (!previousMenuOpen.current) {
|
|
@@ -5930,6 +8581,13 @@ function ColorTokenValueInput(props) {
|
|
|
5930
8581
|
_$2(() => {
|
|
5931
8582
|
if (optionList.current) optionList.current.scrollTop = 0;
|
|
5932
8583
|
}, [query.value]);
|
|
8584
|
+
_$2(() => {
|
|
8585
|
+
if (!menuOpen.value || props.saving.value) return;
|
|
8586
|
+
const activeId = activeSelectableOptionId.value;
|
|
8587
|
+
if (!activeId || activeId === "create-token") return;
|
|
8588
|
+
const option = visibleOptions.value.find((item) => item.id === activeId);
|
|
8589
|
+
if (option) previewOption(option);
|
|
8590
|
+
}, [query.value, activeSelectableOptionId.value]);
|
|
5933
8591
|
return /* @__PURE__ */ u("div", {
|
|
5934
8592
|
style: {
|
|
5935
8593
|
position: "relative",
|
|
@@ -6101,61 +8759,65 @@ function ColorTokenValueInput(props) {
|
|
|
6101
8759
|
overflow: "auto",
|
|
6102
8760
|
minHeight: "32px"
|
|
6103
8761
|
},
|
|
6104
|
-
children: [
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
})
|
|
6117
|
-
}) : null, props.options.value.length === 0 && !createOptionVisible.value ? /* @__PURE__ */ u("div", {
|
|
6118
|
-
"data-fuzzy-selector-empty": "true",
|
|
6119
|
-
style: {
|
|
6120
|
-
color: "#667085",
|
|
6121
|
-
padding: "7px 8px"
|
|
6122
|
-
},
|
|
6123
|
-
children: "No color tokens available."
|
|
6124
|
-
}) : filteredOptions.value.length === 0 && !createOptionVisible.value ? /* @__PURE__ */ u("div", {
|
|
6125
|
-
"data-fuzzy-selector-no-matches": "true",
|
|
6126
|
-
style: {
|
|
6127
|
-
color: "#667085",
|
|
6128
|
-
padding: "7px 8px"
|
|
6129
|
-
},
|
|
6130
|
-
children: "No matching color tokens."
|
|
6131
|
-
}) : filteredOptions.value.length === 0 ? null : hasFilterQuery.value ? filteredOptions.value.map((option) => renderTokenOption(option)) : groupedOptions.value.map((group) => /* @__PURE__ */ u("div", {
|
|
6132
|
-
"data-fuzzy-selector-group": group.presetName ? `${group.presetName} / ${group.label}` : group.label,
|
|
6133
|
-
children: [
|
|
6134
|
-
group.presetName ? /* @__PURE__ */ u("div", {
|
|
6135
|
-
"data-fuzzy-selector-preset-label": "true",
|
|
6136
|
-
style: {
|
|
6137
|
-
borderTop: "1px solid #e6ebf2",
|
|
6138
|
-
color: "#344054",
|
|
6139
|
-
fontSize: "11px",
|
|
6140
|
-
fontWeight: 700,
|
|
6141
|
-
padding: "8px 8px 1px"
|
|
6142
|
-
},
|
|
6143
|
-
children: group.presetName
|
|
6144
|
-
}) : null,
|
|
6145
|
-
/* @__PURE__ */ u("div", {
|
|
6146
|
-
"data-fuzzy-selector-group-label": "true",
|
|
6147
|
-
style: {
|
|
6148
|
-
color: "#667085",
|
|
6149
|
-
fontSize: "11px",
|
|
6150
|
-
fontWeight: 700,
|
|
6151
|
-
padding: "6px 8px 2px",
|
|
6152
|
-
textTransform: "uppercase"
|
|
8762
|
+
children: [
|
|
8763
|
+
menuRawHexOption.value ? renderTokenOption(menuRawHexOption.value) : null,
|
|
8764
|
+
createOptionVisible.value ? /* @__PURE__ */ u(ShadowMenuItem, {
|
|
8765
|
+
active: activeSelectableOptionId.value === "create-token",
|
|
8766
|
+
class: "panda-token-selector-menu-item",
|
|
8767
|
+
disabled: props.saving.value,
|
|
8768
|
+
onSelect: openCreateDialog,
|
|
8769
|
+
children: /* @__PURE__ */ u("span", {
|
|
8770
|
+
"data-fuzzy-selector-create-token": "true",
|
|
8771
|
+
onClick: (event) => {
|
|
8772
|
+
event.stopPropagation();
|
|
8773
|
+
openCreateDialog();
|
|
6153
8774
|
},
|
|
6154
|
-
children:
|
|
6155
|
-
})
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
8775
|
+
children: "Create color token..."
|
|
8776
|
+
})
|
|
8777
|
+
}) : null,
|
|
8778
|
+
props.options.value.length === 0 && !createOptionVisible.value && !menuRawHexOption.value ? /* @__PURE__ */ u("div", {
|
|
8779
|
+
"data-fuzzy-selector-empty": "true",
|
|
8780
|
+
style: {
|
|
8781
|
+
color: "#667085",
|
|
8782
|
+
padding: "7px 8px"
|
|
8783
|
+
},
|
|
8784
|
+
children: "No color tokens available."
|
|
8785
|
+
}) : filteredOptions.value.length === 0 && !createOptionVisible.value && !menuRawHexOption.value ? /* @__PURE__ */ u("div", {
|
|
8786
|
+
"data-fuzzy-selector-no-matches": "true",
|
|
8787
|
+
style: {
|
|
8788
|
+
color: "#667085",
|
|
8789
|
+
padding: "7px 8px"
|
|
8790
|
+
},
|
|
8791
|
+
children: "No matching color tokens."
|
|
8792
|
+
}) : filteredOptions.value.length === 0 ? null : hasFilterQuery.value ? filteredOptions.value.map((option) => renderTokenOption(option)) : groupedOptions.value.map((group) => /* @__PURE__ */ u("div", {
|
|
8793
|
+
"data-fuzzy-selector-group": group.presetName ? `${group.presetName} / ${group.label}` : group.label,
|
|
8794
|
+
children: [
|
|
8795
|
+
group.presetName ? /* @__PURE__ */ u("div", {
|
|
8796
|
+
"data-fuzzy-selector-preset-label": "true",
|
|
8797
|
+
style: {
|
|
8798
|
+
borderTop: "1px solid #e6ebf2",
|
|
8799
|
+
color: "#344054",
|
|
8800
|
+
fontSize: "11px",
|
|
8801
|
+
fontWeight: 700,
|
|
8802
|
+
padding: "8px 8px 1px"
|
|
8803
|
+
},
|
|
8804
|
+
children: group.presetName
|
|
8805
|
+
}) : null,
|
|
8806
|
+
/* @__PURE__ */ u("div", {
|
|
8807
|
+
"data-fuzzy-selector-group-label": "true",
|
|
8808
|
+
style: {
|
|
8809
|
+
color: "#667085",
|
|
8810
|
+
fontSize: "11px",
|
|
8811
|
+
fontWeight: 700,
|
|
8812
|
+
padding: "6px 8px 2px",
|
|
8813
|
+
textTransform: "uppercase"
|
|
8814
|
+
},
|
|
8815
|
+
children: group.label
|
|
8816
|
+
}),
|
|
8817
|
+
group.options.map((option) => renderTokenOption(option))
|
|
8818
|
+
]
|
|
8819
|
+
}, `${group.label}:${group.presetName ?? ""}`))
|
|
8820
|
+
]
|
|
6159
8821
|
})]
|
|
6160
8822
|
}),
|
|
6161
8823
|
createDialogOpen.value ? /* @__PURE__ */ u("div", {
|
|
@@ -6174,6 +8836,10 @@ function ColorTokenValueInput(props) {
|
|
|
6174
8836
|
},
|
|
6175
8837
|
onKeyDown: (event) => {
|
|
6176
8838
|
if (event.key === "Escape" && !createSaving.value) closeCreateDialog();
|
|
8839
|
+
if (event.metaKey && event.key === "Enter" && !createSaving.value) {
|
|
8840
|
+
event.preventDefault();
|
|
8841
|
+
submitCreateToken();
|
|
8842
|
+
}
|
|
6177
8843
|
},
|
|
6178
8844
|
children: /* @__PURE__ */ u("div", {
|
|
6179
8845
|
style: {
|
|
@@ -6193,41 +8859,19 @@ function ColorTokenValueInput(props) {
|
|
|
6193
8859
|
display: "grid",
|
|
6194
8860
|
gap: "4px"
|
|
6195
8861
|
},
|
|
6196
|
-
children: [/* @__PURE__ */ u("span", { children: "
|
|
8862
|
+
children: [/* @__PURE__ */ u("span", { children: "Name" }), /* @__PURE__ */ u("input", {
|
|
6197
8863
|
ref: tokenPathInput,
|
|
6198
8864
|
type: "text",
|
|
6199
8865
|
"data-create-color-token-path": "true",
|
|
6200
8866
|
value: createTokenPath.value,
|
|
6201
8867
|
disabled: createSaving.value,
|
|
6202
|
-
placeholder:
|
|
8868
|
+
placeholder: createTokenPathPlaceholder.value || "color",
|
|
6203
8869
|
onInput: (event) => {
|
|
6204
8870
|
createTokenPath.value = event.currentTarget.value;
|
|
6205
8871
|
},
|
|
6206
8872
|
style: CREATE_DIALOG_INPUT_STYLE
|
|
6207
8873
|
})]
|
|
6208
8874
|
}),
|
|
6209
|
-
/* @__PURE__ */ u("label", {
|
|
6210
|
-
style: {
|
|
6211
|
-
display: "grid",
|
|
6212
|
-
gap: "4px"
|
|
6213
|
-
},
|
|
6214
|
-
children: [/* @__PURE__ */ u("span", { children: "Token type" }), /* @__PURE__ */ u("select", {
|
|
6215
|
-
"data-create-color-token-kind": "true",
|
|
6216
|
-
value: createTokenKind.value,
|
|
6217
|
-
disabled: createSaving.value,
|
|
6218
|
-
onChange: (event) => {
|
|
6219
|
-
createTokenKind.value = event.currentTarget.value;
|
|
6220
|
-
},
|
|
6221
|
-
style: CREATE_DIALOG_INPUT_STYLE,
|
|
6222
|
-
children: [/* @__PURE__ */ u("option", {
|
|
6223
|
-
value: "token",
|
|
6224
|
-
children: "Color token"
|
|
6225
|
-
}), /* @__PURE__ */ u("option", {
|
|
6226
|
-
value: "semantic-token",
|
|
6227
|
-
children: "Semantic color token"
|
|
6228
|
-
})]
|
|
6229
|
-
})]
|
|
6230
|
-
}),
|
|
6231
8875
|
/* @__PURE__ */ u("label", {
|
|
6232
8876
|
style: {
|
|
6233
8877
|
display: "grid",
|
|
@@ -6264,7 +8908,7 @@ function ColorTokenValueInput(props) {
|
|
|
6264
8908
|
/* @__PURE__ */ u("div", {
|
|
6265
8909
|
style: {
|
|
6266
8910
|
display: "grid",
|
|
6267
|
-
gridTemplateColumns: "repeat(
|
|
8911
|
+
gridTemplateColumns: "repeat(3, minmax(0, 1fr))",
|
|
6268
8912
|
gap: "8px"
|
|
6269
8913
|
},
|
|
6270
8914
|
children: [
|
|
@@ -6318,23 +8962,6 @@ function ColorTokenValueInput(props) {
|
|
|
6318
8962
|
updateCreateColor("value", value);
|
|
6319
8963
|
}
|
|
6320
8964
|
})]
|
|
6321
|
-
}),
|
|
6322
|
-
/* @__PURE__ */ u("label", {
|
|
6323
|
-
style: {
|
|
6324
|
-
display: "grid",
|
|
6325
|
-
gap: "4px",
|
|
6326
|
-
minWidth: 0
|
|
6327
|
-
},
|
|
6328
|
-
children: [/* @__PURE__ */ u("span", { children: "Alpha" }), /* @__PURE__ */ u(SteppableNumericInput, {
|
|
6329
|
-
dataAttributes: { "data-create-color-token-alpha": "true" },
|
|
6330
|
-
property: "alpha",
|
|
6331
|
-
label: "alpha",
|
|
6332
|
-
value: String(createColor.value.alpha),
|
|
6333
|
-
disabled: createSaving.value,
|
|
6334
|
-
onInput: (value) => {
|
|
6335
|
-
updateCreateColor("alpha", value);
|
|
6336
|
-
}
|
|
6337
|
-
})]
|
|
6338
8965
|
})
|
|
6339
8966
|
]
|
|
6340
8967
|
}),
|
|
@@ -6379,20 +9006,6 @@ function ColorTokenValueInput(props) {
|
|
|
6379
9006
|
onInput: (value) => {
|
|
6380
9007
|
updateCreateColorFromSlider("value", value);
|
|
6381
9008
|
}
|
|
6382
|
-
}),
|
|
6383
|
-
/* @__PURE__ */ u(ColorComponentSlider, {
|
|
6384
|
-
dataAttribute: "data-create-color-token-alpha-slider",
|
|
6385
|
-
label: "Alpha",
|
|
6386
|
-
min: 0,
|
|
6387
|
-
max: 100,
|
|
6388
|
-
value: createColor.value.alpha,
|
|
6389
|
-
disabled: createSaving.value,
|
|
6390
|
-
background: alphaSliderBackground,
|
|
6391
|
-
backgroundPosition: "0 0, 0 0, 0 6px, 6px -6px, -6px 0",
|
|
6392
|
-
backgroundSize: "auto, 12px 12px, 12px 12px, 12px 12px, 12px 12px",
|
|
6393
|
-
onInput: (value) => {
|
|
6394
|
-
updateCreateColorFromSlider("alpha", value);
|
|
6395
|
-
}
|
|
6396
9009
|
})
|
|
6397
9010
|
]
|
|
6398
9011
|
}),
|
|
@@ -8958,6 +11571,7 @@ const INSPECTOR_DIALOG_PORTAL_ROOT = "data-sculpted-dialog-root";
|
|
|
8958
11571
|
const INSPECTOR_MENU_PORTAL_ROOT = "data-sculpted-menu-root";
|
|
8959
11572
|
const INLINE_SOURCE_PREVIEW_PATH = ["__inlineSource"];
|
|
8960
11573
|
const STYLE_MODULE_ACTION_PREVIEW_PATH = ["__styleModuleAction"];
|
|
11574
|
+
const COLOR_TOKEN_ACTION_PREVIEW_PATH = ["__colorTokenAction"];
|
|
8961
11575
|
const COPY_ELEMENT_PATH_AFTER_INSPECT_STORAGE_KEY = "sculpted.copyElementPathAfterInspect";
|
|
8962
11576
|
const PANEL_DOCKED_STORAGE_KEY = "sculpted.panelDocked";
|
|
8963
11577
|
const PANEL_SIDE_STORAGE_KEY = "sculpted.panelSide";
|
|
@@ -9156,7 +11770,7 @@ function InspectorPanel(props) {
|
|
|
9156
11770
|
changeCount: previewChangeCount,
|
|
9157
11771
|
changes: pendingPreviewChanges
|
|
9158
11772
|
};
|
|
9159
|
-
const colorTokenOptions = useComputed(() => colorTokenSelectorOptions(editorMetadata.value));
|
|
11773
|
+
const colorTokenOptions = useComputed(() => [...pendingColorTokenOptions(pendingPreviewChanges.value), ...colorTokenSelectorOptions(editorMetadata.value)]);
|
|
9160
11774
|
const fontTokenOptions = useComputed(() => fontTokenSelectorOptions(editorMetadata.value));
|
|
9161
11775
|
const tokenSources = useComputed(() => {
|
|
9162
11776
|
const sources = editorMetadata.value?.tokenSources;
|
|
@@ -9297,6 +11911,7 @@ function InspectorPanel(props) {
|
|
|
9297
11911
|
}
|
|
9298
11912
|
for (const change of changes.values()) {
|
|
9299
11913
|
if (isInlineSourcePreviewChange(change)) continue;
|
|
11914
|
+
if (isColorTokenPreviewChange(change)) continue;
|
|
9300
11915
|
if (includedChangeKeys.has(previewChangeKey(change.editId, change.path))) continue;
|
|
9301
11916
|
const declarations = change.op === "delete" ? previewDeclarationsForPandaRemoval(change.path) : previewDeclarationsForPandaInput(change.path, change.value);
|
|
9302
11917
|
if (declarations.length === 0) continue;
|
|
@@ -9736,6 +12351,7 @@ function InspectorPanel(props) {
|
|
|
9736
12351
|
for (const change of pendingPreviewChanges.value.values()) {
|
|
9737
12352
|
if (isInlineSourcePreviewChange(change)) continue;
|
|
9738
12353
|
if (change.editId.startsWith("inline-source:")) continue;
|
|
12354
|
+
if (isColorTokenPreviewChange(change)) continue;
|
|
9739
12355
|
if (isStyleModulePreviewChange(change)) continue;
|
|
9740
12356
|
if (styleModuleCreateEditIds.has(change.editId)) continue;
|
|
9741
12357
|
changesByEditId.set(change.editId, [...changesByEditId.get(change.editId) ?? [], change]);
|
|
@@ -9836,9 +12452,26 @@ function InspectorPanel(props) {
|
|
|
9836
12452
|
}];
|
|
9837
12453
|
});
|
|
9838
12454
|
};
|
|
12455
|
+
const createTokenConfigRequests = () => {
|
|
12456
|
+
flushPreviewHistoryBatch();
|
|
12457
|
+
return Array.from(pendingPreviewChanges.value.values()).flatMap((change) => {
|
|
12458
|
+
const action = colorTokenActionForPreviewChange(change);
|
|
12459
|
+
if (!action) return [];
|
|
12460
|
+
return [{
|
|
12461
|
+
editId: change.editId,
|
|
12462
|
+
kind: "panda-token-config",
|
|
12463
|
+
sourceTargetId: action.sourceTargetId,
|
|
12464
|
+
section: action.section,
|
|
12465
|
+
path: action.tokenPath.split("."),
|
|
12466
|
+
value: action.value,
|
|
12467
|
+
options: { expectedSourceHash: action.expectedSourceHash }
|
|
12468
|
+
}];
|
|
12469
|
+
});
|
|
12470
|
+
};
|
|
9839
12471
|
const savePreviewChanges = () => {
|
|
9840
12472
|
const inlineSourceRequests = createInlineSourceRequests();
|
|
9841
12473
|
const styleModuleRequests = createStyleModuleRequests();
|
|
12474
|
+
const tokenConfigRequests = createTokenConfigRequests();
|
|
9842
12475
|
saveFlow.value = { status: "saving" };
|
|
9843
12476
|
(async () => {
|
|
9844
12477
|
await runtime.loadManifest();
|
|
@@ -9852,27 +12485,26 @@ function InspectorPanel(props) {
|
|
|
9852
12485
|
return;
|
|
9853
12486
|
}
|
|
9854
12487
|
const requests = styleRequestResult.requests;
|
|
9855
|
-
if (requests.length === 0 && inlineSourceRequests.length === 0 && styleModuleRequests.length === 0) {
|
|
12488
|
+
if (requests.length === 0 && inlineSourceRequests.length === 0 && styleModuleRequests.length === 0 && tokenConfigRequests.length === 0) {
|
|
9856
12489
|
saveFlow.value = { status: "idle" };
|
|
9857
12490
|
return;
|
|
9858
12491
|
}
|
|
9859
|
-
const saveOperationCount = (requests.length > 0 ? 1 : 0) + inlineSourceRequests.length + styleModuleRequests.length;
|
|
12492
|
+
const saveOperationCount = tokenConfigRequests.length + (requests.length > 0 ? 1 : 0) + inlineSourceRequests.length + styleModuleRequests.length;
|
|
9860
12493
|
const requestResponses = (write) => {
|
|
9861
|
-
const styleResponses =
|
|
9862
|
-
|
|
9863
|
-
|
|
9864
|
-
|
|
9865
|
-
styleResponses,
|
|
9866
|
-
inlineSourceResponses,
|
|
9867
|
-
styleModuleResponses
|
|
12494
|
+
const styleResponses = () => Promise.all([
|
|
12495
|
+
requests.length > 0 ? runtime.requestStyleEditBatch(requests, write) : Promise.resolve([]),
|
|
12496
|
+
Promise.all(inlineSourceRequests.map((request) => runtime.requestInlineCssSource(request, write))),
|
|
12497
|
+
Promise.all(styleModuleRequests.map((request) => runtime.requestStyleModuleEdit(request, write)))
|
|
9868
12498
|
]).then((responses) => responses.flat());
|
|
12499
|
+
if (tokenConfigRequests.length === 0) return styleResponses();
|
|
12500
|
+
return Promise.all(tokenConfigRequests.map((request) => runtime.requestTokenConfigEdit(request, write))).then((tokenResults) => styleResponses().then((styleResults) => [...tokenResults, ...styleResults]));
|
|
9869
12501
|
};
|
|
9870
12502
|
if (saveOperationCount > 1) {
|
|
9871
12503
|
const dryRunFailure = (await requestResponses(false)).find((response) => !response.ok);
|
|
9872
12504
|
if (dryRunFailure) {
|
|
9873
12505
|
saveFlow.value = {
|
|
9874
12506
|
status: "error",
|
|
9875
|
-
message:
|
|
12507
|
+
message: writebackResponseMessage(dryRunFailure)
|
|
9876
12508
|
};
|
|
9877
12509
|
return;
|
|
9878
12510
|
}
|
|
@@ -9882,14 +12514,14 @@ function InspectorPanel(props) {
|
|
|
9882
12514
|
if (failure) {
|
|
9883
12515
|
saveFlow.value = {
|
|
9884
12516
|
status: "error",
|
|
9885
|
-
message:
|
|
12517
|
+
message: writebackResponseMessage(failure)
|
|
9886
12518
|
};
|
|
9887
12519
|
return;
|
|
9888
12520
|
}
|
|
9889
12521
|
return allResponses;
|
|
9890
12522
|
})().then(async (allResponses) => {
|
|
9891
12523
|
if (!allResponses) return;
|
|
9892
|
-
if (allResponses.find((response) => !response.manifestUpdate)) {
|
|
12524
|
+
if (allResponses.find((response) => response.written && !response.editId.startsWith("create-token:") && (!("manifestUpdate" in response) || !response.manifestUpdate))) {
|
|
9893
12525
|
saveFlow.value = {
|
|
9894
12526
|
status: "error",
|
|
9895
12527
|
message: "Save completed, but no manifest update was received. Preview remains applied."
|
|
@@ -10028,17 +12660,45 @@ function InspectorPanel(props) {
|
|
|
10028
12660
|
saveFlow.value = { status: "idle" };
|
|
10029
12661
|
};
|
|
10030
12662
|
const createColorToken = async (request) => {
|
|
12663
|
+
if (saving.value) return {
|
|
12664
|
+
ok: false,
|
|
12665
|
+
editId: `create-token:${request.section}:${request.tokenPath}`,
|
|
12666
|
+
written: false,
|
|
12667
|
+
error: {
|
|
12668
|
+
code: "write-failed",
|
|
12669
|
+
message: "A save is already in progress."
|
|
12670
|
+
}
|
|
12671
|
+
};
|
|
10031
12672
|
const source = tokenSources.value.find((item) => item.id === request.sourceTargetId);
|
|
10032
12673
|
const response = await runtime.requestTokenConfigEdit({
|
|
10033
|
-
editId:
|
|
12674
|
+
editId: colorTokenCreateEditId(request.section, request.tokenPath),
|
|
10034
12675
|
kind: "panda-token-config",
|
|
10035
12676
|
sourceTargetId: request.sourceTargetId,
|
|
10036
12677
|
section: request.section,
|
|
10037
12678
|
path: request.tokenPath.split("."),
|
|
10038
12679
|
value: request.value,
|
|
10039
12680
|
options: { expectedSourceHash: source?.sourceHash }
|
|
10040
|
-
},
|
|
10041
|
-
if (response.ok)
|
|
12681
|
+
}, false);
|
|
12682
|
+
if (!response.ok) return response;
|
|
12683
|
+
const before = pendingPreviewChanges.value;
|
|
12684
|
+
const next = new Map(before);
|
|
12685
|
+
const editId = colorTokenCreateEditId(request.section, request.tokenPath);
|
|
12686
|
+
next.set(previewChangeKey(editId, COLOR_TOKEN_ACTION_PREVIEW_PATH), {
|
|
12687
|
+
editId,
|
|
12688
|
+
path: COLOR_TOKEN_ACTION_PREVIEW_PATH,
|
|
12689
|
+
op: "set",
|
|
12690
|
+
value: JSON.stringify({
|
|
12691
|
+
sourceTargetId: request.sourceTargetId,
|
|
12692
|
+
section: request.section,
|
|
12693
|
+
tokenPath: request.tokenPath,
|
|
12694
|
+
value: request.value,
|
|
12695
|
+
expectedSourceHash: source?.sourceHash
|
|
12696
|
+
}),
|
|
12697
|
+
originalValue: void 0
|
|
12698
|
+
});
|
|
12699
|
+
commitPreviewHistoryStep(before, next);
|
|
12700
|
+
applyPreviewState(next);
|
|
12701
|
+
saveFlow.value = { status: "idle" };
|
|
10042
12702
|
return response;
|
|
10043
12703
|
};
|
|
10044
12704
|
return /* @__PURE__ */ u("div", {
|
|
@@ -13127,9 +15787,15 @@ function styleModuleAttachEditId(componentSource, jsxSource, name) {
|
|
|
13127
15787
|
function styleModuleDetachEditId(componentSource, jsxSource, name) {
|
|
13128
15788
|
return `style-module-detach:${componentSource}:${jsxSource}:${name}`;
|
|
13129
15789
|
}
|
|
15790
|
+
function colorTokenCreateEditId(section, tokenPath) {
|
|
15791
|
+
return `create-token:${section}:${tokenPath}`;
|
|
15792
|
+
}
|
|
13130
15793
|
function isStyleModulePreviewChange(change) {
|
|
13131
15794
|
return styleModuleActionForPreviewChange(change) !== void 0;
|
|
13132
15795
|
}
|
|
15796
|
+
function isColorTokenPreviewChange(change) {
|
|
15797
|
+
return colorTokenActionForPreviewChange(change) !== void 0;
|
|
15798
|
+
}
|
|
13133
15799
|
function styleModuleActionForPreviewChange(change) {
|
|
13134
15800
|
if (change.path.length !== STYLE_MODULE_ACTION_PREVIEW_PATH.length || !change.path.every((part, index) => part === STYLE_MODULE_ACTION_PREVIEW_PATH[index])) return;
|
|
13135
15801
|
try {
|
|
@@ -13150,6 +15816,46 @@ function styleModuleActionForPreviewChange(change) {
|
|
|
13150
15816
|
return;
|
|
13151
15817
|
}
|
|
13152
15818
|
}
|
|
15819
|
+
function colorTokenActionForPreviewChange(change) {
|
|
15820
|
+
if (change.path.length !== COLOR_TOKEN_ACTION_PREVIEW_PATH.length || !change.path.every((part, index) => part === COLOR_TOKEN_ACTION_PREVIEW_PATH[index])) return;
|
|
15821
|
+
try {
|
|
15822
|
+
const parsed = JSON.parse(change.value);
|
|
15823
|
+
if (!parsed || typeof parsed !== "object") return void 0;
|
|
15824
|
+
if ("sourceTargetId" in parsed && typeof parsed.sourceTargetId === "string" && "section" in parsed && (parsed.section === "tokens.colors" || parsed.section === "semanticTokens.colors") && "tokenPath" in parsed && typeof parsed.tokenPath === "string" && "value" in parsed && (typeof parsed.value === "string" || typeof parsed.value === "number" || typeof parsed.value === "boolean" || parsed.value === null) && (!("expectedSourceHash" in parsed) || typeof parsed.expectedSourceHash === "string")) {
|
|
15825
|
+
const expectedSourceHash = "expectedSourceHash" in parsed && typeof parsed.expectedSourceHash === "string" ? parsed.expectedSourceHash : void 0;
|
|
15826
|
+
return {
|
|
15827
|
+
sourceTargetId: parsed.sourceTargetId,
|
|
15828
|
+
section: parsed.section,
|
|
15829
|
+
tokenPath: parsed.tokenPath,
|
|
15830
|
+
value: parsed.value,
|
|
15831
|
+
expectedSourceHash
|
|
15832
|
+
};
|
|
15833
|
+
}
|
|
15834
|
+
} catch {
|
|
15835
|
+
return;
|
|
15836
|
+
}
|
|
15837
|
+
}
|
|
15838
|
+
function pendingColorTokenOptions(changes) {
|
|
15839
|
+
return Array.from(changes.values()).flatMap((change) => {
|
|
15840
|
+
const action = colorTokenActionForPreviewChange(change);
|
|
15841
|
+
if (!action) return [];
|
|
15842
|
+
const groupLabel = action.section === "semanticTokens.colors" ? "Pending semantic colors" : "Pending color tokens";
|
|
15843
|
+
const kindLabel = action.section === "semanticTokens.colors" ? "Semantic color" : "Color token";
|
|
15844
|
+
return [{
|
|
15845
|
+
id: `pending:${action.section}:${action.tokenPath}`,
|
|
15846
|
+
label: action.tokenPath,
|
|
15847
|
+
groupLabel,
|
|
15848
|
+
detail: `${kindLabel} pending save`,
|
|
15849
|
+
searchText: `${action.tokenPath} ${action.value} pending ${kindLabel}`,
|
|
15850
|
+
swatch: typeof action.value === "string" ? action.value : void 0,
|
|
15851
|
+
tokenPath: action.tokenPath
|
|
15852
|
+
}];
|
|
15853
|
+
});
|
|
15854
|
+
}
|
|
15855
|
+
function writebackResponseMessage(response) {
|
|
15856
|
+
if (response.error) return response.error.message;
|
|
15857
|
+
return "Save failed.";
|
|
15858
|
+
}
|
|
13153
15859
|
function pendingPreviewChangesEqual(left, right) {
|
|
13154
15860
|
return left.editId === right.editId && left.op === right.op && left.value === right.value && left.originalValue === right.originalValue && left.path.length === right.path.length && left.path.every((part, index) => part === right.path[index]);
|
|
13155
15861
|
}
|