RGB to HSV conversion functions (not yet used)
Fixed bugs in HSV and RGB conversion functions