diff --git a/src/utils/theme.tsx b/src/utils/theme.tsx index 63439aa46f..b5d00028b1 100644 --- a/src/utils/theme.tsx +++ b/src/utils/theme.tsx @@ -1476,7 +1476,9 @@ export const createAppTheme = () => { // --- Display-P3 override layer ------------------------------------------------------------- -const isColorValue = (v: string) => v.startsWith('#') || v.startsWith('rgb'); +// MUI composes some tokens from other vars (Skeleton's bg is `rgba(var(...) / 0.13)`), which P3 can't parse. +const isColorValue = (v: string) => + (v.startsWith('#') || v.startsWith('rgb')) && !v.includes('var('); // Walk a color scheme's palette and, for every solid color leaf, emit a P3 override keyed to // the CSS variable MUI generates for it (`--mui-palette-`). Non-color