def format_palettes(self, color_list, label, palette_type, caption=None, color=None, delete=False):
        """Format color palette previews."""

        colors = ['\n## %s\n' % label]
        if caption:
            colors.append('%s\n' % caption)
        if delete:
            label = '__delete__palette__:%s:%s' % (palette_type, label)
        elif color:
            label = '__add_palette_color__:%s:%s:%s' % (color, palette_type, label)
        else:
            label = '__colors__:%s:%s' % (palette_type, label)
        colors.append(
            '[%s](%s)' % (
                mdpopups.color_box(
                    color_list, '#cccccc', '#333333',
                    height=self.color_h, width=self.color_w * 8, border_size=2
                ),
                label
            )
        )
        return ''.join(colors)
dataset/ETHPy150Open facelessuser/ColorHelper/color_helper.py/ColorHelperCommand.format_palettes/original