As my desktop background changes, I've seen the Unity Launcher's hue automatically updates to adapt with the background color. # This is used in other UI elements as well, for instance - the background of dash and notifications
I now want to programatically access this hue because using this color in a script, I plan to theme a few other things based on whatever the current hue is.
In worst case I could just use the current destkop background image and calculate something similar to what Unity is doing to get a hue from it, but I wouldn't know how it extracts that from an image.
Even if I do, it may be slightly off from how the launcher's looking and it won't look good. Besides, unity's already doing some calculations under the hood to get this hue, so we might as well re-use that.
Is there a command using which I could get this directly from Unity? How does unity do this?
#: A few screenshots to show how it adapts to the background: