Allow command color customization #9973

Closed
opened 2026-01-31 02:08:49 +00:00 by claunia · 2 comments
Owner

Originally created by @mrbiggfoot on GitHub (Aug 3, 2020).

Right now, all commands are colored with "brightYellow" color from the color scheme. It may look like this, which is not ideal for a white background scheme:
image
I honestly tried searching for a solution, but found nothing except "brightYellow" redefinition. I think a cleaner way would be to allow setting the command color to any color from the scheme, e.g. "commandColor": "blue". Or even allow direct #rrggbb color setting.
Apologize if it is something that can be done already, in that case can someone please post the solution? Thanks!

Originally created by @mrbiggfoot on GitHub (Aug 3, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> Right now, all commands are colored with "brightYellow" color from the color scheme. It may look like this, which is not ideal for a white background scheme: ![image](https://user-images.githubusercontent.com/12175496/89135621-a179cc00-d4e3-11ea-8102-46237e92d955.png) I honestly tried searching for a solution, but found nothing except "brightYellow" redefinition. I think a cleaner way would be to allow setting the command color to any color from the scheme, e.g. "commandColor": "blue". Or even allow direct \#rrggbb color setting. Apologize if it is something that can be done already, in that case can someone please post the solution? Thanks! <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 02:08:49 +00:00
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Aug 3, 2020):

Set-PSReadLineOption -Colors @{ Command = something }

@KalleOlaviNiemitalo commented on GitHub (Aug 3, 2020): [Set-PSReadLineOption](https://docs.microsoft.com/powershell/module/PSReadline/Set-PSReadlineOption?view=powershell-5.1#parameters) -Colors @{ Command = _something_ }
Author
Owner

@mrbiggfoot commented on GitHub (Aug 3, 2020):

Thanks @KalleOlaviNiemitalo !

@mrbiggfoot commented on GitHub (Aug 3, 2020): Thanks @KalleOlaviNiemitalo !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9973