How to retrieve color properties of the current theme ?


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 ?


1 comment
Comment actions Permalink

Hi Olivier,

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()).



Please sign in to leave a comment.