Learned how to do this recently. The Windows registry contains the value HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\AccentColor , which stores the color of the title bar of the system window. You can use JNA Advapi32Util to read values ββfrom the Windows registry.
Then you can use a graphics library like java.awt.Color to convert the color to RGB values.
There is an implementation of this here
source share