mirror of
https://github.com/logto-io/logto.git
synced 2025-01-27 21:39:16 -05:00
fix(shared): fix dark color generator (#1719)
This commit is contained in:
parent
7579abaea4
commit
3deb98c18d
1 changed files with 2 additions and 2 deletions
|
@ -4,13 +4,13 @@ import color from 'color';
|
|||
export const absoluteLighten = (baseColor: color, delta: number) => {
|
||||
const hslArray = baseColor.hsl().round().array();
|
||||
|
||||
return color([hslArray[0] ?? 0, hslArray[1] ?? 0, hslArray[2] ?? 0 + delta], 'hsl');
|
||||
return color([hslArray[0] ?? 0, hslArray[1] ?? 0, (hslArray[2] ?? 0) + delta], 'hsl');
|
||||
};
|
||||
|
||||
export const absoluteDarken = (baseColor: color, delta: number) => {
|
||||
const hslArray = baseColor.hsl().round().array();
|
||||
|
||||
return color([hslArray[0] ?? 0, hslArray[1] ?? 0, hslArray[2] ?? 0 - delta], 'hsl');
|
||||
return color([hslArray[0] ?? 0, hslArray[1] ?? 0, (hslArray[2] ?? 0) - delta], 'hsl');
|
||||
};
|
||||
|
||||
export const generateDarkColor = (lightColor: string) =>
|
||||
|
|
Loading…
Add table
Reference in a new issue