0.0.4 • Published 9 years ago

deltae v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

#Get the Delta-E from two hex color values http://en.wikipedia.org/wiki/Color_difference

Implements the formulas from: http://www.easyrgb.com/index.php?X=MATH

##Installation

npm install deltae

##Usage

//Require the package var color = require('deltae');

var colorA = "#007ace"; var colorB = "#017acf"

//Get the color difference color.delta(colorA,colorB,function(delta){ console.log(delta); });

//You can also onvert rgb to XYZ

color.xyz(colorA, function(XYZ){ var X = XYZ.X; var Y = XYZ.Y; var Z = XYZ.Z; console.log(X+" "+Y+" "+Z); })

//Or CIE-Lab

color.lab(colorA,function(LAB){ var L = LAB.L; var a = LAB.a; var b = LAB.b; console.log(L+" "+a+" "+b); });

0.0.4

9 years ago

0.0.3

9 years ago