Skip to content

Conversation

@umairzahid508
Copy link

Summary

In Light Mode, standardContent.inverted resolved to white, causing the selected segment title to render white-on-white when selectedSegmentTintColor is also white. This made the selected segment title invisible in Light Mode.

Fix

  • Added static var selectedContent : EKColor{ return EKColor(light: .black, dark: .black) } to EKColor.
  • Updated EKSegmentedControl to use EKColor.selectedContent.color(for:mode:) for .selected state instead of standardContent.inverted.

Rationale

Using a dedicated selectedContent color guarantees sufficient contrast for selected segment titles in both Light and Dark mode while preserving existing theme architecture.

Tests / Verification

  • Build succeeds locally.
  • Confirmed visually that selected segment titles are readable in Light and Dark modes.
  • Ran unit tests.

Notes for reviewer

  • Change is minimal and localized to EKColor and EKSegmentedControl.
  • No breaking API changes.
Simulator Screenshot - iPhone 16 Plus - 2025-11-18 at 13 52 25 Simulator Screenshot - iPhone 16 - 2025-11-19 at 20 55 11

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.

1 participant