(self)
return colors
Defines colors for values. If colors match in all models use the union
        otherwise use standard colors.
Defines colors for values. If colors match in all models use the union
        otherwise use standard colors.
Defines colors for values . If colors match in all models use the union otherwise use standard colors .
def _get_colors(self):
        """
        Defines colors for values. If colors match in all models use the union
        otherwise use standard colors.
        """
        all_colors_values = self._all_color_values()
        base_color, base_values = all_colors_values[0]
        for c, v in all_colors_values[1:]:
            if not self._colors_match(base_color, base_values, c, v):
                base_color = []
                break
            # replace base_color if longer
            if len(v) > len(base_color):
                base_color = c
                base_values = v

        if len(base_color) != len(self.class_values):
            return LimitedDiscretePalette(len(self.class_values)).palette
        # reorder colors to widgets order
        colors = [None] * len(self.class_values)
        for c, v in zip(base_color, base_values):
            colors[self.class_values.index(v)] = c
        return colors
def _get_colors ( self ) : all_colors_values = self . _all_color_values ( ) base_color , base_values = all_colors_values [ 0 ] for c , v in all_colors_values [ 1 : ] : if not self . _colors_match ( base_color , base_values , c , v ) : base_color = [ ] break # replace base_color if longer if len ( v ) > len ( base_color ) : base_color = c base_values = v if len ( base_color ) != len ( self . class_values ) : return LimitedDiscretePalette ( len ( self . class_values ) ) . palette # reorder colors to widgets order colors = [ None ] * len ( self . class_values ) for c , v in zip ( base_color , base_values ) : colors [ self . class_values . index ( v ) ] = c return colors