We have a number of bugs reported against dark mode on macOS, which cannot be fixed in the OpenJDK but requires a fix in the JavaRuntimeSupport framework (JRS) supported by macOS.
FB6798883: The JavaRuntimeSupport.framework does not work properly in the dark mode
was reported to Apple on Aug 6 2019
See JDK-8231386 and JDK-8228555 for examples of bugs caused by the macOS bug.
Until these bugs are fixed dark mode should be considered as unsupported.