1.0.11 • Published 1 year ago

clr-convert v1.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

clr-convert

Tests

Easy way to convert colors!

Just install using npm install clr-convert

Usage:

Hex To RGB:

const { hexToRgb } = require("clr-convert");

console.log(hexToRgb("#7288DA")); // Should output [114, 137, 218]

Hex To HSL:

const { hexToHsl } = require("clr-convert");

console.log(hexToHsl("#7288DA")); // Should output [3.783333333333333, 0.58, 0.65]

RGB To Hex:

const { rgbToHex } = require("clr-convert");

console.log(rgbToHex(114, 136, 218)); // Should output #7288da

RGB To HSL:

const { rgbToHsl } = require("clr-convert");

console.log(rgbToHsl(114, 137, 218)); // Should output [3.783333333333333, 0.58, 0.65]

HSL to RGB:

const { hslToRgb } = require("clr-convert");

console.log(hslToRgb(3.783333333333333, 0.58, 0.65)); // Should output [114, 137, 218]

HSL to Hex:

const { hslToHex } = require("clr-convert");

console.log(hslToHex(3.783333333333333, 0.58, 0.65)); // Should output #7289da
1.0.9

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago