dynamic color detection based on preview change