def __init__(self):
        """Create and set up support objects."""
        ### build surface and rect representing this
        ### colors editor; the surface will be used as
        ### its background

        ## create and surface in the 'image' attribute,
        ## also referencing it locally for further changes
        image = self.image = render_rect(820, 660, WINDOW_BG)

        ## draw a border on the image
        draw_border(image, thickness=2)

        ## create a surface representing a special area
        ## wherein to locate controls used to edit the
        ## current selected color (the controls will be
        ## created further ahead); then draw it over the
        ## 'image' surface

        # create surface
        controls_area_surf = render_rect(785, 400, WINDOW_BG)

        # add a finish around it to convey depth
        draw_depth_finish(controls_area_surf, outset=False, thickness=5)

        # blit the area over the 'image' surface
        image.blit(controls_area_surf, (20, 215))

        ## create a rect from the 'image' surface
        self.rect = image.get_rect()

        ### instantiate the colors panel, a special panel
        ### widget used to display the colors we are
        ### editing; it also highlights which color is
        ### currently selected for edition

        self.colors_panel = ColorsPanel(
            self,
            no_of_visible_colors=7,
        )

        ### create widget structure to support the
        ### colors editor's operations

        self.setup_scales()
        self.setup_buttons()
        self.setup_entries()
        self.setup_labels()

        ### store topleft coordinates of specific object
        ### groups to use whenever repositioning the
        ### editor when the window is resized

        self.scales_offset = Vector2(self.scales.rect.topleft)

        self.buttons_offset = Vector2(self.buttons.rect.topleft)

        self.labels_offset = Vector2(self.labels.rect.topleft)

        ### center editor on screen and append centering
        ### method used as a window resize setup

        self.center_colors_editor()

        APP_REFS.window_resize_setups.append(self.center_colors_editor)
Create and set up support objects.
nodezator/colorsman/editor/main.py