For elementary OS 5.1.7 and below only. If you are using elementary OS 6.0, please enable dark mode in your system settings and don't use this repo.
This should fix dark mode for elementary's System Settings and Wingpanel. Open your terminal and type in the following and a setup should appear.
bash <(wget -qO- https://raw.githubusercontent.com/KorbsStudio/elementary-settings-dark-mode-fix/master/sh-files/run.sh)
Don't worry, the file that opens your system settings will be back up to
/usr/share/korbs-studio/ if something breaks.