TheEvanElement
TheEvanElement

Reputation: 43

Android Studio - Find most dominant color in wallpaper

I am working on developing an Android Launcher UI. Currently the launcher is working and has a few themes with different colors that can be changed in a settings menu.

Is there a way in Java to automatically find the most dominant color in the wallpaper image that is currently applied to the mobile device?

I think this would be a cool concept.

Any info is appreciated!

Upvotes: 0

Views: 2021

Answers (2)

AhmadF
AhmadF

Reputation: 143

You could use Palette from Android support library If you want to get the dominant color, just use palette.getDominantColor() It will give you the integer value of the dominant color in ARGB.

Upvotes: 0

Kuffs
Kuffs

Reputation: 35661

Would the Palette class in the Support Library suit your needs?

http://developer.android.com/reference/android/support/v7/graphics/Palette.html

Upvotes: 2

Related Questions