def create_color_list(self):
        """(Re)create widgets representing the colors."""
        ### store a reference to the list from the 'colors'
        ### attribute in the 'color_list_colors' attribute
        ### and also reference said list locally
        colors = self.color_list_colors = self.colors

        ### create a new custom list for color widgets,
        ### storing it in its own attribute but also
        ### referencing it locally
        color_list_objs = self.color_list_objs = List2D()

        ### define a topleft next to the topleft of self.rect,
        ### but way to the right and a bit lower
        topleft = self.rect.move(200, 70).topleft

        ### create widgets representing each color, always
        ### storing them in the custom list we created

        for color in colors:

            ## create and store widget which is a surface
            ## filled with the color being represented

            color_widget = Color2D(*COLOR_SIZE, color)
            color_widget.rect.topleft = topleft

            color_list_objs.append(color_widget)

            ## create and store text objects displaying
            ## different representations of the color

            # start from the a topleft defined close to
            # the topright of the color widget
            topleft = color_widget.rect.move(5, 8).topright

            # iterate over color representations

            for text in (
                # integers in range(256) representing values
                # of the RGB(A) channels
                repr(color),
                # a hex string (string starting with '#'
                # followed by substrings representing the
                # values of RGB(A) channels in range(256),
                # but representing in hexadecimal numbers;
                # for instance: #ffffff for white color)
                full_rgb_to_hex_string(color),
                # the name of the color used by HTML or
                # 'unamed' if it doesn't have a name
                full_rgb_to_html_name(color),
            ):

                # create and append the text object

                text_obj = Object2D.from_surface(
                    surface=render_text(
                        text=text,
                        font_height=ENC_SANS_BOLD_FONT_HEIGHT,
                        foreground_color=(COLOR_VIEWER_COLOR_LIST_FG),
                        background_color=(COLOR_VIEWER_COLOR_LIST_BG),
                    ),
                    coordinates_name="topleft",
                    coordinates_value=topleft,
                )

                color_list_objs.append(text_obj)

                # the next text object should have its
                # topleft a bit bellow the current object's
                # bottomleft
                topleft = text_obj.rect.move(0, 5).bottomleft

            ## update the topleft so the next color widget
            ## have its topleft aligned with the bottomleft
            ## of the current color widget
            topleft = color_widget.rect.bottomleft

        ### create panel over which to draw the objects
        ### in the list

        ## define an area wherein to display the list
        ## of widgets; this area is obtained by deflating
        ## self.rect
        display_area = self.rect.inflate(-500, -40)

        ## also reference the 'rect' attribute of the list
        ## of widgets locally; this is a special rect-like
        ## object which we can use to control all the rects
        ## in the list
        color_list_rect = self.color_list_objs.rect

        ## align the widgets midtop with the midtop of the
        ## display area, slightly moving them down
        color_list_rect.midtop = display_area.move(0, 10).midtop

        ## redefine the height of the display area if the
        ## bottom of the widgets, if they were lowered 10
        ## pixels (for padding), would still stand above
        ## the display area's bottom

        # obtain the highest bottom between the display area
        # and widgets, considering the widgets as if they
        # were 10 pixels below the current position

        highest_bottom = min(display_area.bottom, color_list_rect.bottom + 10)

        # update the display area's height to the difference
        # between the highest bottom previously calculated
        # and its top
        display_area.height = highest_bottom - display_area.top

        ## finally create an object representing the display
        ## area defined previously and copy its surface
        ## from its 'image' attribute so we can use it to
        ## clean the surface when scroling the objects

        self.color_list_bg = Object2D.from_surface(
            surface=render_rect(
                *display_area.size,
                COLOR_VIEWER_COLOR_LIST_BG,
            ),
            coordinates_name="topleft",
            coordinates_value=display_area.topleft,
        )

        self.color_list_clean = self.color_list_bg.image.copy()
(Re)create widgets representing the colors.
nodezator/colorsman/viewer/modes/colorlist.py