Merge branch 'fix-theme2-magenta' into 'develop'

fix menu-item magenta

Closes #1370

See merge request pleroma/pleroma-fe!2107
This commit is contained in:
HJ 2025-03-26 11:57:42 +00:00
commit 8318f2c39e

View file

@ -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