Hierarchy

  • ColorUtils

Constructors

Methods

Constructors

Methods

  • Parse hex string to RGBA. Hex string can be in format AARRGGBB or RRGGBB. Can be prefixed with # or 0x. Can also be a number.

    Parameters

    • hex: string

      color

    Returns RGBA

    RGBA color

  • Parse color to RGBA. Number can be in format AARRGGBB or RRGGBB.

    Parameters

    • hex: number

      color

    Returns RGBA

    RGBA color

  • Parse red, green and blue to RGBA. All numbers must be between 0 and 255.

    Parameters

    • r: number

      red

    • g: number

      green

    • b: number

      blue

    Returns RGBA

    RGBA color

  • Parse red, green, blue and alpha to RGBA. All numbers must be between 0 and 255.

    Parameters

    • r: number

      red

    • g: number

      green

    • b: number

      blue

    • a: number

      alpha

    Returns RGBA

    RGBA color