def __init__(
        self,
        colors_editor,
        no_of_visible_colors,
    ):
        """Store editor and set image, rect and buttons.

        Parameters
        ==========

        colors_editor (custom class)
            instance of the colorman.editor.main.ColorsEditor
            class, a loop holder for editing multiple colors.
        no_of_visible_colors (integer)
            number of colors
        coordinates_name (string)
            name of a pygame.Rect attribute to which the
            coordinates_value must be assigned.
        coordinates_value (sequence with 2 integers)
            represents a position in 2d space which will
            be assigned to the coordinates named on the
            coordinates_name attribute.
        """
        ### store the colors editor reference
        self.colors_editor = colors_editor

        ### calculate the width of the panel

        width = (
            ## space for the color widgets
            (
                ## width of color widgets
                COLOR_WIDGET_SIZE[0]
                ## times the number of visible colors
                * no_of_visible_colors
            )
            ## plus space for the scroll buttons (number of
            ## pixels for 02 scroll buttons)
            + (2 * SCROLL_BUTTON_WIDTH)
        )

        ### the height is the same height as a color widget
        height = COLOR_WIDGET_SIZE[1]

        ### create a surface representing the background
        ### of the color, along with a copy of it, which
        ### you'll store so you can use to clean the
        ### original when needed

        self.image = render_rect(width, height, WINDOW_BG)

        self.clean_bg = self.image.copy()

        ### obtain a rect from the surface in self.image
        ### and position it relative to the editor

        self.rect = self.image.get_rect()

        self.rect.midtop = self.colors_editor.rect.move(0, 45).midtop

        ### finally create the scroll buttons
        self.create_scroll_buttons()
Store editor and set image, rect and buttons.

        Parameters
        ==========

        colors_editor (custom class)
            instance of the colorman.editor.main.ColorsEditor
            class, a loop holder for editing multiple colors.
        no_of_visible_colors (integer)
            number of colors
        coordinates_name (string)
            name of a pygame.Rect attribute to which the
            coordinates_value must be assigned.
        coordinates_value (sequence with 2 integers)
            represents a position in 2d space which will
            be assigned to the coordinates named on the
            coordinates_name attribute.
        
nodezator/colorsman/editor/panel/main.py