client: fix the issues pointed by gemini-code-assist

This commit is contained in:
Adorian Doran
2025-10-18 21:22:55 +03:00
parent 2b460be63a
commit 93c7b8dea7
5 changed files with 13 additions and 10 deletions

View File

@@ -62,10 +62,13 @@ function adjustColorLightness(color: string, lightThemeMaxLightness: number, dar
return;
}
const lightness = labColor.l();
// For the light theme, limit the maximum lightness
const lightThemeColor = labColor.l(Math.min(labColor.l(), lightThemeMaxLightness)).hex();
// For the light theme, limit the minimum lightness
const darkThemeColor = labColor.l(Math.max(labColor.l(), darkThemeMinLightness)).hex();
const lightThemeColor = labColor.l(Math.min(lightness, lightThemeMaxLightness)).hex();
// For the dark theme, limit the minimum lightness
const darkThemeColor = labColor.l(Math.max(lightness, darkThemeMinLightness)).hex();
return {lightThemeColor, darkThemeColor};
}