new PaletteFactory(palettes)
Create a palette factory from an array of palettes
Parameters:
| Name | Type | Description |
|---|---|---|
palettes |
Array.<Array.<Color>> | array of palettes, each palette is an array of Color objects or HEX color strings |
- Source:
Members
length
Get the number of palettes in the factory
- Source:
palettes
Get all palettes in the factory
- Source:
Methods
getPalette(n) → {Palette}
Get the palette at index n
Parameters:
| Name | Type | Description |
|---|---|---|
n |
number | index of the palette |
- Source:
Returns:
palette at index n
- Type
- Palette
(static) fromHEXArray(hex_palettes) → {PaletteFactory}
Create a palette factory from an array of HEX palettes
Parameters:
| Name | Type | Description |
|---|---|---|
hex_palettes |
Array.<Array.<string>> | array of palettes, each palette is an array of HEX color strings |
- Source:
Returns:
palette factory object
- Type
- PaletteFactory
(static) fromRGBArray(rgb_palettes) → {PaletteFactory}
Create a palette factory from an array of RGB palettes
Parameters:
| Name | Type | Description |
|---|---|---|
rgb_palettes |
Array.<Array.<Array.<number>>> | array of palettes, each palette is an array of RGB color arrays |
- Source:
Returns:
palette factory object
- Type
- PaletteFactory