Completion candidates color

I changed to a lighter color theme and noticed that the color of TAB completion candidates is illegible. How can I change the completion colors? I looked at `get-psReadLineOption`, but did not find completion related color names.

A screenshot showing what I described above:

image

and I would like to change the green background color of directories and the blue background color of the selected completion candidate.

I changed the color in Windows Terminal, but am still interested in PowerShell and Windows Terminal color interaction in this case.

on mine when I run Get-PSReadLineOption it looks to me like the SelectionColor property is the one that correlates with that color.

E.g.


quickly checked the docs on changing colors and ran this

set-psreadlineoption -Colors @{"SelectionColor"="`e[36m"}

which produced an error saying I couldn’t change “SelectionColor”. I then went in to Windows Terminal’s settings and modified the “White” color in my appearance section and that effectively changed the color of highlighted text.

So, I think you found the solution. PSReadline can control some colors, but your terminal’s color scheme is going to have more effect on everything.

Thanks for checking back and confirming!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.