Constructor
new Palette(colors)
Parameters:
Name | Type | Description |
---|---|---|
colors |
Array.<Color> | The array of colors to build the palette. |
- Source:
Methods
get(index) → {String}
Parameters:
Name | Type | Description |
---|---|---|
index |
Integer | The position inside colors array (circular, if index is greater than colors length). |
- Source:
Returns:
Returns the index'th color in colors array (mod length
if index is greater than number of colors).
- Type
- String