Palette click handler