Fix Monaco Editor text selection visibility in High Contrast Mode#45426
Draft
Fix Monaco Editor text selection visibility in High Contrast Mode#45426
Conversation
- Add GetMonacoTheme() to ThemeManager for detecting high contrast mode - Update Monaco index.html to support hc-black and hc-light themes - Update Monaco Preview Handler to use high contrast themes - Update Peek to use high contrast themes - Update Registry Preview to detect and use high contrast themes Co-authored-by: yeelam-gordon <73506701+yeelam-gordon@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix text selection visibility in High Contrast Mode
Fix Monaco Editor text selection visibility in High Contrast Mode
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Monaco Editor text selection was invisible in High Contrast Mode across Peek, Registry Preview, and File Explorer Preview Pane. Monaco provides built-in HC themes (
hc-black,hc-light) but PowerToys only passed standard themes (vs,vs-dark). Fixed by detecting HC mode and using appropriate theme names.PR Checklist
Detailed Description of the Pull Request / Additional comments
Core Change: Added
ThemeManager.GetMonacoTheme()returning Monaco theme names based on HC state:Implementation across components:
GetMonacoTheme()instead ofGetWindowsBaseColor()UISettings.HighContrastwith luminance calculation to determine dark vs light HC themeTheme mapping:
vs/vs-darkhc-light/hc-blackValidation Steps Performed
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.