Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kubrianity/color-converter
Javascript color converter
https://github.com/kubrianity/color-converter
Last synced: 30 days ago
JSON representation
Javascript color converter
- Host: GitHub
- URL: https://github.com/kubrianity/color-converter
- Owner: Kubrianity
- Created: 2022-05-03T12:13:33.000Z (over 2 years ago)
- Default Branch: root
- Last Pushed: 2022-05-03T12:22:02.000Z (over 2 years ago)
- Last Synced: 2024-11-07T09:36:20.602Z (3 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# color-converter
This is a color converter between different color models like hex,rgb and hsl. It also provides functionality for saturation and opposite colors.## Usage
``` javascript
const red = new Color(255, 67, 89, 'red');
red.hsl(); // "hsl(353,100%, 63.1%)"
red.hex(); // "#ff4359"
red.opposite(); // "hsl(173,100%, 63.1%)"
red.rgba(0.5); // "rgba(255, 67, 89, 0.5)"
```