Inspired from various schemes among others: ‘Ragnarok Grey’, ‘Midnight Ocean’ and ‘Moria Alt’.
OK some thought on the scheme:
– Generally red and yellow colors are reserved for debugging, warnings, errors etc. Standard colors are kept in the blue and purple ranges for consistency reasons. A subjective goal was to keep coloring easy on the eye.
– Type colors show interfaces, classes, structs, enums and delegares with different colors for easy identification. Value types are kept in dark blue colors.
– The background is not quite black. Again to avoid high contrasts. To enhance the experience one could install the VS2010 ‘Productivity Power Tools’ extension and make the background black for the current line (R: 0, G: 0, B: 0) and gray when inactive (R: 128, G: 128, B: 128) – http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef
– Comments have a neutral color. It was not possible to specify the ‘XML Doc Attribute’ value but it should be light gray (R: 208, G: 208, B: 208). If a particular comment should be highlighted install the VS2010 ‘VS10x Comments Extender’ extension – http://visualstudiogallery.msdn.microsoft.com/17c68951-7743-40bd-ad35-608706f54a92
– Because numbers generally take up so little space, they have been highlighted with a high contrast green on black coloring.
– Font: Consolas with size 11 works nicely
Changes:
– I changed the color for delegate types to make it easier to read in daylight conditions.
– I changed the outlining colors.
Unfortunately I was not able to upload the whole schema here. Additional color settings need to be changed to get the full experience. Below I list the most interesting XML coloring elements that can be included in the downloaded schema if the target IDE is VS2010:
<Item Name=”AutoBraceEndingPointColor” Foreground=”0x02000000″ Background=”0x00AA7766″ BoldFont=”No”/>
<Item Name=”Breakpoint – Selected” Foreground=”0x00FFFFFF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Code Snippet Dependent Field” Foreground=”0x00FFFFFF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Code Snippet Field” Foreground=”0x02000000″ Background=”0x00AA7766″ BoldFont=”No”/>
<Item Name=”CS10XCommentImportantClassificationFormat” Foreground=”0x0000FF80″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”CS10XCommentImportantXLClassificationFormat” Foreground=”0x0000FF80″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”CS10XCommentImportantXXLClassificationFormat” Foreground=”0x0000FF80″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Coverage Partially Touched Area” Foreground=”0x00FFFFFF” Background=”0x00525252″ BoldFont=”No”/>
<Item Name=”Coverage Touched Area” Foreground=”0x00FFFFFF” Background=”0x00000000″ BoldFont=”No”/>
<Item Name=”CurrentLineFormat” Foreground=”0x02000000″ Background=”0x00000000″ BoldFont=”No”/>
<Item Name=”CurrentLineInactiveFormat” Foreground=”0x02000000″ Background=”0x00808080″ BoldFont=”No”/>
<Item Name=”Definition Window Background” Foreground=”0x02000000″ Background=”0x00202020″ BoldFont=”No”/>
<Item Name=”Definition Window Current Match” Foreground=”0x00FFFFFF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”MarkerFormatDefinition/FindHighlightFormatting” Foreground=”0x00FFFFFF” Background=”0x006D3F3A” BoldFont=”No”/>
<Item Name=”FindResultsClassifier” Foreground=”0x0000FFFF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Literal” Foreground=”0x0000FF80″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Other Error” Foreground=”0x0000FF00″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Refactoring Background” Foreground=”0x02000000″ Background=”0x00202020″ BoldFont=”No”/>
<Item Name=”Refactoring Current Field” Foreground=”0x02000000″ Background=”0x00AA7766″ BoldFont=”No”/>
<Item Name=”Refactoring Dependent Field” Foreground=”0x00FFFFFF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Script Function Block Start” Foreground=”0x00FFFFFF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Signature Help – Keyword” Foreground=”0x00FFBF00″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Signature Help – Operator” Foreground=”0x00FFFFFF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Signature Help – Text” Foreground=”0x00E0E0E0″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Signature Help – User Types” Foreground=”0x00FFFF00″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Signature Help – User Types(Delegates)” Foreground=”0x00D145B1″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Signature Help – User Types(Enums)” Foreground=”0x00AF912B” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Signature Help – User Types(Interfaces)” Foreground=”0x009924DF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Signature Help – User Types(Type parameters)” Foreground=”0x00FFCB97″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Signature Help – User Types(Value Types)” Foreground=”0x00FF8000″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Signature Help – VB User Types” Foreground=”0x00FFFF00″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”SignatureHelpBackgroundColor” Foreground=”0x02000000″ Background=”0x00303030″ BoldFont=”No”/>
<Item Name=”Smart Tag” Foreground=”0x00FFFFFF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Stale Code” Foreground=”0x0000FFFF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”Text” Foreground=”0x00E0E0E0″ Background=”0x00202020″ BoldFont=”No”/>
<Item Name=”UnderlineClassificationFormatProPack” Foreground=”0x02000000″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”VB Line Separator” Foreground=”0x00AF912B” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”VBUserTypeClassificationFormat” Foreground=”0x00FFFF00″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XmlDocAttributeClassificationFormat” Foreground=”0x00D0D0D0″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XmlAttributeNameClassificationFormat” Foreground=”0x00C0DAED” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XmlAttributeQuotesClassificationFormat” Foreground=”0x00FF97CB” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XmlAttributeValueClassificationFormat” Foreground=”0x00FF97CB” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XmlCDataSectionClassificationFormat” Foreground=”0x00ADADAD” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XmlCommentClassificationFormat” Foreground=”0x006BB7BD” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XmlDocCommentClassificationFormat” Foreground=”0x006BB7BD” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XmlDelimiterClassificationFormat” Foreground=”0x00FFBF00″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XmlDocTagClassificationFormat” Foreground=”0x00909090″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XmlEmbeddedExpressionClassificationFormat” Foreground=”0x00FFCB97″ Background=”0x00202020″ BoldFont=”No”/>
<Item Name=”XmlNameClassificationFormat” Foreground=”0x00FFBF00″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XmlProcessingInstructionClassificationFormat” Foreground=”0x00FF80FF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XmlTextClassificationFormat” Foreground=”0x00E0E0E0″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XAML Processing Instruction” Foreground=”0x00FF80FF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XML Doc Attribute” Foreground=”0x00D0D0D0″ Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XML Processing Instruction” Foreground=”0x00FF80FF” Background=”0x02000000″ BoldFont=”No”/>
<Item Name=”XSLT Keyword” Foreground=”0x00FFBF00″ Background=”0x02000000″ BoldFont=”No”/>
The following VS2010 XML coloring elements can be used for coloring of other text based windows (immediate, command, F# interactive, Power Shell etc.). They are not all available from the UI. The only way is to edit an exported schema file and then import it again:
<Item Name=”Plain Text” Foreground=”0x0000FF80″ Background=”0x00202020″ BoldFont=”No”/>
<Item Name=”Selected Text” Foreground=”0x02000000″ Background=”0x00FF9933″ BoldFont=”No”/>
<Item Name=”Inactive Selected Text” Foreground=”0x02000000″ Background=”0x00755B42″ BoldFont=”No”/>
<Item Name=”CurrentLineFormat” Foreground=”0x02000000″ Background=”0x00000000″ BoldFont=”No”/>
<Item Name=”CurrentLineInactiveFormat” Foreground=”0x02000000″ Background=”0x00808080″ BoldFont=”No”/>
<Item Name=”Current List Location” Foreground=”0x00A3DBFF” Background=”0x006D3F3A” BoldFont=”No”/>
<Item Name=”MarkerFormatDefinition/FindHighlightFormatting” Foreground=”0x00FFFFFF” Background=”0x006D3F3A” BoldFont=”No”/>
<Item Name=”FindResultsClassifier” Foreground=”0x0000FFFF” Background=”0x02000000″ BoldFont=”No”/>
The following VS2010 XML coloring elements sets the color for tool tips (VS2010):
<Category GUID=”{A9A5637F-B2A8-422E-8FB5-DFB4625F0111}” FontName=”Tahoma” FontSize=”8″ CharSet=”0″ FontIsDefault=”No”>
<Items>
<Item Name=”Plain Text” Foreground=”0x00008000″ Background=”0x02000000″ BoldFont=”No”/>
</Items>
</Category>
for
#region Studio Style class Program : IThemeable { static int _I = 1; delegate void DoSomething(); /// <summary> /// The quick brown fox jumps over the lazy dog /// THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG /// </summary> static void Main(string[] args) { string normalStr = "The time now is approximately " + DateTime.Now; Uri Illegal1Uri = new Uri("http://packmyboxwith/jugs.html?q=five-dozen&t=liquor"); Regex OperatorRegex = new Regex(@"S#$", RegexOptions.IgnorePatternWhitespace); for (int O = 0; O < 123456789; O++) { _I += (O % 3) * ((O / 1) ^ 2) - 5; if (!OperatorRegex.IsMatch(Illegal1Uri.ToString())) { // no idea what this does!? Console.WriteLine(Illegal1Uri + normalStr); } } } } #endregion
public class Highlighting { string inactiveSelection = "select this"; string highlightedRef; Collapsed textpublic void CollapsibleRegion() { string warning = "assigned but not used"; }public void Features() { highlightedRef = "again"; var break = "breakpoint"; SyntaxError(); CompilerError(); #if UNDEFINED_SYMBOL object excludedCode = null; #endif break = "current statement"; } }
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<List<Person>>" %> <!DOCTYPE html> <html> <head> <title>Studio Style ASP.NET</title> <style type="text/css"> .people { font-family: 'Arial Narrow'; font-size: 100% !important; /* comment */ } </style> </head> <body> <h1>A test page</h1> <!-- list of people --> <ul class="people"> <% foreach(Person person in Model) { %> <li> <%: person.Name %> > (<%: Html.ActionLink("edit", "Edit", new { id = 1 }) %>) </li> <% } %> </ul> <script type="text/javascript"> // TODO: use jQuery instead window.onload = function() { for(var i = 0; i < 23; i++) { alert("Hello"); } } </script> </body> </html>
@model List<Person> @{ ViewBag.Title = "Razor"; Layout = "~/Views/Shared/_Layout.cshtml"; } <h1>Razor</h1> <ul class="people"> @foreach(Person person in Model) { <li> @person.Name > (@Html.ActionLink("edit", "Edit", new { id = 1 })) </li> } </ul>
<?xml version="1.0" encoding="utf-8" ?> <!-- this is an example XML file --> <people xmlns:x="http://studiostyles.info"> <person name="Jim Jones" ID="27"> <email html="yes">[email protected]</email> <address> <post>123 Example St,  South Brisbane</post> <city>Brisbane</city> </address> <x:comments> <![CDATA[ See? Data. Don't worry about this <tag>. ]]> </x:comments> </person> </people>
<Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="100" Width="300"> <Grid> <!-- A comment --> <StackPanel HorizontalAlignment="Left"> <Button Click="Clicked">A button</Button> <StackPanel.Resources> <Style TargetType="{x:Type Button}"> <Setter Property="Rectangle.Stroke" Value="{DynamicResource {x:Static SystemColors.ControlBrush}}" /> </Style> </StackPanel.Resources> </StackPanel> <x:Code> <![CDATA[ void Clicked(object sender, RoutedEventArgs e) { ((Button)sender).Content = "Hello World"; } ]]> </x:Code> </Grid> </Window>