Select a suitable background color for Material 3 preference cards
Spinning off from discussion in #21910:
In the new Material 3 Compose preference screens (such as Timebox settings in #21910), cards use container colors like primaryContainer and surfaceVariant.
While #22607 added further Material color definitions to the theme, the card background colors in these settings screens still need to be refined across light, dark, and plain themes to avoid undesirable tints and ensure proper visual contrast.
Opening this issue for maintainers to discuss and select the appropriate background color tokens for Material 3 settings cards and subscreens.
Thank you for bringing this up @Ratnesh5!
Here are some thoughts based on Material 3 guidelines and what we already have in our themes:
- Do not use primaryContainer for preference cards.
Material 3 says primaryContainer is best used for items such as floating action buttons or important callouts that need attention. When we use primaryContainer for preference cards the preference cards stand out a lot. That makes preference cards distracting. It is better to keep preference cards subtle.
- Prefer surfaceContainer or surfaceContainerLow.
When preference cards are placed on the screen surface using surfaceContainer or surfaceContainerLow a sense of depth and layering is created. This helps preference cards feel like they are sitting on the screen surface. Keep the text inside preference cards using onSurface or onSurfaceVariant. This ensures the text is easy to read and meets WCAG AAA contrast standards.
- Consider themes
AMOLED – Keep the background surface black (#000000). For preference cards use shades such, as #1C1C1E or #252525. This keeps everything while still maintaining the look that AMOLED screens are known for.
Plain / E-ink – Use grays and whites. Keep saturation at zero. This makes text stand out clearly on eink screens. All content must stay readable in this mode.
I am happy to help with the setup and testing once we settle on the tokens.
@Ratnesh5 could you post a screenshot of the affected screen?
These look fine now IMO. Propose closing. What do you think?
Fixed in:
- https://github.com/ankidroid/Anki-Android/issues/22750
- https://github.com/ankidroid/Anki-Android/pull/22760
Agreed, tweaks in #22760 resolved the card background and contrast across all themes cleanly. Closing this as completed