Palette Sample app

Rebased wip on 3.5.0-SNAPSHOT from master
And added sample.