This is mentioned on https://www.mediawiki.org/wiki/Talk:Reading/Web/Accessibility_for_reading/Archive1#Pure-black_dark_mode but I searched Phabricator so wished open a file before too late so I'll quote
[..] Too many dark modes on websites use pure black as the background colour. This also causes eyestrain and personally causes headaches, especially with pure white text on top. One solution could be to have two different dark modes, one with pure black and one with a shade of dark gray - that then accomodates those who prefer the pure black.
What I like to suggest also using browser provided Canvas and CanvasText colors in dark mode which has great defaults specially for dark mode https://web.dev/articles/light-dark (if not touching background-color isn't an option) which probably for users in need of pure black (OLED screens) will handle the situation automatically probably if it doesn't right now.