def create_scroll_buttons(self):
        """Create buttons to scroll the color widgets."""
        ### define width and height of scroll buttons

        button_width = self.rect.height
        button_height = SCROLL_BUTTON_WIDTH

        ### iterate over the buttons creation data
        ### instantiating and setting up the buttons

        self.buttons = List2D(
            Object2D.from_surface(
                render_layered_icon(
                    chars=[chr(82)],
                    dimension_name="height",
                    dimension_value=button_height - 8,
                    colors=[BLACK],
                    background_width=button_width,
                    background_height=button_height,
                    background_color=WINDOW_BG,
                    rotation_degrees=90,
                    flip_x=flip_x,
                    depth_finish_thickness=1,
                ),
                command=command,
            )
            for flip_x, command in (
                (False, self.scroll_left),
                (True, self.scroll_right),
            )
        )

        ## store buttons on their own attribute

        attr_names = (
            "left_scroll_button",
            "right_scroll_button",
        )

        for attr_name, button in zip(attr_names, self.buttons):
            setattr(self, attr_name, button)
Create buttons to scroll the color widgets.
nodezator/colorsman/editor/panel/main.py