If you try to use some sites where no body background in css styles, you can see dark text on dark background, if you are using Dark IDE theme.
Using JavaFX few years ago i try to do something like this: https://github.com/vistarsvo/emBrowser4Intellij/blob/e0299769eecff4f6b6f12b7782caa61f8cc7e8ff/src/space/vistar/embrowser/JavaFxBrowserView.java#L89
For example Yii2 error page:

If you try to use some sites where no body background in css styles, you can see dark text on dark background, if you are using Dark IDE theme.
Using JavaFX few years ago i try to do something like this: https://github.com/vistarsvo/emBrowser4Intellij/blob/e0299769eecff4f6b6f12b7782caa61f8cc7e8ff/src/space/vistar/embrowser/JavaFxBrowserView.java#L89
For example Yii2 error page:
