color/mixer
Color mixer.
- Source:
- commonjs-modules.js, line 1
Members
Methods
blend(color1, color2) → {string}
Blend two colors together.
- Source:
- commonjs-modules.js, line 13
Parameters:
Name | Type | Description |
---|---|---|
color1 | string | The first color, in hexadecimal format. |
color2 | string | The second color, in hexadecimal format. |
Returns:
The blended color.
- Type
- string
blend(color1, color2) → {string}
Blend two colors together.
- Source:
- es2015-modules.js, line 15
Parameters:
Name | Type | Description |
---|---|---|
color1 | string | The first color, in hexadecimal format. |
color2 | string | The second color, in hexadecimal format. |
Returns:
The blended color.
- Type
- string
darken(color, percent) → {string}
Darken a color by the given percentage.
- Source:
- commonjs-modules.js, line 24
Parameters:
Name | Type | Description |
---|---|---|
color | string | The color, in hexadecimal format. |
percent | number | The percentage, ranging from 0 to 100. |
Returns:
The darkened color.
- Type
- string
toRgb(color) → {Array.<number>}
Get the red, green, and blue values of a color.
- Source:
- es2015-modules.js, line 28
Parameters:
Name | Type | Description |
---|---|---|
color | string | A color, in hexadecimal format. |
Returns:
An array of the red, green, and blue values, each ranging from 0 to 255.
- Type
- number[]