https://github.com/omegatools/rgb
Deno RGB Color Conversion Module
https://github.com/omegatools/rgb
color conversion deno hex hsl library module rgb
Last synced: 9 months ago
JSON representation
Deno RGB Color Conversion Module
- Host: GitHub
- URL: https://github.com/omegatools/rgb
- Owner: OmegaTools
- License: agpl-3.0
- Archived: true
- Created: 2021-06-02T09:50:08.000Z (about 5 years ago)
- Default Branch: Stable
- Last Pushed: 2024-03-13T18:55:25.000Z (over 2 years ago)
- Last Synced: 2024-09-29T18:41:39.361Z (over 1 year ago)
- Topics: color, conversion, deno, hex, hsl, library, module, rgb
- Language: JavaScript
- Homepage: https://deno.land/x/rgb
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Badge Stars]][#]
[![Badge Deno]][Deno]

# RGB
*Convert colors to RGB.*
[![Button Usage]][Usage]
[![Button Conversions]][Conversions]
## Examples
```JavaScript
import * as RGB from 'https://deno.land/x/rgb/mod.ts';
```
### Hex
```JavaScript
const hex = '#0000FF'; // Blue
const rgb = RGB.fromHex(hex);
console.log(rgb); // [ 0 , 0 , 255 ]
```
### HSL
```JavaScript
const hsl = [ 0 , 100 , 50 ]; // Red
const rgb = RGB.fromHSL(hsl);
console.log(rgb); // [ 255 , 0 , 0 ]
```
[Conversions]: Documentation/Conversions.md
[License]: LICENSE
[Usage]: Documentation/Usage.md
[Deno]: https://deno.land/x/rgb
[#]: #
[Badge License]: https://img.shields.io/badge/License-AGPL3-015d93.svg?style=for-the-badge&labelColor=blue
[Badge Stars]: https://img.shields.io/github/stars/OmegaTools/RGB?style=for-the-badge&logoColor=white&logo=Trustpilot&labelColor=FF66AA&color=cf538b
[Badge Deno]: https://img.shields.io/badge/-Deno-58a341?style=for-the-badge&logoColor=white&logo=Deno&labelColor=64bc4b
[Button Conversions]: https://img.shields.io/badge/Conversions-64BC4B?style=for-the-badge&logoColor=white&logo=Betfair
[Button Usage]: https://img.shields.io/badge/Usage-04ACE6?style=for-the-badge&logoColor=white&logo=GitBook