rgb2ryb
Convert colors in JavaScript from rgb to ryb and back
DEPRECATION NOTICE
The calculations presented here are not accurate, this module has been deprecated
in favor of ryb2rgb (npm install ryb2rgb
)
Example
rgb2ryb
var rgb2ryb =console;
yields
ryb2rgb
var rgb2ryb =console;
yields
complimentary
var rgb2ryb =console;
yields
Functions
These functions are available in Node and in the browser
color
: an array of rgb/ryb values. ie[0, 255, 255]
rgb2ryb(color)
Convert from rgb to ryb
ryb2rgb(color)
Convert from ryb to rgb
complimentary(color, [limit])
Easily calculate a colors complimentary, limit defaults to 255
Usage
var rgb2ryb = ;
or
Installation
npm install rgb2ryb
Credits
Original code http://www.insanit.net/computer-programming/red-green-blue-to-red-yellow-blue-part-2/
Ported to JS for node and the browser
License
MIT