When you have an application driven by rich media, like images, it can be hard to develop a cohesive, universal color scheme. A lot of the time, applications end up defaulting to shades of black and white to avoid clashing with the rich colors in their content. If you have only a few static images, you can work around this by just manually picking the best colors, but when the images are dynamic, it’s almost impossible to know which colors look the best. You can process the image on a server and store the palette in your database, but that means more data to process, store, and send to the client.
That’s why we’re excited to announce react-image-palette, an easy way to dynamically parse vibrant and accessible color palettes directly in your React application. react-image-palette will process an image using the Canvas API and then generate a color palette based on the most dominant colors, right in the client. No server processing, no data to store, just provide a URL to the image and react-image-palette will take care of the parsing. The colors in the palette are also guaranteed to meet the WCAG contrast standards so you never have to worry about readability. Check out the demo application to see what it can do.