def color_list_draw(self):
        """Drawing operation for the color list mode."""
        ### draw the background of the colors viewer in
        ### the screen
        blit_on_screen(self.image, self.rect)

        ### draw the labels and buttons on the screen

        self.labels.draw()
        self.buttons.draw()

        ### reference useful objects locally

        ## the surface and rect of the color list background

        bg_image = self.color_list_bg.image
        bg_rect = self.color_list_bg.rect

        ## an offset equivalent to the opposite of the
        ## topleft coordinate of the background rect
        offset = -Vector2(bg_rect.topleft)

        ### clean the color list background
        bg_image.blit(self.color_list_clean, (0, 0))

        ### draw each object from the list of color objects
        ### which collide with the background rect on the
        ### background surface
        ###
        ### the objects must be drawn as though the offset
        ### were applied to their rects (by using copies
        ### of their rects obtained from pygame.Rect.move
        ### with the offset as the sole argument)

        for obj in self.color_list_objs.get_colliding(bg_rect):

            bg_image.blit(obj.image, obj.rect.move(offset))

        ### draw a border around the color list background
        draw_border(bg_image, thickness=2)

        ### now that all the color objects were drawn on
        ### the color list background, draw the background
        ### itself on the screen
        self.color_list_bg.draw()

        ### and finally update the screen
        SERVICES_NS.update_screen()
Drawing operation for the color list mode.
nodezator/colorsman/viewer/modes/colorlist.py