code: function hexToRgb(hex) {
          hex = hex.toLowerCase();
          if(hex && hexReg.test(hex)) {
              var i;
              if(hex.length === 4) {
                  var hexNew = '#';
                  for(i = 1; i < 4; i += 1) {
                      hexNew += hex.slice(i, i + 1).concat(hex.slice(i, i + 1));
                  }
                  hex = hexNew;
              }
  
              var hexChange = [];
              for(i = 1; i < 7; i += 2) {
                  hexChange.push(convertToInt('0x' + hex.slice(i, i + 2)));
              }
              return {
                  r: hexChange[0],
                  g: hexChange[1],
                  b: hexChange[2],
                  a: 1
              };
          } else {
              throw new Error('Wrong hex string! (hex: ' + hex + ')');
          }
      }
docs: /* helpers