0.1.4 • Published 9 years ago

sass-color-calculator v0.1.4

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

sass-color-calculator Build Status Dependency Status Coverage Status

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 = require('sass-color-calculator');

sassColorCalculator('#BADA55', '#B0BCA7');
// => "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(desaturate(adjust-hue(BADA55, 19.8496), 50.7028), 10.1961)

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

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago