Api for setting palette