How to detect the current theme of the IntelliJ via open api (com.intellij.openapi)?
You can use the UIUtil.isUnderDarcula() method.
UIUtil.isUnderDarcula()