def show_palettes(self, delete=False, color=None, update=False):
        """Show preview of all palettes."""

        show_div = False
        s = sublime.load_settings('color_helper.sublime-settings')
        show_global_palettes = s.get('enable_global_user_palettes', True)
        show_project_palettes = s.get('enable_project_user_palettes', True)
        show_favorite_palette = s.get('enable_favorite_palette', True)
        show_current_palette = s.get('enable_current_file_palette', True)
        s = sublime.load_settings('color_helper.sublime-settings')
        show_picker = s.get('enable_color_picker', True) and self.no_info

        html = []

        if (not self.no_info and not delete) or color:
            html.append(BACK_INFO_MENU)
        elif delete:
            html.append(BACK_PALETTE_MENU)

        if show_picker:
            html.append((color if color else '#ffffffff') % PICK_MENU)

        if not delete and not color and (show_global_palettes or show_project_palettes or show_favorite_palette):
            html.append(DELETE_PALETTE_MENU)

        if delete:
            html.append(DELETE_PALETTE)

        if color:
            html.append(NEW_PALETTE % {'color': color})

        if show_favorite_palette:
            favs = util.get_favs()
            if len(favs['colors']) or color:
                show_div = True
                html.append(
                    self.format_palettes(favs['colors'], favs['name'], '__special__', delete=delete, color=color)
                )

        if show_current_palette:
            current_colors = self.view.settings().get('color_helper.file_palette', [])
            if not delete and not color and len(current_colors):
                show_div = True
                html.append(
                    self.format_palettes(current_colors, "Current Colors", '__special__', delete=delete, color=color)
                )

        if show_global_palettes:
            palettes = util.get_palettes()
            if len(palettes) and show_div:
                show_div = False
                html.append('\n\n---\n\n')
            for palette in palettes:
                show_div = True
                name = palette.get("name")
                html.append(
                    self.format_palettes(
                        palette.get('colors', []), name, '__global__', palette.get('caption'),
                        delete=delete,
                        color=color
                    )
                )

        if show_project_palettes:
            palettes = util.get_project_palettes(self.view.window())
            if len(palettes) and show_div:
                show_div = False
                html.append(DIVIDER)
            for palette in palettes:
                name = palette.get("name")
                html.append(
                    self.format_palettes(
                        palette.get('colors', []), name, '__project__', palette.get('caption'),
                        delete=delete,
                        color=color
                    )
                )

        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, '<div class="color-helper content">%s</div>' % md,
                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_palettes/swapped operands of `%`