vec4 (r,g,b,a) or number for red
Optionalgreen: numbergreen component (0 to 1) when colRGB is a number
Optionalblue: numberblue component (0 to 1) when colRGB is a number
Optionalalpha: numberalpha component (0 to 1) when colRGB is a number
vec4(h, s, v, a) with hue in degrees
Converts an RGB color to HSV. Accepts either a vec4 (r, g, b, a) or a number for red with green, blue, alpha provided. Returns hue in degrees [0, 360), saturation and value in [0, 1], and preserves alpha. Round-trips with HSVtoRGB: HSVtoRGB(RGBtoHSV(rgb)) ≈ rgb.