mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
made cubical desaturation
This commit is contained in:
parent
95ec0f2e0e
commit
ba4bf28834
1 changed files with 2 additions and 2 deletions
|
@ -10,6 +10,6 @@ export const normalizeBrightColor = (color?: string) => {
|
|||
const saturation = hsla[1];
|
||||
const lightness = hsla[2];
|
||||
|
||||
const desaturated = saturation > 0.3 ? desaturate(color, Math.min(saturation, 0.4)) : color;
|
||||
return lightness > 0.3 ? darken(desaturated, Math.min(lightness, 0.2)) : desaturated;
|
||||
const desaturated = desaturate(color, saturation ** 3);
|
||||
return darken(desaturated, lightness ** 3);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue