diff --git a/app/client/packages/design-system/theming/src/utils/TokensAccessor/LightModeTheme.ts b/app/client/packages/design-system/theming/src/utils/TokensAccessor/LightModeTheme.ts index 832fc333bd..42be6b1fe3 100644 --- a/app/client/packages/design-system/theming/src/utils/TokensAccessor/LightModeTheme.ts +++ b/app/client/packages/design-system/theming/src/utils/TokensAccessor/LightModeTheme.ts @@ -97,11 +97,73 @@ export class LightModeTheme implements ColorModeTheme { } private get bgAccentHover() { - return lighten(this.bgAccent, 1.06); + let currentColor = this.bgAccent; + + if (this.seedLightness < 0.18) { + currentColor = setLch(currentColor, { + l: this.seedLightness + 0.3, + }); + } + + if (this.seedLightness >= 0.18 && this.seedLightness < 0.4) { + currentColor = setLch(currentColor, { + l: this.seedLightness + 0.15, + }); + } + + if (this.seedLightness >= 0.4 && this.seedLightness < 0.7) { + currentColor = setLch(currentColor, { + l: this.seedLightness + 0.05, + }); + } + + if (this.seedLightness >= 0.7) { + currentColor = setLch(currentColor, { + l: this.seedLightness + 0.03, + }); + } + + if (this.seedIsVeryLight) { + currentColor = setLch(currentColor, { + l: 0.95, + c: this.seedChroma * 1.15, + h: this.seedHue, + }); + } + + return currentColor; } private get bgAccentActive() { - return lighten(this.bgAccent, 0.9); + let currentColor = this.bgAccent; + + if (this.seedLightness < 0.4) { + currentColor = setLch(currentColor, { + l: this.seedLightness - 0.04, + }); + } + + if (this.seedLightness >= 0.4 && this.seedLightness < 0.7) { + currentColor = setLch(currentColor, { + l: this.seedLightness - 0.02, + }); + } + + if (this.seedLightness >= 0.7) { + currentColor = setLch(currentColor, { + l: this.seedLightness - 0.01, + }); + } + + if (this.seedIsVeryLight) { + currentColor = setLch(currentColor, { + l: 0.935, + c: this.seedChroma * 1.15, + h: this.seedHue, + }); + } + + return currentColor; } // used only for generating child colors, not used as a token