fix menu-item magenta
This commit is contained in:
parent
f1910b37d3
commit
11adf48f4a
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