@pathscale/ui 1.1.21 → 1.1.22
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.
|
@@ -102,7 +102,7 @@ const HARMONY_SETTINGS = {
|
|
|
102
102
|
},
|
|
103
103
|
"--color-accent": {
|
|
104
104
|
l: 62,
|
|
105
|
-
c: 0.
|
|
105
|
+
c: 0.2
|
|
106
106
|
},
|
|
107
107
|
"--color-accent-content": {
|
|
108
108
|
l: 98,
|
|
@@ -279,18 +279,21 @@ const BASE_COLORS = {
|
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
};
|
|
282
|
-
const BASE_CHROMA_BOOST =
|
|
282
|
+
const BASE_CHROMA_BOOST = {
|
|
283
|
+
light: 0,
|
|
284
|
+
dark: 0.025
|
|
285
|
+
};
|
|
283
286
|
const GRADIENT_COLORS = {
|
|
284
287
|
light: {
|
|
285
288
|
"--gradient-start": {
|
|
286
289
|
h: 347,
|
|
287
|
-
s:
|
|
288
|
-
l:
|
|
290
|
+
s: 8,
|
|
291
|
+
l: 96
|
|
289
292
|
},
|
|
290
293
|
"--gradient-end": {
|
|
291
294
|
h: 199,
|
|
292
|
-
s:
|
|
293
|
-
l:
|
|
295
|
+
s: 8,
|
|
296
|
+
l: 97
|
|
294
297
|
}
|
|
295
298
|
},
|
|
296
299
|
dark: {
|
|
@@ -400,10 +403,12 @@ function applyHueShift(targetHue, saturation = 100, lightnessOffset = 0) {
|
|
|
400
403
|
root.style.setProperty(varName, shifted);
|
|
401
404
|
}
|
|
402
405
|
const baseColors = BASE_COLORS[resolvedTheme];
|
|
406
|
+
const baseBoost = BASE_CHROMA_BOOST[resolvedTheme];
|
|
403
407
|
for (const [varName, color] of Object.entries(baseColors)){
|
|
404
|
-
const baseChroma = Math.max(color.c,
|
|
408
|
+
const baseChroma = Math.max(color.c, baseBoost);
|
|
405
409
|
const scaledChroma = baseChroma * chromaScale;
|
|
406
|
-
const
|
|
410
|
+
const hue = baseBoost > 0 ? oklchHue : color.h;
|
|
411
|
+
const shifted = toOklch(clampL(color.l), scaledChroma, hue);
|
|
407
412
|
root.style.setProperty(varName, shifted);
|
|
408
413
|
}
|
|
409
414
|
const nfAccentSettings = NF_ACCENT_SETTINGS[resolvedTheme];
|