Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
/ HSL Public archive

Deno HSL Color Conversion Module

License

Notifications You must be signed in to change notification settings

OmegaTools/HSL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Badge Stars    Badge Deno



HSL

Convert colors to HSL.


Button Usage    Button Conversions



Examples


import * as HSL from 'https://deno.land/x/hsl/mod.ts';

RGB

const rgb = [ 255 , 0 , 0 ]; // Red

const hsl = HSL.fromRGB(rgb);

console.log(hsl); // [ 0 , 100 , 50 ]

Hex

const hex = '#0000FF'; // Blue

const hsl = HSL.fromHex(hex);

console.log(hsl); // [ 240 , 100 , 50 ]

CMYK

const cmyk = [ 100 , 0 , 100 , 0 ]; // Green

const hsl = HSL.fromCMYK(cmyk);

console.log(hsl); // [ 120 , 100 , 50 ]