ColorMixin

util. ColorMixin

Source:

This mixin implement color and contrast changes for visual stimuli

Methods

getContrastedColor(color, contrast)

Source:

Get a new contrasted Color.

Parameters:
Name Type Description
color string | number | Array.<number>

the color

contrast number

the contrast (must be between 0 and 1)

setColor(color, logopt)

Source:

Setter for Color attribute.

Parameters:
Name Type Attributes Default Description
color Color

the new color

log boolean <optional>
false

whether or not to log

setContrast(contrast, logopt)

Source:

Setter for Contrast attribute.

Parameters:
Name Type Attributes Default Description
contrast number

the new contrast (must be between 0 and 1)

log boolean <optional>
false

whether or not to log