0

I am not using RGB but rather HEX values. The data base looks something like this: Manufacturer, Color Name, Hex value, Red value, Green value, Blue value

From reading up on this Euclidian is the best way to go. I have found code that uses RGB that does something similar, but I am looking to use Hex. I will need to convert Hex to RGB I assume. Then use the shortest distance. My struggle is how do I use the HEX and how do I return the manufacturer and Color name from the database using python.There has to be existing code for this, if someone would be kind enough to share. Yes I am new to this.

RobE
  • 93
  • 2
  • 11
  • Converting hex to RGB is trivial (https://stackoverflow.com/a/29643643/8748307) but I don't really understand what else you are trying to do. We don't know anything about your database so we can't help you get the manufacturer and color name from it. – Benjamin Ashbaugh Nov 11 '21 at 20:41
  • You may take a look at my answer in the following post: [converting hex value to name of the colour in python](https://stackoverflow.com/a/59549285/4926757) – Rotem Nov 11 '21 at 22:17

0 Answers0