@staticmethod
def calc_stops(size, start=0.0, end=1.0):
    """Calculates equidistant stops for given number of colors."""
    if size == 0:
        return ()
    stops = []
    step = (end - start) / (size - 1)
    value = start
    while value < end:
        stops.append(value)
        value += step
    stops.append(end)
    return stops
