Selection Color should invert selected text color #4980

Closed
opened 2026-01-31 00:02:09 +00:00 by claunia · 5 comments
Owner

Originally created by @javierdlg on GitHub (Nov 13, 2019).

Environment

Windows build number: 10.0.18363.0
Windows Terminal version (if applicable): All

Steps to reproduce

  1. Open the terminal.
  2. Select some text.

Expected behavior

Selected text should invert the text colors:

Actual behavior

Text maintains it's original color which leads to contrast issues.
image

Notes

Powershell and CMD both invert the text colors when selected, which would fix the contrast ratio accessibility issue present in the terminal:
image

Originally created by @javierdlg on GitHub (Nov 13, 2019). # Environment ```none Windows build number: 10.0.18363.0 Windows Terminal version (if applicable): All ``` # Steps to reproduce 1. Open the terminal. 1. Select some text. # Expected behavior Selected text should invert the text colors: # Actual behavior Text maintains it's original color which leads to contrast issues. ![image](https://user-images.githubusercontent.com/2334756/68795006-ed5aad00-0604-11ea-822f-51f3ae4d9c9c.png) # Notes Powershell and CMD both invert the text colors when selected, which would fix the contrast ratio accessibility issue present in the terminal: ![image](https://user-images.githubusercontent.com/2334756/68793524-3b21e600-0602-11ea-820f-c1885cb48aa6.png)
Author
Owner

@zadjii-msft commented on GitHub (Nov 13, 2019):

oh no

This is hard to very hard on the scale of tasks, unfortunately.

GDI has a very handy function for inverting the colors of a region of the window. unfortunately, DX has so such equivalent function. I believe @miniksa has said something in that past about rendering the frame, then specially inverting the selected area in another rendering pass? He can elaborate more.

@zadjii-msft commented on GitHub (Nov 13, 2019): _oh no_ This is hard to _very hard_ on the scale of tasks, unfortunately. GDI has a very handy function for inverting the colors of a region of the window. unfortunately, DX has so such equivalent function. I believe @miniksa has said something in that past about rendering the frame, then specially inverting the selected area in another rendering pass? He can elaborate more.
Author
Owner

@javierdlg commented on GitHub (Nov 13, 2019):

How about being able to choose the selected text foreground color? This could potentially solve the contrast ratio issue on selected text and not force us to vet all the colors against two background colors for every theme.

@javierdlg commented on GitHub (Nov 13, 2019): How about being able to choose the selected text foreground color? This could potentially solve the contrast ratio issue on selected text and not force us to vet all the colors against two background colors for every theme.
Author
Owner

@miniksa commented on GitHub (Nov 13, 2019):

Didn't #3471 committed today literally just do this?

@miniksa commented on GitHub (Nov 13, 2019): Didn't #3471 committed today literally just do this?
Author
Owner

@mdtauk commented on GitHub (Nov 13, 2019):

Didn't #3471 committed today literally just do this?

It only includes a Selection Background colour. I did make the suggestion there should also be a Selection Foreground colour.

@mdtauk commented on GitHub (Nov 13, 2019): > Didn't #3471 committed today literally just do this? It only includes a Selection Background colour. I did make the suggestion there should also be a Selection Foreground colour.
Author
Owner

@DHowett-MSFT commented on GitHub (Nov 14, 2019):

We're open to contributions to our DX renderer. Thanks!

@DHowett-MSFT commented on GitHub (Nov 14, 2019): We're open to contributions to our DX renderer. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4980