• Creates a color from a string representation (as supported in CSS). Creates a color from a number representation [0; 16777215]

    Parameters

    • color: string | number | Color

      The string to convert to a color.

    Returns Color

    the color object.

  • Create a color in the specified color space using a, b and c as values.

    Parameters

    • a: number
    • b: number
    • c: number
    • Optional colorSpace: keyof ColorSpaces

      The color space to use. Defaults to "rgb".

    Returns Color

    the color object.

  • Parameters

    • a: number
    • b: number
    • c: number
    • d: number
    • Optional colorSpace: keyof ColorSpaces

    Returns Color

  • Create a color in the specified color space using values.

    Parameters

    • values: number[]

      An array of values (e.g. [r, g, b, a?]).

    • Optional colorSpace: keyof ColorSpaces

      The color space to use. Defaults to "rgb".

    Returns Color

    the color object.

Generated using TypeDoc