Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omegatools/hsl
Deno HSL Color Conversion Module
https://github.com/omegatools/hsl
cmyk color conversion deno hex hsl library module rgb
Last synced: 4 months ago
JSON representation
Deno HSL Color Conversion Module
- Host: GitHub
- URL: https://github.com/omegatools/hsl
- Owner: OmegaTools
- License: agpl-3.0
- Archived: true
- Created: 2021-06-03T09:46:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-19T07:30:28.000Z (about 2 years ago)
- Last Synced: 2024-04-23T01:41:30.182Z (9 months ago)
- Topics: cmyk, color, conversion, deno, hex, hsl, library, module, rgb
- Language: JavaScript
- Homepage: https://deno.land/x/hsl
- Size: 60.5 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]
# HSL
*Convert colors to HSL.*
[![Button Usage]][Usage]
[![Button Conversions]][Conversions]
## Examples
```JavaScript
import * as HSL from 'https://deno.land/x/hsl/mod.ts';
```
### RGB
```JavaScript
const rgb = [ 255 , 0 , 0 ]; // Redconst hsl = HSL.fromRGB(rgb);
console.log(hsl); // [ 0 , 100 , 50 ]
```
### Hex
```JavaScript
const hex = '#0000FF'; // Blueconst hsl = HSL.fromHex(hex);
console.log(hsl); // [ 240 , 100 , 50 ]
```
### CMYK
```JavaScript
const cmyk = [ 100 , 0 , 100 , 0 ]; // Greenconst hsl = HSL.fromCMYK(cmyk);
console.log(hsl); // [ 120 , 100 , 50 ]
```
[Conversions]: Documentation/Conversions.md
[License]: LICENSE
[Usage]: Documentation/Usage.md
[Deno]: https://deno.land/x/hsl
[#]: #[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/HSL?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