implementing palette