Adds unit tests and fixes for ColorPalette