Dark Reader is the best extention for this, pretty sure it's open sourced too!
Firefox
A place to discuss the news and latest developments on the open-source browser Firefox
Dark Background Light Text has worked better for me. Less breakage and slow-down.
It's been some time since I tried all of the available extensions though, so Dark Reader might have improved in these aspects since.
Haha they even choose the Firefox page... One that dark reader doesn't seem to correctly render in dark mode... I wonder why :/.
I have seen more breakage recently with Dark Reader mode, so I will give this a try :) thank you.
Edit: Ohh.. It hasn't been updated for 4 years.... Will pass :/
I used dark reader about a month ago again to see if it worked better
Still failed on too many websites (drop-down and other nested menus appear to be a big issue) and it massively slowed down a lot of sites
Imma try that alternative and see how much better that rolls
Dark reader for firefox
Try this search: https://addons.mozilla.org/en-US/firefox/search/?q=dark&%3Btype=extension
Usually addons will transform each page with a custom CSS to make it dark mode. If you are talking about the native dark mode of each website, then I don't think there is a simple answer to this. Because each website is solving this differently. So we rely on custom CSS to force parts of the website styling in a temporary manner, each time it is opened up.
Dark Mode for Firefox is decent.
It did break the Dropbox website for me though. Had to disable the extension to get the website to work.
There's also Midnight Lizard. It's more powerful, but more resource intensive so I wouldn't recommend on phones or older systems.