Added validation of the HEX code and prevention of entering of non valid hex codes in the input field.