Is there a way to convert HSV color arguments to RGB type color arguments using pygame modules in python? I tried the following code, but it returns ridiculous values.
In opencv, use any of their color conversions. Note that BGR and RGB are flipped in cv2 land.
def convertColor(hsv, conversion):
return tuple(int(i) for i in cv2.cvtColor(np.uint8([[hsv]]), conversion).flatten())
Usage:
hsvColor = (0,255,255) #bright red
bgrColor = convertColor(hsvColor, cv2.COLOR_HSV2BGR)