|
1 | 1 |
|
2 | 2 | <br> |
3 | 3 |
|
4 | | -<div align = center> |
| 4 | +[![Badge Commit]][GitHub] |
| 5 | +[![Badge License]][License] |
| 6 | +[![Badge Stars]][GitHub] |
| 7 | + |
| 8 | +<br> |
5 | 9 |
|
6 | 10 | # HSL |
7 | 11 |
|
8 | 12 | *Convert colors to RGB.* |
9 | 13 |
|
10 | 14 | <br> |
11 | 15 |
|
12 | | -[![Button Documentation]][Documentation] |
| 16 | +[![Button Documentation]][GitHub] |
| 17 | + |
| 18 | +<br> |
| 19 | +<br> |
| 20 | + |
| 21 | +## Preview |
| 22 | + |
| 23 | +<br> |
| 24 | + |
| 25 | +```JavaScript |
| 26 | +import * as RGB from 'https://deno.land/x/rgb/mod.ts'; |
| 27 | +``` |
| 28 | + |
| 29 | +</div> |
| 30 | + |
| 31 | +<br> |
| 32 | + |
| 33 | +### Hex |
| 34 | + |
| 35 | +```JavaScript |
| 36 | +const hex = '#0000FF'; // Blue |
| 37 | + |
| 38 | +const rgb = RGB.fromHex(hex); |
| 39 | + |
| 40 | +console.log(rgb); // [ 0 , 0 , 255 ] |
| 41 | +``` |
| 42 | + |
| 43 | +<br> |
| 44 | + |
| 45 | +### HSL |
| 46 | + |
| 47 | +```JavaScript |
| 48 | +const hsl = [ 0 , 100 , 50 ]; // Red |
| 49 | + |
| 50 | +const rgb = RGB.fromHSL(hsl); |
13 | 51 |
|
14 | | -<div> |
| 52 | +console.log(rgb); // [ 255 , 0 , 0 ] |
| 53 | +``` |
15 | 54 |
|
16 | 55 | <br> |
17 | 56 |
|
18 | 57 |
|
19 | 58 | <!-----------------------------------------------------------------------------> |
20 | 59 |
|
21 | | -[Documentation]: https://github.com/OmegaTools/RGB |
| 60 | +[Examples]: https://github.com/OmegaTools/RGB/tree/main/Examples |
| 61 | +[License]: https://github.com/OmegaTools/RGB/blob/main/LICENSE |
| 62 | +[GitHub]: https://github.com/OmegaTools/RGB |
| 63 | + |
| 64 | + |
| 65 | +<!---------------------------------[ Badges ]----------------------------------> |
| 66 | + |
| 67 | +[Badge License]: https://img.shields.io/badge/License-AGPL3-015d93.svg?style=for-the-badge&labelColor=blue |
| 68 | +[Badge Stars]: https://img.shields.io/github/stars/OmegaTools/RGB?style=for-the-badge&logoColor=white&logo=Trustpilot&labelColor=FF66AA&color=cf538b |
| 69 | +[Badge Commit]: https://img.shields.io/github/last-commit/OmegaTools/RGB?style=for-the-badge&logoColor=white&logo=Git&labelColor=64bc4b&color=539a3e |
22 | 70 |
|
23 | 71 |
|
24 | 72 | <!---------------------------------[ Buttons ]---------------------------------> |
25 | 73 |
|
26 | | -[Button Documentation]: https://img.shields.io/badge/Documentation-04ACE6?style=for-the-badge&logoColor=white&logo=GitHub |
| 74 | +[Button Documentation]: https://img.shields.io/badge/Documentation-blue?style=for-the-badge&logoColor=white&logo=BookStack |
0 commit comments