Lines Matching defs:hsv
253 * Fill hsv float array from r,g,b float values.
256 sp_color_rgb_to_hsv_floatv (float *hsv, float r, float g, float b)
264 hsv[2] = max;
267 hsv[1] = delta / max;
269 hsv[1] = 0.0;
272 if (hsv[1] != 0.0) {
274 hsv[0] = (g - b) / delta;
276 hsv[0] = 2.0 + (b - r) / delta;
278 hsv[0] = 4.0 + (r - g) / delta;
281 hsv[0] = hsv[0] / 6.0;
283 if (hsv[0] < 0) hsv[0] += 1.0;
286 hsv[0] = 0.0;