Preparing search index...
    • 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.

      Parameters

      • colRGB: number | vec4

        vec4 (r,g,b,a) or number for red

      • Optionalgreen: number

        green component (0 to 1) when colRGB is a number

      • Optionalblue: number

        blue component (0 to 1) when colRGB is a number

      • Optionalalpha: number

        alpha component (0 to 1) when colRGB is a number

      Returns vec4

      vec4(h, s, v, a) with hue in degrees