Yes, and no. The colour theming that has existed since at leats Windows v2 could be used to implement dark more quite easily if only your apps listened to the relevant settings (some did, many did at least partially due to the framework they were written in doing so, some didn't at all – partially is the worse option as it caused contrast problems between compliant and non-compliant parts).
> It's the actual system setting that instructs apps to use dark mode.
The old theming was through system settings too. There were GDI API calls to read the values so you could make your app mirror the user's choices. Not as convenient as a single “dark mode” switch but no different other than that affordance. Many toolkits did this for you.