def show_colors(self, palette_type, palette_name, delete=False, update=False):
        """Show colors under the given palette."""

        target = None
        current = False
        if palette_type == "__special__":
            if palette_name == "Current Colors":
                current = True
                target = {
                    "name": palette_name,
                    "colors": self.view.settings().get('color_helper.file_palette', [])
                }
            elif palette_name == "Project Colors":
                data = self.view.window().project_data()
                current = True
                target = {
                    "name": palette_name,
                    "colors": [] if data is None else data.get('color_helper_project_palette', [])
                }
            elif palette_name == "Favorites":
                target = util.get_favs()
        elif palette_type == "__global__":
            for palette in util.get_palettes():
                if palette_name == palette['name']:
                    target = palette
        elif palette_type == "__project__":
            for palette in util.get_project_palettes(self.view.window()):
                if palette_name == palette['name']:
                    target = palette

        if target is not None:
            html = []

            if not delete:
                html.append(BACK_PALETTE_MENU)
                if not current:
                    html.append(DELETE_COLOR_MENU % (palette_type, target['name']))
            else:
                html.append(BACK_COLORS_MENU % (palette_type, target['name']))

            if delete:
                html.append(DELETE_COLOR)

            html.append(
                self.format_colors(target['colors'], target['name'], palette_type, delete)
            )

            if update:
                md = mdpopups.md2html(self.view, ''.join(html))
                mdpopups.update_popup(
                    self.view,
                    '<div class="color-helper content">%s</div>' % md,
                    css=util.ADD_CSS
                )
            else:
                self.view.settings().set('color_helper.popup_active', True)
                self.view.settings().set('color_helper.popup_auto', self.auto)
                md = mdpopups.md2html(self.view, ''.join(html))
                mdpopups.show_popup(
                    self.view, md % '<div class="color-helper content">%s</div>',
                    css=util.ADD_CSS, location=-1, max_width=600, max_height=350,
                    on_navigate=self.on_navigate,
                    on_hide=self.on_hide,
                    flags=sublime.COOPERATE_WITH_AUTO_COMPLETE
                )
dataset/ETHPy150Open facelessuser/ColorHelper/color_helper.py/ColorHelperCommand.show_colors/swapped operands of `%`