@webmate-studio/builder 0.2.142 → 0.2.143
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/package.json +1 -1
- package/src/design-tokens-v2.js +11 -6
package/package.json
CHANGED
package/src/design-tokens-v2.js
CHANGED
|
@@ -360,13 +360,18 @@ function computeChroma(stepL, baseL, baseC, stdDev, chromaScale) {
|
|
|
360
360
|
gaussian = 0.97 * Math.exp((-12 / stdDev) * edgeDiff * edgeDiff);
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
// Lightness-Begrenzung: Asymmetrisch
|
|
364
|
-
//
|
|
365
|
-
//
|
|
366
|
-
//
|
|
363
|
+
// Lightness-Begrenzung: Asymmetrisch + Chroma-abhängig
|
|
364
|
+
// Bei hochgesättigten Farben (Grün, Cyan) wirken schon kleine Chroma-Werte
|
|
365
|
+
// bei hoher Lightness "neonig". Der Einsatzpunkt wird daher bei hoher
|
|
366
|
+
// Base-Chroma nach unten verschoben.
|
|
367
|
+
// Helle Seite: Einsatz ab threshold (0.85 bei C=0, 0.75 bei C≥0.17)
|
|
368
|
+
// Dunkle Seite (L < 0.3): Chroma fällt moderat
|
|
369
|
+
// Mitte: volle Chroma möglich
|
|
370
|
+
const chromaFactor = Math.min(baseC / 0.17, 1.0); // 0 bei grau, 1 bei gesättigtem Grün
|
|
371
|
+
const lightThreshold = 0.85 - chromaFactor * 0.10; // 0.85 → 0.75
|
|
367
372
|
let lightnessLimit;
|
|
368
|
-
if (stepL >
|
|
369
|
-
const t = (stepL -
|
|
373
|
+
if (stepL > lightThreshold) {
|
|
374
|
+
const t = (stepL - lightThreshold) / (1.0 - lightThreshold);
|
|
370
375
|
lightnessLimit = 1.0 - t * t;
|
|
371
376
|
} else if (stepL < 0.3) {
|
|
372
377
|
const t = stepL / 0.3;
|