1.0.0 • Published 6 years ago

ember-cli-tinycolor v1.0.0

Weekly downloads
75
License
MIT
Repository
github
Last release
6 years ago

ember-cli-tinycolor

Simply wraps tinycolor into Ember, allowing you to do a wide range of color tests, conversions and transformations, such as:

tinycolor("#fff").isDark();  // false
tinycolor("#fff").isLight(); // true
tinycolor("#f00").lighten().toString(); // "#ff3333"
tinycolor("#f00").brighten().toString(); // "#ff1919"
tinycolor("#f00").darken().toString(); // "#cc0000"
tinycolor("#f00").desaturate().toString(); // "#f20d0d"
tinycolor("hsl(0, 10%, 50%)").saturate().toString(); // "hsl(0, 20%, 50%)"
tinycolor("#f00").greyscale().toString(); // "#808080"

... and many others - check out the tinycolor README for more.

Big thanks to Brian Grinstead for TinyColor!

Installation

ember install ember-cli-tinycolor

Usage

Simply import tinycolor from 'tinycolor'; in any controller/service/component/route etc as needed.