def color_scale(begin_hsl, end_hsl, nb):

    if nb < 0:
        raise ValueError(
            "Unsupported negative number of colors (nb=%r)." % nb)

    step = tuple([float(end_hsl[i] - begin_hsl[i]) / nb for i in range(0, 3)]) \
           if nb > 0 else (0, 0, 0)

    def mul(step, value):
        return tuple([v * value for v in step])

    def add_v(step, step2):
        return tuple([v + step2[i] for i, v in enumerate(step)])

    return [add_v(begin_hsl, mul(step, r)) for r in range(0, nb + 1)]


##
## Color Pickers
##
Returns a list of nb color HSL tuples between begin_hsl and end_hsl
dataset/ETHPy150Open vaab/colour/colour.py/color_scale