fix(ui): keep hero titles and clear logos legible in light theme
On the light theme, the detail hero's fallback title was hard-coded white over a scrim that washes artwork toward the near-white background, and white-on-transparent clear logos vanished into the same wash on the detail, home, and TV spotlight heroes. The title fallback now defaults to the theme foreground with a background-side halo, matching what the TV hero already did. Clear logos run through the channel-logo tone remap: light-toned marks recolor toward the theme foreground on light backdrops (network and downloaded artwork alike), colored marks keep their pixels, and dark themes render the original artwork. The backdrop-luminance gate is shared with the Live TV guide as logoToneTargetFor.
This commit is contained in:
@@ -111,4 +111,19 @@ void main() {
|
||||
plain.dispose();
|
||||
expect(PaintingBinding.instance.imageCache.currentSize, 2);
|
||||
});
|
||||
|
||||
test('logoToneTargetFor engages only over light backdrops', () {
|
||||
const foreground = Color(0xFF111111);
|
||||
// Light theme surfaces and backgrounds.
|
||||
expect(logoToneTargetFor(surface: const Color(0xFFFFFFFF), foreground: foreground), foreground);
|
||||
expect(logoToneTargetFor(surface: const Color(0xFFF7F7F8), foreground: foreground), foreground);
|
||||
// Dark theme surfaces and the light theme's inverted (dark) focus card.
|
||||
expect(logoToneTargetFor(surface: const Color(0xFF15171C), foreground: foreground), isNull);
|
||||
expect(logoToneTargetFor(surface: const Color(0xFF111111), foreground: foreground), isNull);
|
||||
// The dark theme's inverted focus card is light and re-engages the remap.
|
||||
expect(
|
||||
logoToneTargetFor(surface: const Color(0xFFEDEDED), foreground: const Color(0xFF0E0F12)),
|
||||
const Color(0xFF0E0F12),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user