Skip to content
Snippets Groups Projects

fix menu-item magenta

Merged HJ requested to merge fix-theme2-magenta into develop
1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
@@ -112,7 +112,10 @@ export const colorFunctions = {
const color = convert(findColor(colorArg, { dynamicVars, staticVars })).rgb
const amount = Number(amountArg)
const effectiveBackground = dynamicVars.lowerLevelBackground
const effectiveBackground = dynamicVars.lowerLevelBackground ??
dynamicVars.background ??
dynamicVars.inheritedBackground ??
staticVars[colorArg]
const isLightOnDark = relativeLuminance(convert(effectiveBackground).rgb) < 0.5
const mod = isLightOnDark ? 1 : -1
return brightness(amount * mod, color).rgb
Loading