Optimize hexToRgb

Moved regex compilation outside function
Prettify
Commenatoriesese
Comments