colourlovers-palettes-api
v1.0.3
Published
A wrapper around the colourlovers.com API, allows you to find a set of color palettes by keyword.
Downloads
2
Readme
colourlovers.com Palettes API
What is it?
An unofficial wrapper around the colourlovers.com API, allows you to find a set of color palettes by keyword. The result will be in the form of an array which contains multiple arrays of pallets in hex code.
Install
$ npm install --save colourlovers-palettes-api
Available functions
palettes.search(keyword, numberOfResults)
// finds a specified number of colour patterns related to the given keyword.
palettes.random(keyword)
// finds 1 random set of colour patterns.
Example usage
const palettes = require('colourlovers-palettes-api')
// find a set of 5 color pallets labeled as 'intense'
palettes.search('intense', 5)
.then((result) => {
console.log(result);
})
.catch((err) => {
console.log(err);
})
Example response
[ [ '3F324D', '93C2B1', 'FFEACC', 'FF995E', 'DE1D6A' ],
[ 'C4EAFD', 'FF5756', 'F4343F', 'B9EAF8', 'A3D3F9' ],
[ 'A0B6AB', 'D4DABA', 'E9ECB7', 'EBF785', 'F2FD01' ],
[ 'A20075', 'B92669', 'D04C5E', 'E77152', 'FE9746' ],
[ '969E9B', '707A6F', '6B5846', '663330', '521829' ] ]
Author
License
This project is licensed under the MIT License.