You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Light mode missing selection background color #3179
Hey,
Sorry to jump in again. I noticed that the selection colors in the style file are currently using fully opaque values. From my experience, using a base color with some transparency for selection backgrounds tends to adapt better across different UI contexts without requiring manual adjustments.
For example, rgba(0,0,0,0.5) for light mode and rgba(255,255,255,0.5) for dark mode can work more naturally with varying backgrounds. If you’re aiming for branded feel, applying the same approach with an accent color can also work well e.g, using a darker shade of the accent with some transparency in light mode, and a lighter variant in dark mode.
For example, rgba(0,0,0,0.5) for light mode and rgba(255,255,255,0.5) for dark mode can work more naturally with varying backgrounds. If you’re aiming for branded feel, applying the same approach with an accent color can also work well e.g, using a darker shade of the accent with some transparency in light mode, and a lighter variant in dark mode.
We hadn't done this previously because it was awkward to apply opacity to the core brand colours. With the latest design system we can do it fairly easily with Tailwind and I've done so for the general selection. Thanks for the recommendation.
xterm.js uses a canvas renderer. I could potentially try to figure out a way to get the underlying oklch value from the var, but unlikely to be worth it. I settled on --surface-accent.
Activity
sudoaugustin commentedon Apr 14, 2026
Hey,
Sorry to jump in again. I noticed that the selection colors in the style file are currently using fully opaque values. From my experience, using a base color with some transparency for selection backgrounds tends to adapt better across different UI contexts without requiring manual adjustments.
For example,
rgba(0,0,0,0.5)for light mode andrgba(255,255,255,0.5)for dark mode can work more naturally with varying backgrounds. If you’re aiming for branded feel, applying the same approach with an accent color can also work well e.g, using a darker shade of the accent with some transparency in light mode, and a lighter variant in dark mode.benjaminleonard commentedon Apr 15, 2026
We hadn't done this previously because it was awkward to apply opacity to the core brand colours. With the latest design system we can do it fairly easily with Tailwind and I've done so for the general selection. Thanks for the recommendation.
xterm.jsuses a canvas renderer. I could potentially try to figure out a way to get the underlying oklch value from the var, but unlikely to be worth it. I settled on--surface-accent.Tweak text selection BGs (#3181)