Reputation: 227
We are building a comparison website based on items scraped from the internet. One of the main filters for the user's comparison engine is filtering by products by colors.
The issue is that we are scraping information from many different ecommerce and we get an endless list of colors with many strange names like CAPULET OLIVE or CHARCOAL RED.
So i was thinking if we can automatically get the hex color by comparing the a name-hex list maybe we can work with that.
Hence the hex is dividing the RGB to 16,777,216 colors(red 1-255 optionsGreen 1-255 optionsBlue 1-255 options). if there was a table somewhere that is dividing the options to the main 6-12 colors (ref, green, blue, yellw, etc.) that can work pretty well.
i.e.CAPULET OLIVE hes the hex value of #656344 which is R=101,G=99,B=68 in decimal. if i had a table showing this range or strength of red and green vs blue is actually a form of green i can tag this model as green.
Basically, what i'm asking, is there a table that allocating all of the hex codes 6-12 main colors?
Upvotes: 0
Views: 1214
Reputation: 227
So i think i found a simple way to implement this using HSV color model.
Step 1- Use a search website engine to find HSV/B code by name for sites like this: https://rgb.to/color/17148/spearmint-green http://www.perbang.dk/rgb/696B4D/
Step 2- Use a predefined table to allocate color to his family, for example this one: https://mehrarodgers.files.wordpress.com/2013/05/hue-scale.png Though i found some missing color ranges there, so it can be improved.
This article is very useful in dividing the HSV by color wheel: http://warrenmars.com/visual_art/theory/colour_wheel/evolution/evolution.htm
Upvotes: 0