Introduce the PaletteData class to split the data handling logic from
the view