validate hex color given in params before using