guess-color
TypeScript icon, indicating that this package has built-in type declarations

10.1.1 • Public • Published

NPM version NPM downloads MIT License js-standard-style Build Status: Linux Build Status: Windows Coverage Status

guess-color

Guess Color

Installation

npm i -S guess-color

Usage

var color = require('guess-color');

console.log( color.guess( '#000000' ) ); // Black

console.log( color.guess( [128, 128, 128] ) ); // Grey

console.log( color.guess( {r:75, g:0, b:130} ) ); // Indigo

console.log( color.guess( 'Black' ) ); // [ 0, 0, 0 ]

color.guessByImage('./test/static/test.png').then( res => {
  console.log( res ); // [ [ 'SteelBlue', [ 70, 130, 180 ], '1.00' ] ]
});

color.imageByName('Blue', 'blue.jpg').then( () => {
  console.log( 'blue file created' );
});

Tests

npm test

Change Log

all changes

Created by

Dimitry, 2@ivanoff.org.ua

curl -A cv ivanoff.org.ua

Package Sidebar

Install

npm i guess-color

Weekly Downloads

14

Version

10.1.1

License

MIT

Unpacked Size

33.3 kB

Total Files

22

Last publish

Collaborators

  • ivanoff