Skip to content

Differentiate terminal tab states with an adaptive brightness ladder#327

Closed
onevcat wants to merge 1 commit into
mainfrom
feat/tab-color-differentiation
Closed

Differentiate terminal tab states with an adaptive brightness ladder#327
onevcat wants to merge 1 commit into
mainfrom
feat/tab-color-differentiation

Conversation

@onevcat
Copy link
Copy Markdown
Owner

@onevcat onevcat commented May 22, 2026

Problem

The selected terminal tab was hard to distinguish from inactive tabs and the bar background — particularly in dark mode, where controlBackgroundColor (used for the selected tab) is actually darker than windowBackgroundColor (the bar), so the selection sank into the bar. This got worse when the surface background was opaque, because the selection no longer had any wallpaper/terminal contrast to ride on.

Change

Convey selection with a brightness ladder layered over the bar, made appearance-aware via a dynamic NSColor (so call sites stay unchanged):

Layer Dark Mode Light Mode
Selected tab labelColor @ 0.14 controlBackgroundColor (white tab on gray bar)
Hovered labelColor @ 0.08 controlBackgroundColor @ 0.5
Inactive tab labelColor @ 0.035 .clear
Bar background windowBackgroundColor windowBackgroundColor
  • Dark mode: a labelColor-based ladder keeps bar < inactive < hovered < active distinct regardless of background opacity. (labelColor is opaque in dark, so withAlphaComponent(0.14) matches the previous Color.primary.opacity(0.14) exactly.)
  • Light mode: keeps the original native look, since the same tint would darken the tab and read unnaturally.

Only TerminalTabBarColors changed; tab bar structure, layout, and all interactions are untouched.

Testing

  • make build-app
  • make check
  • Verified by hand in both Dark and Light Mode.

Closes #311

The selected tab was hard to tell apart from inactive tabs and the bar
background, especially in dark mode: controlBackgroundColor is actually
darker than windowBackgroundColor there, so the selection sank into the bar.

In dark mode, layer a labelColor-based brightness ladder over the bar
(bar < inactive < hovered < active) so all three read distinctly regardless
of surface background opacity. In light mode, keep the original native look
(a white tab floating on the gray bar), since the same tint would darken the
tab unnaturally. Colors resolve via a dynamic NSColor, so call sites are
unchanged.
@abhi21git
Copy link
Copy Markdown

@onevcat I already fixed this in #331

onevcat added a commit that referenced this pull request May 23, 2026
PR #331 reshaped the terminal tab bar (glass capsule tabs, removed bar
background and dividers, changed corner & spacing metrics), which was not the
preferred look. Restore the tab bar structure, layout, and metrics to their
pre-#331 state, and convey tab selection via the appearance-aware brightness
ladder from #327 (TerminalTabBarColors): a labelColor-based
bar < inactive < hovered < active ladder in dark mode, with the original
native look preserved in light mode.
@onevcat
Copy link
Copy Markdown
Owner Author

onevcat commented May 24, 2026

Covered by #332

@onevcat onevcat closed this May 24, 2026
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.

Improve tab visual differentiation

2 participants