Skip to content
Go to file
Cannot retrieve contributors at this time
40 lines (30 sloc) 1.11 KB


The library uses system methods to get MediaStyle notification colors from Android Oreo.

Alt Text


Add JitPack in your root build.gradle at the end of repositories:

    allprojects {
        repositories {
            maven { url "" }

Add it as a dependency in your app's build.gradle file:

    dependencies {
        compile 'com.github.mkaflowski:Media-Style-Palette:1.x' //CHANGE X TO CURRENT VERSION!!!

How to use

MediaNotificationProcessor processor = new MediaNotificationProcessor(this, bitmap); // can use drawable
int backgroundColor = processor.getBackgroundColor();
int primaryTextColor = processor.getPrimaryTextColor();
int secondaryTextColor = processor.getSecondaryTextColor();
boolean isLight = processor.isLight();

// for async processing:
final MediaNotificationProcessor processor = new MediaNotificationProcessor(this);
processor.getPaletteAsync(onPaletteLoadedListener, bitmap);