Second pass at color selection algorithm