Applying our own themes to our apps can produce very stylish-looking interfaces, especially when we are dealing with text, icons, and images we created ourselves to suit the app. Many apps incorporate the user's own images and, in these cases, there is no way of knowing in advance how to select a pleasing design. The palette support library provides us with this functionality, allowing fine control over text, icon, and background coloring.
The following steps demonstrate how to extract the prominent colors from a bitmap drawable:
- Start a new Android Studio project and open the Project Structure dialog from the File menu or Ctrl + Alt + Shift + S.
- Open the Dependency tab from your app Module and add a Library dependency ...