Dna.set_palette#

Dna.set_palette(palette: Optional[Dict[str, str]] = None) None#

Set the label color palette.

Modifies the palette metadata of the assay. If the palette is None, then the values are set using the COLORS constant value. If the palette is a dict and any label does not exist in it, then the color from the existing palette is used. If the label doesn’t exist in the existing palette then an arbitrary desaturated color is chosen for that label.

Parameters
palettedictionary

The color values for each label. A subset of labels is not accepted.

Raises
TypeError

When the provided palette is not a dictionary.

ValueError

When one of the labels is not present in the given palette.