npm i -S guess-color
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' );
});
npm test
Dimitry, 2@ivanoff.org.ua
curl -A cv ivanoff.org.ua