color-extract
Tool to extract color schemes from images
Last updated 2 years ago by jense5 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install color-extract 
SYNC missed versions from official npm registry.

Color Extract

Fetch prominent colors from images.

# Extract color schemes via terminal.
# If --clusters is not defined, the getProminentColors is used
$ npm install -g color-extract
$ color-extract --input '/path/to/some/file.png' --number 3 --clusters
# Prints ["#141CFC","#04FC7C","#FC2404"]
// Use it via the module.
import { getKMeansColors, getProminentColors } from 'color-extract';
getKMeansColors('/path/to/some/file.png', 3) .then(colors => winston.info(colors.colors))
getProminentColors('/path/to/some/file.png', 3).then(colors => winston.info(colors.colors));

// Top = true: Will seperate the color on the top line of the image.
// This option is only available in getProminentColors, not in getKMeansColors.
getProminentColors('/path/to/some/file.png', 3, true).then((colors) => {
  winston.info(colors.top);
  winston.info(colors.colors);
});

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

8 Versions

  • 1.0.0                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 4
Dependencies (11)
Dev Dependencies (20)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |