node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

oil-paints

Oil Paints

A collection of tools to mix colors as if they were paints.

Usage

var paints = require('oil-paints');
 
var basic = paints([255, 0, 0], [0, 255, 0], [0, 0, 255], [0, 0, 0], [255, 255, 255]);
 
var nearest = basic.nearest([100, 20, 35]);
 
// -> ?
 
var colorWheel = basic.wheel();
 
// -> ? (an adarray to be saved with require('save-pixels');
 
var mix = basic.mix([100, 20, 35]);
 
// -> ? (an array of the parts per color to make this color);
 
var img = // get some ndarray image via require('get-pixels');
 
var nearest = basic.img.nearest(img);
 
// -> ?
 
var pallete = basic.img.pallete(img);
 
// -> ?