material-components / material-components/material-components-android
[Color] Expose more powerful dynamic color extraction
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I want to implement dynamic coloring in part of my app, but MDC currently provides color extraction functionality that is extremely limited:
1. It uses theming overrides that only work on Android 12+
2. None of the colors are exposed, which makes it impossible to use outside of a self-contained fragment or activity unless you do some extremely messy Context workarounds
3. You seemingly cannot switch/animate between different palettes at runtime, making it useless for i.e music apps whose cover art regularly changes while it's being used.
**Describe the solution you'd like**
Update dynamic color extraction to be:
1. Backwards-compatible with pre-Android 12 versions, assuming that an existing Material3-compliant theme is already provided to harmonize with
2. Able to return a general Theming object that allows the colors to be easily applied *or* accessed.
**Describe alternatives you've considered**
Using unmaintained third-party libraries like MonetCompat that are largely proofs-of-concept that likely don't align with the current palette extraction/color harmonization that the M3 spec recommends.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name files, tests, or entry points. Start by locating the current dynamic color extraction implementation and reviewing its Android 12 behavior and Material 3 palette requirements; done means exposing reusable theme colors, supporting pre-Android 12 versions, and allowing palette changes at runtime.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- design, mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100