rebeccapurple
v1.1.1
Published
Simple JavaScript module for transforming the W3C CSS rebeccapurple color to rgb.
Downloads
18
Maintainers
Readme
rebeccapurple
Simple JavaScript module for transforming the W3C CSS rebeccapurple
color to rgb.
Usage
var rebeccapurple = require('rebeccapurple')
rebeccapurple
provides a simple interface for converting the CSS named color
rebeccapurple
to any rgb value:
console.log(rebeccapurple('color: rebeccapurple')) // 'color: rgb(102, 51, 153'
In addition you can pass an optional argument specifying the output value:
console.log(rebeccapurple('color: rebeccapurple', 'hex')) // 'color: #663399'
Any output value supported by the color
module can be used here. Eg. 'hex'
, 'rgb'
, 'hsl'
, etc.
License
MIT