sass-color-calculator
calculate the Sass color functions required to get one color from a base color
Accepts almost all types of color strings, see color-delta for more info.
Partially extracted from Sass Colour Function Calculator.
Install
$ npm install --save sass-color-calculator
Usage
var sassColorCalculator = ; ;// => "lighten(desaturate(adjust-hue(#BADA55, 19.8496), 50.7028), 10.1961)"
CLI
$ npm install --global sass-color-calculator
$ sass-color-calculator --help calculate the Sass color functions required to get one color from a base color Example sass-color-calculator BADA55 B0BCA7 => lighten
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