Desaturate text colours by decreasing chroma for the last steps of the color scale (#3096)

This commit is contained in:
Zeno Kapitein
2025-04-04 18:00:01 +02:00
committed by GitHub
parent 5a959cf041
commit cdffd7c47b
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@gitbook/colors": patch
---
Desaturate text colors by decreasing chroma for the last steps of the color scale
+1 -1
View File
@@ -220,7 +220,7 @@ export function colorScale(
continue;
}
const chromaRatio = index < 8 ? index * 0.05 : 1;
const chromaRatio = index === 8 || index === 9 ? 1 : index * 0.05;
const shade = {
L: targetL, // Blend lightness