Skip to content

Commit cdffd7c

Browse files
authored
Desaturate text colours by decreasing chroma for the last steps of the color scale (#3096)
1 parent 5a959cf commit cdffd7c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/moody-jeans-explain.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@gitbook/colors": patch
3+
---
4+
5+
Desaturate text colors by decreasing chroma for the last steps of the color scale

packages/colors/src/transformations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export function colorScale(
220220
continue;
221221
}
222222

223-
const chromaRatio = index < 8 ? index * 0.05 : 1;
223+
const chromaRatio = index === 8 || index === 9 ? 1 : index * 0.05;
224224

225225
const shade = {
226226
L: targetL, // Blend lightness

0 commit comments

Comments
 (0)