My implementation involves a one-line change to default.hbs which can’t be done via code injection.
However, if you don’t want the option for Light mode or the option to for the mode to switch automatically, then it would be possible to read through my CSS, understand how to adapt it for that case, and then use code injection for a dark mode. It would be up to you to made that adaptation if you want to try it.
Site performance will be slightly better if code injection is avoided though. When CSS is implemented in screen.css, it can be loaded once and cached.
Whatever you add through Code Injection is loaded repeatedly on every page.