Included the createPalette function