def scroll(self, amount):
        """Scroll color widgets according to given amount.

        Parameters
        ==========
        amount (integer)
            amount of pixels to scroll the color widgets
            left or right; the direction of the scrolling
            is given by the signal of the integer.
        """
        ### reference the widgets rect locally
        widgets_rect = self.widgets.rect

        ### rotate left
        ###
        ### that is, if amount is positive, move widgets
        ### to the right by adding to the left position
        ### of the widgets

        if amount > 0:

            ### reference the left of both the scroll area
            ### and the widget's rect locally

            current_left = widgets_rect.left
            area_left = self.scroll_area.left

            ### only rotate right if the current left
            ### position of the widget is at the left of
            ### the scroll area's left

            if current_left < area_left:

                ## even so, the value of left to be assigned
                ## mustn't surpass the left of the scroll
                ## area

                widgets_rect.left = min(current_left + amount, area_left)

        ### rotate right
        ###
        ### that is, if amount is negative, move widgets
        ### to the left by removing from the right position
        ### of the widgets

        elif amount < 0:

            ### reference the right of both the scroll area
            ### and the widget's rect locally

            current_right = widgets_rect.right
            area_right = self.scroll_area.right

            ### only rotate left if the current right
            ### position of the widget is at the right of
            ### the scroll area's right

            if current_right > area_right:

                ## even so, the value of right to be assigned
                ## mustn't never be below the value of the
                ## scroll area's right (that is, the right
                ## edge of the widgets must never be to the
                ## right of the scroll area's right edge)

                widgets_rect.right = max(current_right + amount, area_right)
Scroll color widgets according to given amount.

        Parameters
        ==========
        amount (integer)
            amount of pixels to scroll the color widgets
            left or right; the direction of the scrolling
            is given by the signal of the integer.
        
nodezator/colorsman/editor/panel/main.py