Provides pre-defined color values for drawing operations.

Constructors

Accessors

Methods

Constructors

Accessors

  • get colors(): readonly number[]
  • Retrieve the 24bit color values of the currently selected palette.

    Returns readonly number[]

    The colors in the palette.

  • get paletteIndex(): number
  • Retrieve the index of the currently selected, pre-defined palette values.

    Returns number

    The index of the currently selected, pre-defined palette values.

Methods

  • Retrieve a random color from the palette.

    Parameters

    • randomInstance: Random = random

      The PRNG to use. Ideally, supply your own.

    Returns number

    A random color from the palette.