Use lab color interpolation to improve the dark end of accent ramps

This commit is contained in:
Nate Butler 2022-10-19 14:35:09 -04:00
parent 364c3f2f00
commit e0a477265d

View file

@ -13,8 +13,8 @@ import {
export function colorRamp(color: Color): Scale {
let endColor = color.desaturate(1).brighten(5);
let startColor = color.desaturate(1).darken(5);
return chroma.scale([startColor, color, endColor]).mode("hsl");
let startColor = color.desaturate(1).darken(4);
return chroma.scale([startColor, color, endColor]).mode("lab");
}
export function createColorScheme(