• One of the many available factories for Color. This variant receives individual values for red, green, blue, and optionally alpha channels. Input values are in range [0, 255].

    Example usage:

     // Create Color from RGB [0, 255] values (completely red).
    const color = ColorRGBA( 255, 0, 0 )

    // Create transparent Color.
    const transparentColor = ColorRGBA( 255, 0, 0, 127 )

    For more convenience factories, see:

    Returns

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

    Parameters

    • r: number

      Red from 0 to 255

    • g: number

      Green from 0 to 255

    • b: number

      Blue from 0 to 255

    • a: number = 255

      Alpha from 0 to 255 (can be omitted, defaulting to 255)

    Returns Color