Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/component/color
RGBA / HSLA
https://github.com/component/color
Last synced: 13 days ago
JSON representation
RGBA / HSLA
- Host: GitHub
- URL: https://github.com/component/color
- Owner: component
- Created: 2012-09-12T16:00:33.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-10-20T02:16:37.000Z (about 11 years ago)
- Last Synced: 2024-05-08T17:16:39.285Z (8 months ago)
- Language: JavaScript
- Size: 101 KB
- Stars: 6
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# color
RGBA / HSLA color manipulation
## Installation
$ component install component/color
## API
### .rgba(r, g, b, a)
Return an `RGBA` object.
### .hsla(h, s, l, a)
Return an `HSLA` object.
### .RGBA(r, g, b, a)
The `RGBA` constructor.
### .HSLA(h, s, l, a)
The `HSLA` constructor.
### RGBA#toRGBA()
Returns itself.
### HSLA#toRGBA()
Return the `RGBA` representation.
### RGBA#toHSLA()
Return the `HSLA` representation.
### HSLA#toHSLA()
Returns itself.
### RGBA#toString()
Return the string representation, for example "#f00", or "rgba(255,0,0,.5)".
### HSLA#toString()
Return the string representation, for example "hsla(0,100,50,1)".
# License
MIT