0.0.3 • Published 7 years ago

get-string-colors v0.0.3

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
7 years ago

get-string-colors

npm license

Travis branch codecov David

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