Added max and min values threshold in color selection