Added logic around min/max number of colors.