Merge "Internal copy of Palette API." into oc-dev