Incomplete color normalization
levibuzolic opened this issue · comments
Description
The new color normalization added in #50 has broken react-native-web
shadow styling for some colour formats.
react-native-unistyles/src/utils/normalizer.ts
Lines 11 to 13 in 8653436
Based on the comments in the commit it looks like it's known that it's an incomplete implementation.
I imagine to stay in-sync with what React Native itself supports, it'd make sense to add a peerDependency
to @react-native/normalize-colors which is the underlying utility library that React Native uses to pre-parse colours and then mix-in the alpha channel where required.
I'd be happy to create a PR with that implementation if that approach is suitable.
Steps to reproduce
- Use a
shadowColor
ofblack
with an opacity of0.5
- Observe output colour is
black
without opacity
Snack or a link to a repository (optional)
No response
Unistyles version
1.1.0
React Native version
0.72.6
Platforms
React Native Web
I wasn't aware of that! I also didn't know about this lib. I will happily accept the PR 🙏