Repository navigation
ADFA-5248 fix(books): legible selected chip and state band on covers - #470
Merged
Merged
Conversation
The Books "Get more" screen had two low-contrast spots: - The selected filter chip used hardcoded white on the teal fill. The fill flips to light aqua in dark mode, so white washed out. Use k2go_on_teal (the existing on-accent token), which flips with the same DayNight mechanism as the fill: light text on the dark-teal light-mode fill, dark text on the light-aqua dark-mode fill. - The "In your books" / "Selected" band used a colored fill that matched the same-hue covers (green band on a green cover) and vanished. Make the band a light cream pill and move the semantic hue to the text, so it reads on any of the six covers. Band tokens have no -night twin: the band sits on a fixed cover color, so it is mode-independent.
Two low-contrast spots on the Books "Get more" screen.
Selected filter chip: chip() called setTextColor BEFORE setTextAppearance,
so the Material3 appearance's own colorOnSurface silently overwrote the chip
color. onSurface flips with the theme, so the selected chip rendered
dark-on-dark-teal in light mode and light-on-aqua in dark mode — exactly the
"dark gray on dark green / light gray on light aqua" the ticket reported;
neither the old white nor k2go_on_teal ever took effect. Apply the appearance
first, then the color, so k2go_on_teal sticks and flips against the teal fill.
State band ("In your books" / "Selected"): the colored fill matched the
same-hue covers (green band on a green cover) and vanished. Make the band a
light cream pill and move the semantic hue to the text, so it reads on any of
the six covers.
Band tokens have no -night twin: the band sits on a fixed cover color, so it
is mode-independent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the two low-contrast spots on the Books "Get more" screen.
What changed
with the teal fill and reads in both light and dark.
with the semantic hue in the text, so it separates from same-hue covers
instead of blending in.
Why
The chip's white read fine only in light mode; in dark mode the teal fill
becomes light aqua and white washed out. The band's green fill matched the
green covers and disappeared.
Files
text color)
Scope
Books only. Maps and Zim use their own chip treatments and read correctly in
both modes, so they are untouched. Band tokens are mode-independent (fixed
cover background), so no values-night twin.
Verification
Checked on device in light and dark mode.