Socket
Socket
Sign inDemoInstall

color-stringify

Package Overview
Dependencies
1
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    color-stringify

Build up a css string from color values


Version published
Weekly downloads
20K
decreased by-16.61%
Maintainers
2
Install size
18.1 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 14 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc