An open API service indexing awesome lists of open source software.

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

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