color-stringify

Build up a css string from color values

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
color-stringify
111.2.16 years ago8 years agoMinified + gzip package size for color-stringify in KB

Readme

color-stringify Build Status Code Climate
Stringify passed values into a color string. $ npm install color-stringify ```js var stringify = require('color-stringify'); stringify(120,100,100,.4, 'hsl'); //hsla(120, 100%, 100%, .4) ```

API

stringify(<values>, <type>?)

<values> is an array or an object from css-parse <type> is an optional string:
  • x 'hex'#RRGGBB or #RGB if possible.
  • x 'percent'rgb(10%, 20%, 30%, 0.1).
  • x 'adobe1'R:0, G:0, B:0.
  • x 'adobe2'(R0 / G0 / B0).
  • x undefinedrgba(10, 20, 30, 0.2).
  • x Any other string — <type>(<value1>, <value2>, <value3>, ...).
NPM