diff --git a/src/services/theme_data/theme3_slot_functions.js b/src/services/theme_data/theme3_slot_functions.js index d1441aebb..e7293a03c 100644 --- a/src/services/theme_data/theme3_slot_functions.js +++ b/src/services/theme_data/theme3_slot_functions.js @@ -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