HSVColorSpace
Install
npm install hsv-color-space
Get Started
Hex RGB to HSV
var HSVColorSpace = ; // from Hexvar hex = 0xff8866; // Hex to R,G,Bvar r = hex>>16 & 0xff;var g = hex>>8 & 0xff;var b = hex & 0xff; // to Floatr /= 0xff;g /= 0xff;b /= 0xff; var hsv = HSVColorSpace; var h = hsv0;var s = hsv1;var v = hsv2; // Hue on 360h *= 360; console;
HSV value to Hex RGB
var HSVColorSpace = ; var h = 180;var s = 05;var v = 025; // Hue to Floath /= 360; var rgb = HSVColorSpace; // Get R,G,Bvar r = rgb0;var g = rgb1;var b = rgb2; // Merge Hexvar color = r*0xff<<16 + g*0xff<<8 + b*0xff<<0; console;
test
npm run test