diff --git a/src/services/theme_data/theme3_slot_functions.js b/src/services/theme_data/theme3_slot_functions.js
index d1441aebb1ea933a02b981af908a633ccc4c2ad9..e7293a03c6c1c56693eff7ee3bc3d75eefd0e5ae 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