Skip to content

Jense5/site-scheme

Repository files navigation

Site Scheme

Fetch color schemes from websites.

# Extract color schemes via terminal (optional output file).
# See the images and result below. The top is the color at the top of the site.
$ npm install -g site-scheme
$ site-scheme --url 'http://toledo.kuleuven.be' --number 5 --output 'output.png'
# Prints: {"top":"#1E8EB1","colors":["#F3F5F5","#96C4D5",...]}
// Use it via the module.
import extractScheme from 'site-scheme';
extractScheme('http://toledo.kuleuven.be', 5, 'output.png').then((colors) => {
  winston.info(JSON.stringify(colors, null, 4));
});