Class ColorSelectorAbstract

ColorSelectors choose and return colors from some set list or criteria.

Hierarchy (view full)

Constructors

Properties

_colorChoices: Color[] = []

A set list of Color objects that the selector can choose from.

_randomOrder: boolean

A flag that determines the color selection order of selectColorFromChoices.
When true, selectColorFromChoices will select colors from _colorChoices in a random order.
When false, selectColorFromChoices will select colors list order.

_currentIndex: number = 0

The current index of _colorChoices being chosen when colors are selected in list order (i.e. _randomOrder is false).

Accessors

  • get name(): string
  • Returns string

    The name of the selector (e.g. 'blue rgb color selector').

  • get colorNames(): string[]
  • Returns string[]

    A list of the names of the colors the selector is choosing from.

Methods

  • Select and return a Color object.

    Returns Color

  • Add a Color to the _colorChoices list.

    Parameters

    Returns void