def generate_gradient(self, color_list, size=101):
        """
        Create a gradient of size colors that passes through the colors
        give in the list (the resultant list may not be exactly size long).
        The gradient will be evenly distributed.
        colors should be in hex format eg '#FF00FF'
        """
        list_length = len(color_list)
        gradient_step = size / (list_length - 1)

        gradient_data = []
        for x in range(list_length):
            gradient_data.append((int(gradient_step * x), color_list[x]))

        data = []
        for (start, color1), (end, color2) in zip(gradient_data, gradient_data[1:]):
            color1 = self.hex_2_hsv(color1)
            color2 = self.hex_2_hsv(color2)

            steps = end - start
            for j in range(steps):
                data.append(self.hsv_2_hex(*self.make_mid_color(color1, color2, j / steps)))
        data.append(self.hsv_2_hex(*color2))
        return data

        Create a gradient of size colors that passes through the colors
        give in the list (the resultant list may not be exactly size long).
        The gradient will be evenly distributed.
        colors should be in hex format eg '#FF00FF'
        
py3status/util.py