@orderandchaos/rgb-to-hsl
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

RGB to HSL and back again...

run npm install @orderandchaos/rgb-to-hsl

Example

import RgbToHsl from "@orderandchaos/rgb-to-hsl";

const rgbToHsl = new RgbToHsl();
rgbToHsl.fromRgbHex(0x0000ff)

console.log(rgbToHsl.r);
console.log(rgbToHsl.g);
console.log(rgbToHsl.b);

console.log(rgbToHsl.h);
console.log(rgbToHsl.s);
console.log(rgbToHsl.l);
console.log(rgbToHsl.rgb);
rgbToHsl.h += 180;
console.log(rgbToHsl.rgb);
rgbToHsl.h += 180;
console.log(rgbToHsl.rgb);

Readme

Keywords

none

Package Sidebar

Install

npm i @orderandchaos/rgb-to-hsl

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

23.2 kB

Total Files

5

Last publish

Collaborators

  • sarcoma