• One of the many available factories for Color. This variant receives input arguments in HSV color space. HSV is popular in generating smooth, looping color ranges, for example (red -> green -> blue -> red).

    Example usage:

     // Hue = angle of color circle where 0 deg = red, 120 deg = green, 240 deg = blue.
    const colorRed = ColorHSV(0)
    const colorYellow = ColorHSV(60)

    // Generate a simple color palette.
    const colors10 = new Array(10).fill(undefined).map((_, iColor) =>
    // Array will receive colors starting from red, moving through green, blue and ending just before red.
    ColorHSV( 0 + (iColor / 10) * 360 )
    )

    // 'saturation' and 'value' arguments can be supplied optionally.
    const colorRedDim = ColorHSV(0, 1.0, 0.5)

    For more convenience factories, see:

    Returns

    Color object. Please refer to Color API document, on extended information how to use LCJS Colors.

    Parameters

    • hue: number

      Hue value as degrees [0, 360] (0 = red, 120 = green, 240 = blue, 360 = red, and so on...).

    • saturation: number = 1

      Saturation in range [0, 1]. Defaults to 1.

    • value: number = 1

      Value in range [0, 1]. Defaults to 1.

    Returns Color