How to change Visual Studio 2012 Razor colors
Asked Answered
L

3

31

I would like to change the yellow background color of the Razor tags in VS12.

Lezlielg answered 18/3, 2013 at 11:11 Comment(0)
L
51

Optional: Install the color theme editor: http://visualstudiogallery.msdn.microsoft.com/366ad100-0003-4c9a-81a8-337d4e7ace05

In the theme editor or Tools > Options > Environment > Fonts and Colors

Search for: 'HTML Server-Side Script' to edit the foreground & background of @ and other tags.

Search for: 'Razor Code' to edit the background of the Razor code.

Lezlielg answered 18/3, 2013 at 11:11 Comment(3)
VS2013 appears to have change this from "Razor Code" to "HTML Server Code Block Background".Gca
And VS2013 Update 2 seems to have changed this to "HTML Razor Code Background".Custom
For VS2013 Update 4, it is "HTML Server Code Block Background". One more thing, if you don't see the color change immediately after saving, restart VS once and check again (I had to restart VS for the change to take effect).Arv
V
6

Besides the way that @seanjacob mentioned, there's a built-in way if you'd rather not install an extension just to change Razor colors. This approach is shown in this answer.

Vamoose answered 24/7, 2013 at 15:5 Comment(0)
D
1

Color Theme Editor for Visual Studio 2017

https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.VisualStudio2017ColorThemeEditor

and you can follow the same instructions as seanjacob's post

Darmit answered 16/5, 2018 at 13:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.