Skip to content

ivanoff/guess-color

Repository files navigation

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