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.
$ npm install --save color-delta
var colorDelta = require('color-delta');
colorDelta('#BADA55', '#B0BCA7', 2)
// => { hue: 19.84, saturation: ... }
$ npm install --global color-delta
$ color-delta --help
calculate the diff between 2 colors
Example
color-delta #bada55 #b0bca7
=> {
"hue": 19.849624060150404,
"saturation": 0.5070282063269438,
"lightness": -0.10196078431372546
}
Required
Type: String
Base color to calculate difference from.
Required
Type: String
Target color to calculate difference to.
Optional
Type: String
Fixed number of decimals in returned values.
MIT © Matias Singers