Rename getPalette before replacing
Create getPalette module to read from JSON