diff --git a/.changeset/eight-vans-judge.md b/.changeset/eight-vans-judge.md new file mode 100644 index 0000000000..c432fde1a3 --- /dev/null +++ b/.changeset/eight-vans-judge.md @@ -0,0 +1,5 @@ +--- +"@gitbook/colors": patch +--- + +Update chroma ratio per step diff --git a/packages/colors/src/transformations.ts b/packages/colors/src/transformations.ts index bf7f770c09..90cb4482eb 100644 --- a/packages/colors/src/transformations.ts +++ b/packages/colors/src/transformations.ts @@ -220,7 +220,21 @@ export function colorScale( continue; } - const chromaRatio = index === 8 || index === 9 ? 1 : index * 0.05; + const chromaRatio = (() => { + switch (index) { + // Step 9 and 10 have max chroma, meaning they are fully saturated. + case 8: + case 9: + return 1; + // Step 11 and 12 have a reduced chroma + case 10: + return 0.4; + case 11: + return 0.1; + default: + return index * 0.05; + } + })(); const shade = { L: targetL, // Blend lightness