Added support for 3 character and 4 character hex strings (E.g. #FFF, #FFFF)