![]() The API takes an image URL as a parameter and will use K-Means to generate a palette.Īdditionally, I found that the website Coolors makes it easy to create a color palette URL, so the API can return the color palette as a 2D array of colors or as a URL to a Coolors palette. Flask AppĪs a final bonus, I decided to create a simple proof-of-concept API for generating color palettes from images. DBSCAN), and adjusting the color distance metric (If you’re interested, you can read more about color differences here). CIE colorimetry isnt even half the story of color science, its a tiny piece of the huge puzzle of human perception and engineering that is color science. Agglomerative clustering + HSV colors), hyper-parameter tuning, using different algorithms (e.g. In order to further improve the results, some options include combining techniques (i.e. Operationalizing Machine Learning in the Laboratory. Scicomap is a package that provides scientific color maps and tools to standardize your favourite color maps if you dont like the built-in ones. As you can see, the HSV approach includes both the blue and the yellow (though still no red). Thermo Fisher Scientific enables our customers to make the world healthier, cleaner and safer. The above image shows palettes generated for the same image using K-Means clustering with RGB colors and HSV colors. RGB represents a color as a combination of the intensities of the red, green, and blue channels while HSV represents a color as the hue (the spectrum of base colors), saturation (the intensity of a color), and value (the relative lightness or darkness of a color) - which you can read more about here. Still from Only God Forgives (2013), courtesy of FILMGRAB, with k-means RGB and HSV generated palettes.Īnother approach is to convert the image’s colors from RGB to HSV.
0 Comments
Leave a Reply. |