hex-to-hsl

Convert a hex color string to an hsl array

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
hex-to-hsl
1231.0.28 years ago8 years agoMinified + gzip package size for hex-to-hsl in KB

Readme

HEX to HSL
Build Status
Convert a HEX color string to an HSL value

Install

npm install hex-to-hsl --save

Use

var hexToHsl = require('hex-to-hsl');

console.log(hexToHsl('#0593FF')); // Prints [206, 100, 51]
console.log(hexToHsl('#00C176')); // Prints [157, 100, 38]
console.log(hexToHsl('#fff')); // Prints [0, 0, 100]