Return a color palette with hex codes instead of RGB values.

def as_hex(self):
        """
        Return a color palette with hex codes instead of RGB values.
        """
        hex = [mpl.colors.rgb2hex(rgb) for rgb in self]
        return ColorPalette(hex)