Bug summary
uniwind-pro@1.2.0 fails to resolve CSS color-mix() functions used in HeroUI Native's theme variables, causing Reanimated to crash with "Invalid color value: invalid".
Environment
uniwind-pro: 1.2.0 (npm:uniwind-pro@1.2.0 aliased as "uniwind")
heroui-native: 1.0.4
react-native: 0.85.3
react-native-reanimated: 4.4.0
Expo SDK: 56
Platform: iOS Simulator (iPhone 17 Pro Max, iOS 26.5)
Steps to reproduce
- Install
uniwind-pro@1.2.0 as "uniwind": "npm:uniwind-pro@1.2.0"
- Import
heroui-native/styles in global.css
- Wrap app with
<HeroUINativeProvider>
- Render any HeroUI Native component (Button, Switch, etc.)
Expected behavior
CSS variables like --color-accent-hover defined with color-mix() in heroui-native/styles/theme.css should resolve to valid color values.
Actual behavior
WARN Uniwind - We couldn't find your variable --color-accent-hover
WARN Uniwind - className 'accent-accent' was provided to extract accentColor but no color was found
WARN "invalid" is not a valid color or brush
ERROR [Error: [Reanimated] Invalid color value: "invalidNaN"]
Root cause
HeroUI Native's theme.css defines:
--color-accent-hover: color-mix(in oklab, var(--accent) 90%, var(--accent-foreground) 10%);
color-mix() is a web-only CSS function. Uniwind Pro 1.2.0 cannot compute it on the native runtime, so the variable resolves to "invalid" which Reanimated then fails to parse as a color.
Workaround
Using community uniwind@1.7.0 (free version) instead of uniwind-pro@1.2.0 resolves the issue. The HeroUI Native example app also uses community uniwind@1.3.2.
Expected fix
Uniwind Pro should either:
- Implement
color-mix() resolution on native (compute the blended color at build/runtime)
- Provide a fallback mechanism when
color-mix() is encountered (return a safe default color instead of "invalid")
- Pre-compute
color-mix() values during the CSS parsing phase
Notes
- The HeroUI Native source repo (
heroui-native-main) references uniwind: 1.3.2 (community) in its example, not Pro
- This suggests Pro wasn't tested with HeroUI Native's
color-mix() theme variables
- The issue only affects animated components (Reanimated) — static className usage may work fine since the color is never passed to
withTiming/withSpring
Bug summary
uniwind-pro@1.2.0fails to resolve CSScolor-mix()functions used in HeroUI Native's theme variables, causing Reanimated to crash with "Invalid color value: invalid".Environment
Steps to reproduce
uniwind-pro@1.2.0as"uniwind": "npm:uniwind-pro@1.2.0"heroui-native/stylesinglobal.css<HeroUINativeProvider>Expected behavior
CSS variables like
--color-accent-hoverdefined withcolor-mix()inheroui-native/styles/theme.cssshould resolve to valid color values.Actual behavior
Root cause
HeroUI Native's
theme.cssdefines:color-mix()is a web-only CSS function. Uniwind Pro 1.2.0 cannot compute it on the native runtime, so the variable resolves to"invalid"which Reanimated then fails to parse as a color.Workaround
Using community
uniwind@1.7.0(free version) instead ofuniwind-pro@1.2.0resolves the issue. The HeroUI Native example app also uses communityuniwind@1.3.2.Expected fix
Uniwind Pro should either:
color-mix()resolution on native (compute the blended color at build/runtime)color-mix()is encountered (return a safe default color instead of "invalid")color-mix()values during the CSS parsing phaseNotes
heroui-native-main) referencesuniwind: 1.3.2(community) in its example, not Procolor-mix()theme variableswithTiming/withSpring