In Trilium, select dark theme, create a CSS
note with the code and add the atttribute @appCss
(yes, that's hacky / not a full theme, but it works).
Code (v2.1 for v0.40):
/*
https://github.com/zadam/trilium/wiki/Themes
https://developer.mozilla.org/en-US/docs/Web/CSS/var
https://css-tricks.com/hsl-hsla-is-great-for-programmatic-color-control/