h , s , v = hue , saturation , value double cmax = Math . max ( r , Math . max ( g , b ) ) ; maximum of r , g , b double cmin = Math . min ( r , Math . min ( g , b ) ) ; minimum of r , g , b double diff = cmax - cmin ; diff of cmax and cmin .
double h = - 1 , s = - 1 ;