Checks if a given string represents a valid hex color.