The Web Preference API aims to provide a way for sites to override the value for a given user preference (e.g. color-scheme preference) in a way that fully integrates with existing Web APIs.
I don't actually have answer off the top of my head to this one. My gut says the precedence should be OS < Browser < Site < Extension but needs discussion.
Need to decide on and call out how this interacts with extension APIs such as https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/browserSettings/overrideContentColorScheme (or any theoretical future one)