Skip to content

Platform specific colors via PlatformColor #126

Closed
@turnrye

Description

Edit: A more general proposal has been posted by @tom-un to support generic platform defined colors. Jump to that proposal. That proposal now supersedes the one in this top post.

Original Proposal

### Introduction

Android Q introduced a Dark theme across the system and applications. From their presentation, "Users will expect apps to have a dark theme". The way we do styling on RN today isn't directly compatible with their solution, but it's close.

The Core of It

I opened facebook/react-native#24790 with a proposed solution, but it admittedly had some issues:

  • It was on Platform, but it's more prone to change than the rest of those values
  • It closely followed Android's implementation, but doesn't anticipate what iOS or out-of-tree platforms might use
  • Android normally recreates the activities when this value changes, but that isn't a safe way to lead to re-rendering (which would be common if the user has enabled it by time-of-day or as part of battery saver)

Discussion Points

Metadata

Assignees

No one assigned

    Labels

    🗣 DiscussionThis label identifies an ongoing discussion on a subject

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions