color-delta
calculate the diff between 2 colors
Accepts almost all types of color strings, see TinyColor for more info.
Partially extracted from Sass Colour Function Calculator.
Install
$ npm install --save color-delta
Usage
var colorDelta = ; // => { hue: 19.84, saturation: ... }
CLI
$ npm install --global color-delta
$ color-delta --help calculate the diff between 2 colors Example color-delta #bada55 #b0bca7 =>
API
Base
Type: String
Base color to calculate difference from.
Target
Type: String
Target color to calculate difference to.
Decimals
Type: String
optional
Fixed number of decimals in returned values.
Related
License
MIT © Matias Singers