How to retrieve color properties of the current theme ? Follow
I have developped a graphical plugin. I use a custom JTable that has a white grid background. I woulk like to adapt the background color to the selected IntelliJ theme.
How do I get the current theme and its color properties ?
Please sign in to leave a comment.
You can obtain editor color scheme used at the moment via EditorColorsManager.getInstance().getGlobalScheme(). It has 'defaultForeground' and 'defaultBackground' properties.
As to LAF colors, there is an utility class which provides them - UIUtil.getXxxColor(), getXxxBackground() etc methods (e.g. UIUtil.getTableBackground()).
Thanks Denis, you helped me a lot after almost 10 years ;)