usePreferredColorScheme function
Returns the browser's preferred color scheme.
This returns PreferredColorScheme.unknown during SSR and the first hydration build, then synchronizes after the first client frame.
Implementation
PreferredColorScheme usePreferredColorScheme() {
return use(const _PreferredColorSchemeHook());
}