Implement color picker as an API

Cherrypicked from jellybean CMPA branch