basic palette functionality implemented