added support for 4,5,7,9-char hex colors