How to retrieve color properties of the current theme ?

Hello,

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 ?

Thanks.
Olivier

1 comment

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

Denis

0

Please sign in to leave a comment.