Since my Eclipse installation blew up I’ve been using the IntelliJ IDEA Community Edition for Android programming. Like many others I prefer working with a dark editor background instead of a blinding bright white background but I found there are very few places you can find pre-made IntelliJ color schemes and there’s no place like http://studiostyl.es for IntelliJ. So I translated a couple of my preferred Visual Studio color schemes (Son of Obsidian and Ragnarok Blue) to IntelliJ.
You can download either or both color schemes from my Dropbox. Both SonOfObsidian.zip and RagnarokBlue.zip contain an XML file of the same name; put the XML file in your home\.IntelliJIdea10\config\colors directory (you will need to restart IntelliJ before it will pick up the files.) After you restart IntelliJ, go to File->Settings->Editor->Color & Fonts and select the scheme you want to use from the Scheme name dropdown. Both schemes use the Consolas font.
Translating the schemes was pretty straightforward with only a couple of gotchas. First is you have many more customization options in IntelliJ than you have in Visual Studio. In IntelliJ you can have different colors for instance fields vs. static fields vs. parameters, line comments vs. block comments (plus others). The second gotcha is that the settings for Red and Blue seem to be reversed. For example, in the Ragnarok Blue scheme the plain text background setting is 0x00261A10. I used a web site to quickly translate the hex code to it’s RGB equivalence; there are many sites that can handle the conversion. Drop ‘0x’ and the first ‘00’ and plug in ‘261A10’; the code comes back as Red:38, Green:26, Blue:16. But if you plug that into IntelliJ’s RGB color tab, it won’t be right. You have to enter it backwards as Red:16, Green:26, Blue:38. I tried a couple of different translation sites with the same results so the problem is either in Visual Studio or IntelliJ.
Mappings from the .vssettings file to IntelliJ are pretty simple (anyplace in .vssettings where the color is 0×02000000 it means the color was left at the default:)
- Comment: Java->Line comment & Java->Block comment
- Plain Text: General->Default text
- Selected Text: split between General->Selection background and General-Selection foreground
- Brace Matching (Rectangle): General->Matched brace (background)
- Identifier: Used this in a few places. Java->Instance field, Java->Local variable,Java->Method call, Java->Static field
- Number: Java->Number
- Operator: Java->Operator sign
- String: Java->String
- User types: Java->Class
- User Types(Interfaces): Java->Interface
- Line Numbers: General->Line number
- Keyword: Java->Keyword
- XML Attribute: XML->Attribute name
- XML Attribute Value: XML->Attribute value
- XML Comment: XML->Comment
- XML Name: XML->Tag name