# ColorMixin

## util. ColorMixin

Source:
  - util/ColorMixin.js, line 12

This mixin implement color and contrast changes for visual stimuli

### Methods

#### getContrastedColor(color, contrast)

Source:
  - util/ColorMixin.js, line 58

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:
  - util/ColorMixin.js, line 26

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:
  - util/ColorMixin.js, line 42

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