Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.
OmegaToolsPublic archive

Latest commit

 

History

26 Commits

Folders and files

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 ]

Releases

Contributors

Languages