ember-cli-tinycolor

1.0.0 • Public • Published

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.

Package Sidebar

Install

npm i ember-cli-tinycolor

Weekly Downloads

6

Version

1.0.0

License

MIT

Unpacked Size

255 kB

Total Files

11

Last publish

Collaborators

  • dbouwman