microsoft / microsoft/react-native-windows

PlatformColor Doesn't Respect Appearance.setColorScheme

Open
#13,279 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Fabric Area: Paper Area: PlatformColor bug Old Architecture Parity: React Native Partner: Microsoft Workstream: Component Parity
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Problem Description

Our app relies on the system visual theme instead of the app visual theme but by default PlatformColor uses the app visual theme. I tried setting the color scheme to dark while the app visual scheme was light by using Appearance.setColorScheme as a workaround but this had no effect on PlatformColor which continued using the light theme when used with a brush.

Steps To Reproduce
  1. Call Appearance.setColorScheme("dark") while the app theme is set to "light" (Settings -> Personalization -> Colors).
  2. Pass a brush to PlatformColor that has both light and dark theme colors.
  3. Observe that PlatformColor continues using the brushes for "light" theme instead of "dark".
Expected Results

No response

CLI version

npx react-native -v

Environment
npx react-native info
Target Platform Version

None

Target Device(s)

No response

Visual Studio Version

None

Build Configuration

None

Snack, code example, screenshot, or link to a repository

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is identified. Start by reproducing the Windows behavior with Appearance.setColorScheme("dark") and a PlatformColor brush containing light and dark colors, then trace the PlatformColor and appearance handling. Done means the brush follows the app color scheme rather than the system theme.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, react-native
Domain
desktop, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.