colorlab
colorLab is a Javascript Lib to calculate DeltaE (CIEDE2000) values between two colors.
installation
npm install colorlab
DeltaE 2000 of two CIELAB colors
; let color1 = 500000 26772 -797751;let color2 = 500000 00000 -827485; // CIEDE2000 tells you the DeltaE, or perceptible color// difference, between CIELAB color1 and CIELAB color2 color1; // => 2.0425// orcolorlab; // => 2.0425
Contribut
npm Scripts
npm test
- Lint the library and tests, then run the unit testsnpm run lint
- Lint the source and unit testsnpm run watch
- Continuously run the unit tests as you make changes to the source and test files themselvesnpm run test-browser
- Build the library for use with the browser spec runner. Changes to the source will cause the runner to automatically refresh.npm run build
- Lint then build the librarynpm run coverage
- Generate a coverage report
Browser Tests
The browser spec runner can be opened in a browser to run your tests. For it to work, you must first run npm run test-browser
. This will set up a watch task that will automatically refresh the tests when your scripts, or the tests, change. The spec runner file is located at test/runner.html
: open it in your browser to run tests.
Authors
See AUTHORS.txt
.