SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 94 C++

Add 'auto' to ColorSchemeOverride, deprecate 'unspecified'

Summary:
NOTE: 👋🏻 **This is an RFC**, additional and separate to the previous 2 diffs. Looking for feedback :)

Proposes an API tweak to `Appearance.setColorScheme()` to make it more idiomatic/understandable.

- Aligns with the CSS `color-scheme` property vocabulary, where `auto` means "defer to the system preference".
- Replaces the ambiguous `unspecified` (now deprecated), which gave no indication of the resulting behaviour.

See also:
- History of this API + return type narrowing in D102527387.
- Extended docs + diagram in https://github.com/facebook/react-native-website/pull/5060.

**Alternative names considered**

- `'reset'` - Implies reversing a change, not deferring to system
- `'inherit'` -  Weak — CSS inherit is element→parent, not app→OS

Changelog:
[General][Deprecated] - `Appearance.setColorScheme('unspecified')` is deprecated, use `'auto'` instead.

Reviewed By: cipolleschi

Differential Revision: D103841988

fbshipit-source-id: 474d0925ce9ee0ab79f87d0ff9ae86ae56ceb0aa
A
Alex Hunt committed
91702e50fe077ae73ab152da18719d6df98cb71f
Parent: ef6463c
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com> on 5/7/2026, 8:54:35 AM