Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Get a value of the proximity of two hex colours.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
colour-proximity.js
package.json

README.md

colour-proximity

Get a value of the proximity of two hex colours.

This package also exports rgb2lab([r,g,b]), a function that converts RGB to Lab* at Observer=2° and Illuminant=D65

Example

colour-proximity.proximity("#ffffff","#fffffe") // 0.5074219151751335
colour-proximity.proximity("#ffffff","#000000") // 100.000000625

Install

Use node with npm:

npm install colour-proximity
Something went wrong with that request. Please try again.