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:
commit
8318f2c39e
1 changed files with 4 additions and 1 deletions
|
@ -112,7 +112,10 @@ export const colorFunctions = {
|
||||||
const color = convert(findColor(colorArg, { dynamicVars, staticVars })).rgb
|
const color = convert(findColor(colorArg, { dynamicVars, staticVars })).rgb
|
||||||
const amount = Number(amountArg)
|
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 isLightOnDark = relativeLuminance(convert(effectiveBackground).rgb) < 0.5
|
||||||
const mod = isLightOnDark ? 1 : -1
|
const mod = isLightOnDark ? 1 : -1
|
||||||
return brightness(amount * mod, color).rgb
|
return brightness(amount * mod, color).rgb
|
||||||
|
|
Loading…
Add table
Reference in a new issue