'Return a dictionary with parameters for rebuilding the gradient. Keys will include:
- \'mode\': hsv or rgb
- \'ticks\': a list of tuples (pos, (r,g,b,a))'

def saveState(self):

    ticks = []
    for t in self.ticks:
        c = t.color
        ticks.append((self.ticks[t], (c.red(), c.green(), c.blue(), c.alpha())))
    state = {'mode': self.colorMode, 'ticks': ticks}
    return state
