How do i convert RGB to HSV255 (color not image)

asked 2019-09-03 02:54:25 -0600

I am working on a color based object detection. I am first giving the program an example of the object, then i extract the colors and get them in RGB format. Now i want to convert these into HSV255 scale. I found a few algorithms but they dont give accurate responses because HSV has up to 360 scale while python will only accept 256 input (0-255). Its kind of like in openGL where you have to specify colors with range from 0 to 1 so 0 is black and 1 is white.

edit retag flag offensive close merge delete