get-string-colors
v0.0.3
Published
Get colors of a string using Google images and get-image-colors
Downloads
2
Readme
get-string-colors
Get colors of a string using google-images, got and get-image-colors.
Installation
Install from npmjs.org
yarn add get-string-colors
Use
To interact with Google services, you will need to create a new Custom Search Engine (CSE) and appropriate API Key.
Pass these to the constructor as you normally would sensitive data:
const GetStringColors = require("get-string-colors");
const getStringColors = new GetStringColors(process.env.GOOGLE_CSE_ID, process.env.GOOGLE_API_KEY);
getStringColors.getStringColors("grass").then(colors => {
colors.map(color => {
console.log(color.hex);
})
})
Development
Please ensure PRs are accompanied by comments and tests.
npm run test