Abstract Protected constructorThe name of the color selector.
Optional randomOrder: booleanA flag that determines the color selection order of selectColorFromChoices.
Private Readonly _COLOR_A list of Color objects that the selector can choose from.
Private Readonly _COLOR_A set of the names of the colors that can be or have been chosen by the color selector.
Private Readonly _NAMEThe name of the color selector.
Private Readonly _RANDOM_A flag that determines the color selection order
of selectColorFromChoices.
When true, selectColorFromChoices will select colors
from _COLOR_CHOICES in a random order.
When false, selectColorFromChoices will select colors
list order.
Private _currentThe current index of _COLOR_CHOICES being chosen
when colors are selected in list order (i.e. _RANDOM_ORDER is false).
The names of the colors that can be or have been chosen by the color selector.
The name of the selector (e.g. 'blue rgb color selector').
Abstract typeThe ColorSelectorType of the selector.
Protected COLOR_The _COLOR_NAMES set.
Select and return a Color object to be used as a background.
The color will either be black (#000000), white (#FFFFFF), or a color
from the selector, chosen by the getColor method.
IMPORTANT: The sum of chanceOfBlack, chanceOfWhite, and chanceOfColor
should be equal to 1.0.
The percent (0-1) chance that the chosen color will be black (#000000). The sum of all percentages should be equal to 1.0.
The percent (0-1) chance that the chosen color will be white (#FFFFFF). The sum of all percentages should be equal to 1.0.
The percent (0-1) chance that the chosen color will be a color from the selector (getColor). The sum of all percentages should be equal to 1.0.
Abstract getThe selected Color from the _COLOR_CHOICES list.
If _COLOR_CHOICES is empty, a default Color
object (black) will be returned.
Protected addAdd a Color to the _COLOR_CHOICES list.
Private incrementIncrement _currentIndex to select the next Color element in the _COLOR_CHOICES list.
ColorSelectors choose and return colors from some set list or criteria.