HSV transformation on RGB without HSV <--> RGB convertion