(self, number_of_colors)
return palette
Return a palette with `number_of_colors`.

        If possible try to preserve the same 'color scheme' (`rgb_colors`
        dictionary constructor parameter), falling back to the
        `DefaultRGBColors` if `number_of_colors < 18` or a rainbow palette
        otherwise.
Return a palette with `number_of_colors`.
Return a palette with number_of_colors .
def resolve(self, number_of_colors):
        """
        Return a palette with `number_of_colors`.

        If possible try to preserve the same 'color scheme' (`rgb_colors`
        dictionary constructor parameter), falling back to the
        `DefaultRGBColors` if `number_of_colors < 18` or a rainbow palette
        otherwise.

        """
        palette = copy.copy(self)
        try:
            palette.set_number_of_colors(number_of_colors)
        except ValueError:
            # Fall back to the default palette
            palette = ColorPaletteGenerator(number_of_colors)
        return palette
def resolve ( self , number_of_colors ) : palette = copy . copy ( self ) try : palette . set_number_of_colors ( number_of_colors ) except ValueError : # Fall back to the default palette palette = ColorPaletteGenerator ( number_of_colors ) return palette