Skip to content

Add Material You dynamic color#103

Merged
danielchalmers merged 2 commits into
mainfrom
claude/material-you
Jul 17, 2026
Merged

Add Material You dynamic color#103
danielchalmers merged 2 commits into
mainfrom
claude/material-you

Conversation

@danielchalmers

@danielchalmers danielchalmers commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Closes #7:

  • Generate the MudTheme at runtime from a Material 3 seed color using the MaterialColorUtilities C# port of Google's material-color-utilities, with the same SchemeTonalSpot palettes, tone mappings, and slot conventions the hardcoded Orchid palette was generated from offline.
  • On Android 12+ the seed comes from the device's Material You palette (tone 50 of the system accent), so the whole app recolors to match the wallpaper: surfaces, containers, outlines, harmonized Info/Success/Warning, the status bar, and the trend chart monochrome ramp.
  • New "Use device colors" switch under Personalization (shown only when the device supports it, default on) that falls back to the stock Orchid seed when off. The theme also refreshes on resume in case the wallpaper changed while backgrounded.
  • Mood colors are untouched and stay on the fixed Coral Reef ramps.
  • A regression test pins MaterialTheme.FromSeed at the default seed to the exact Orchid palette, so the runtime generator provably matches the old hardcoded values (verified bit-for-bit against the node material-color-utilities output).

The MudTheme is now generated at runtime from a seed color with the C# port of material-color-utilities, using the same SchemeTonalSpot palettes and slot conventions as the offline-generated Orchid palette. On Android 12+ the seed comes from the system accent, so the app follows the wallpaper, and a new Personalization switch falls back to the stock Orchid seed. The status bar and trend chart colors follow the generated palette, and a regression test pins the default seed to the exact Orchid values.
The switch now stays visible everywhere so the feature is discoverable, rendering disabled and off instead of vanishing on Android 11 and below and on Windows. The M3 switch overrides pin solid colors, so a dimming rule restores the disabled look, and the credits and device info reads no longer throw outside a real MAUI app, which also makes the settings page testable.
@danielchalmers
danielchalmers merged commit 4f1849a into main Jul 17, 2026
1 check passed
@danielchalmers
danielchalmers deleted the claude/material-you branch July 17, 2026 17:09
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.

Use the system color palette

1 participant