hex-int Convert Hex color code (#RRGGBB / #RBG) to 32-bit Integer Install npm install --save hex-int Usage var hexToInt = require('hex-int'); console.log(hexToInt.cssStringToColor('#9932CC')); // 13382297