Java Utililty Methods HSV Color to RGB Color

List of utility methods to do HSV Color to RGB Color

Description

The list of methods to do HSV Color to RGB Color are organized into topic(s).

Method

ColorHSVtoRGB(double[] data)

Returns the color object represented by the HSV.

The code is taken from Twyst .
I've just translated it into Java.

if (data == null || data.length != 3) {
    throw new IllegalArgumentException("data must be an array of 3 items and must not be null!");
return HSVtoRGB(data[0], data[1], data[2]);
ColorHSVtoRGB(float h, float s, float v)
r,g,b values are from 0 to 1 h = [0,360], s = [0,1], v = [0,1] if s == 0, then h = -1 (undefined)
int i;
float f, p, q, t;
float r, g, b;
if (s == 0) {
    r = g = b = v;
    return new Color(r, g, b);
h /= 60; 
...
StringhsvToRgb(float H, float S, float V)
hsv To Rgb
float R, G, B;
H /= 360f;
S /= 100f;
V /= 100f;
if (S == 0) {
    R = V * 255;
    G = V * 255;
    B = V * 255;
...