Added condition to check if HEX code contain only valid characters
Added more flexible check for HEX color code. Also error is now less specific.
Added another test case for missed space in color definition
Merge pull request #1976 from peruginni/master

Added condition to check if HEX code contain only valid characters (issue #1015)