I am using the following code to detect Windows high contrast mode. I want to switch the image of the JButton to support high contrast when they are using a different theme such as black on white or white on black.
Toolkit toolkit = Toolkit.getDefaultToolkit();
Boolean highContrast = (Boolean)toolkit.getDesktopProperty("win.highContrast.on");
So my question is, how can I detect the color information (at least the background color) of the theme when high contrast mode is on?