Skip to content

feat: add DynamicTheme using PlatformColor - #4901

Merged
adrcotfas merged 7 commits into
v6from
@adrcotfas/feat/dynamic_theme
Apr 29, 2026
Merged

adrcotfas merged 7 commits into
v6from
@adrcotfas/feat/dynamic_theme

Conversation

@adrcotfas

@adrcotfas adrcotfas commented Apr 15, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Order of merging:

Related issue

#4893

Test plan

Run the Example app, enable Dynamic Colors from the drawer and switch the system theme: observe the app adapting to the device theme.

@github-actions

Copy link
Copy Markdown

The mobile version of example app from this branch is ready! You can see it here.

@adrcotfas
adrcotfas force-pushed the @adrcotfas/fix/color_tokens branch from dacdfae to e888305 Compare April 29, 2026 11:00
Base automatically changed from @adrcotfas/fix/color_tokens to v6 April 29, 2026 11:20
xdimota7x and others added 7 commits April 29, 2026 15:39
* Known limitation: surface/container roles on API 31-33 use
* @color/m3_ref_palette_dynamic_neutral_variant* (MCL resources that require a
* native DynamicColors setup). No @android:color/ equivalent exists for those
* slots. Reference palette values are used as fallback on API 31-33.
for PlatformColor compatibility

* surfaceDisabled, onSurfaceDisabled and backdrop which were not part of the MD standard were removed
* the reference theme elevation colors now use the correct neutral tones; see https://m3.material.io/blog/tone-based-surface-color-m3
* replace usage of "alpha" with opacity or surface colors
* remove disabled FAB prop
@adrcotfas
adrcotfas force-pushed the @adrcotfas/feat/dynamic_theme branch from 7e6e009 to 648aac9 Compare April 29, 2026 12:46
@callstack-bot

Copy link
Copy Markdown

Hey @adrcotfas, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

@adrcotfas
adrcotfas merged commit 8d9b6e1 into v6 Apr 29, 2026
3 checks passed
@adrcotfas
adrcotfas deleted the @adrcotfas/feat/dynamic_theme branch April 29, 2026 12:51
adrcotfas added a commit that referenced this pull request Apr 29, 2026
* chore: remove md2 support

* fix: update colors as per material-components color tokens

* see https://github.com/material-components/material-components-android/blob/master/lib/java/com/google/android/material/color/res/values/tokens.xml

* fix: update the color schema for LightTheme and DarkTheme

* see: https://m3.material.io/styles/color/roles

* feat: add DynamicTheme

* Known limitation: surface/container roles on API 31-33 use
* @color/m3_ref_palette_dynamic_neutral_variant* (MCL resources that require a
* native DynamicColors setup). No @android:color/ equivalent exists for those
* slots. Reference palette values are used as fallback on API 31-33.

* refactor: remove usage of expo-material3-theme

* refactor: rename "device colors" to "Dynamic Theme"

* feat: update Colors and stateOpacity tokens
for PlatformColor compatibility

* surfaceDisabled, onSurfaceDisabled and backdrop which were not part of the MD standard were removed
* the reference theme elevation colors now use the correct neutral tones; see https://m3.material.io/blog/tone-based-surface-color-m3
* replace usage of "alpha" with opacity or surface colors
* remove disabled FAB prop
This was referenced Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants