Font color in Powershell

I´ve created a profile in Powershell and trying to change color of the default error fonts.
from Red to Green

  1. This work, but the green text is to dark:
    $host.privatedata.errorforegroundcolor="Green"
  2. I´ve tried to light upp the Green text with hexadecimal or RGB, but this does not work.
    This does not work with lighter greeen font color:
    $host.privatedata.errorforegroundcolor="#33FF3C"
    Checked what color schema is:
  3. Get-PSReadlineOption | Select *color
    There are strange numbers repsenting different colors - please see screenshot:
    powershell_color_number

I wonder if someone has the knowledge of how to change the color of the error message
to something brighter version of “Green”

Really appreciate you ranswer

I use green for my error messages as well and I actually like that default green.

There is a nice snippet on StackOverflow to show possible color compbinations:

2 Likes

Thanks, but I´ve already know that you can set color like "Green# i my case, but my question was about if there are any modifications you can do to that Green default value?
powershell_fontColor_Default

I know I´ve that you can under Tool in Powershell ISE you can do some modifications, but it´s hard to know or see what and where to change

Now I managed to change the Green color (earlier I also used Green as error color)
to some brighter Green and change the Comments color to much more readible Green.
Powershell ISE under Tool, and you have to look and test the to find the right output color of your taste.


So for those who have the same problem, take a look under Tools in Powershell ISE

Great to hear that you’ve found a solution. And thanks for sharing. :+1:t4: :slightly_smiling_face:

Nowadays, a lot of PowerShellers including myself use VSCode for developing. There I prefer to use the “dark theme” because it’s easier on the eyes in my opinion. :wink: … you may give it a try.