Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshgillies/rebeccapurple
Simple JavaScript module for transforming the W3C CSS rebeccapurple color to rgb.
https://github.com/joshgillies/rebeccapurple
Last synced: 5 days ago
JSON representation
Simple JavaScript module for transforming the W3C CSS rebeccapurple color to rgb.
- Host: GitHub
- URL: https://github.com/joshgillies/rebeccapurple
- Owner: joshgillies
- License: mit
- Created: 2015-12-08T23:00:48.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-07T03:11:11.000Z (almost 9 years ago)
- Last Synced: 2024-10-19T00:15:08.586Z (27 days ago)
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rebeccapurple
Simple JavaScript module for transforming the [W3C CSS `rebeccapurple` color](http://dev.w3.org/csswg/css-color/#valdef-color-rebeccapurple) to rgb.
[![Build Status](https://travis-ci.org/joshgillies/rebeccapurple.svg)](https://travis-ci.org/joshgillies/rebeccapurple)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)## Usage
```js
var rebeccapurple = require('rebeccapurple')
````rebeccapurple` provides a simple interface for converting the CSS named color
`rebeccapurple` to any rgb value:```js
console.log(rebeccapurple('color: rebeccapurple')) // 'color: rgb(102, 51, 153'
```In addition you can pass an optional argument specifying the output value:
```js
console.log(rebeccapurple('color: rebeccapurple', 'hex')) // 'color: #663399'
```Any output value supported by the [color](https://github.com/MoOx/color#css-strings)
module can be used here. Eg. `'hex'`, `'rgb'`, `'hsl'`, etc.## License
MIT