Skip to content

colorjs/color-stringify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

color-stringify Build Status Code Climate

Stringify passed values into a color string.

$ npm install color-stringify

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:

  • 'hex'#RRGGBB or #RGB if possible.
  • 'keyword'red, see the list of supported names.
  • 'percent'rgb(10%, 20%, 30%, 0.1).
  • 'adobe1'R:0, G:0, B:0.
  • 'adobe2'(R0 / G0 / B0).
  • 'websafe'request feature.
  • 'pantone'request feature.
  • undefinedrgba(10, 20, 30, 0.2).
  • Any other string — <type>(<value1>, <value2>, <value3>, ...).

NPM

About

Stringify color values to a css string

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published