color picker: minor code optimization