Add palette implementation
Merge branch 'master' into gh-pages