I’m looking for the algorithm details on Android versions 8.0 to 11, not on Android 13+ (12 doesn’t have this feature). I tried searching the Android source code on cs.android.com but couldn’t find the source code that performs this operation :-(
This is the entirety of the source code you can search through.
https://cs.android.com/android/platform/superproject
8.0:
https://cs.android.com/android/platform/superproject/+/android-8.0.0_r1:
https://developer.android.com/media/implement/surfaces/mobile#using-legacy
Maybe this is a starting point.
Thank you
I’m not an Android developer but is this maybe what you’re looking for?
I have no idea and I’m nothing but an interested layperson but there are other applications that do a similar thing, no? Ambilight is the first thing that comes to mind. Or launchers that adjust accent colour according to your wallpaper. I’d assume it’s the same principle. So maybe you can find out how they do it?
I found the commit that introduced this feature. I had to use the GitHub mirror for this because the official repo on android.googlesource.com doesn’t have the feature to browse commit history for individual files anymore.


