How to change color of access modifiers (private, public etc.) in Visual Studio 2019
Asked Answered
M

2

5

I'm out of ideas. I tried almost all to change color of access modifiers in Visual Studio 2019, however non of my tries was successful. Via Tools-Options-Fonts and Colors-Text Editor I looked for any sign of that color, but no luck. Please, do you have any idea? Just for illustration, I'd like to change that "too gray" color of "private" access modifier. The same color is also in method declaration.

enter image description here

Thanks for any advice.

Mauritius answered 6/12, 2019 at 14:30 Comment(2)
Did you try the extension I mentioned below? If that extension did the job please let us know.Probable
I gave a try and I don't see there any possibility to change those access modifiers. It seems, that default settings of SemanticColoriser is almost the same as scheme I have already applied. So that color still preserve and it does not provide any possibility to change it.Mauritius
M
9

With few more research I have found solution. It may be useful for someone. If you have installed extension "Viasfora" in Tools-Options-Fonts and Colors-Text Editor look for key "Viasfora Visibility Keyword" which is by default dark gray, but with color modification you get exactly what I have been looking for. You can change color of all access modifiers.

Mauritius answered 12/12, 2019 at 12:38 Comment(1)
You can also change colour for flow control keywords (if, else, while..), query (LINQ) keywords (select, where, join, ..) with ViasforaCapitalism
L
4

Tools -> Options -> Environment -> Fonts and Colors -> Display items -> Keyword

Liddy answered 29/8, 2020 at 2:38 Comment(1)
This will change all keywords, including access modifiers. I believe the question author would like to change only access modifiers.Capitalism

© 2022 - 2024 — McMap. All rights reserved.