Introduction
Material Color React Native is a library to bring Material color utilities from the @material-foundation/material-color-utilities, including material color builder from an image, and special Android Dynamic Color.
Motives
Basically, this library is similar as other libraries you can found to build Material color, as The Science of Color & Design has been done by a Google engineer including their source code, but the inexistence of the utility for building material color from an image for React Native especially on Android, iOS (including macOS) is really the main motive why material-color-react-native was created.
Bringing the material color utility from an image is a personal challenge. Previously, I have to use React Native Skia on Android app to get a Bitmap from an image, because the original source code from Material Foundation is using HTML Canvas which is really not a compatible for non Web platform, and using the React Native Skia only for that utility is really an overkill.
Compatibility
This library is only supported on React Native New Architecture, and the utility to get Material color from a source image is not supported on React Native for Windows at this moment
| Platform | Compatible | Remark |
|---|---|---|
| Android | ✅ | |
| iOS | ✅ | |
| macOS | ✅ | |
| Windows | Partial | Get material color from an image is not supported |
| Web | ✅ |
Hopefully, I can bring the compatibility to Windows.