Open up about:config and go to layout.css.prefers-color-scheme.content-override and set it to one of the following:
0 => Force a Dark background
1 => Force a Light background
2 => Follow the System theme (default in Firefox 94)
3 => Follow the Browser toolbar theme (default in Firefox 95+)
You don’t need
about:config
for this.This is the same setting you can configure in the preferences under “Website appearance”… if you change that you’ll see the
about:config
setting changes too.