Cool, i made a quick update to the script so it can also pull color from the wallpaper for now it only gets the dark muted color because I found this to work the best for my setup and tbh the community's kinda dead so didn't think many people would be using it anyways, but it's easy to modify to get other colors even if you don't know Javascript, cheers to the dev for the sample code
If you wanna edit the code for other colors and don't know JS
the following colors are supported.
Light Vibrant
Vibrant
Dark Vibrant
Light Muted
Muted
Dark Muted
link here for more info and examples httpss://developer.android.com/training/material/palette-colors
all you need to do is change the line that says palette.getDarkMutedColor() to something like palette.getGetLightMutedColor() or palette.getVibrantColor()
LL.bindClass("android.app.WallpaperManager");
var choice = parseInt(prompt("1. Extract color from wallpaper\n2. Use a custom hex color", ""));
switch(choice)
{
case 1:
wallpaperColor();
break;
case 2:
customColor();
break;
}
function wallpaperColor()
{
try {
// extract the wallpaper bitmap
var wp = WallpaperManager.getInstance(LL.getContext()).getDrawable();
var bitmap = wp.getBitmap();
Palette.generateAsync(bitmap, {
onGenerated: function(palette) {
LL.setVariableString("mycolor", "c:" + palette.getDarkMutedColor([0]));
}
}).execute(null);
} catch(e) {
e.printStackTrace();
// no bitmap or OOM
}
}
function customColor()
{
LL.setVariableString("mycolor", "c:" + LL.pickColor("Set Box Background Color", 0xffff5722, true));
}