Hacker News new | comments | show | ask | jobs | submit login
Solarized - Color scheme for vim, mutt, terminal emulators (ethanschoonover.com)
496 points by lamnk 2250 days ago | hide | past | web | 154 comments | favorite

Its really rare to see that much thought going into the aesthetics of stereotypically "geeky" applications like vim and terminals, even the website looks entirely different from pretty much every website I have seen around these tools

its a refreshing change, awesome work

Thanks very much. Looking back at my early hg repos on this project I refined it for about six months.

As an aside. I have a nominal post in my head contrasting the development and refinement of a colorscheme like this vs the infamous 41 shades of blue. There is room for refinement and testing in design, but I think it has to be coupled with a clear design goals and opinions.

Thank you for the work!

It would be very interesting to learn about the methods you used to create this.

Are you planning to create a palette with more shades? Some time ago I needed lighter Tango tones and created this extended palette: http://emilis.info/other/extended_tango/

Please share your favorite color scheme(s) !

My favorite for gvim/MacVim is molokai: http://winterdom.com/2008/08/molokaiforvim , seconded by vividchalk when i'm on the terminal: https://github.com/tpope/vim-vividchalk

Haven't found any good color scheme for iterm2 yet. Currently i'm using thayer: http://ecto-plazm.deviantart.com/gallery/

I just tried this with Perl, and it looks great (the fold-column's a bit bright, but I don't have that on by default). Have you thought about uploading it to vim.org?

Thank you. Will do.

Those are both really nice. I'm finding after a year or so of IR_Black I'm wanting a change.

What's your terminal setup like?

Thank you.

I run tmux inside iTerm2.

I'll clean the theme up a little and make an isolated repository.

Looks decent in 8-color terminal as well.

My favorite is ir_black: http://blog.toddwerth.com/entries/show/8

My favorite theme is the "Oblivion" one for gedit, but I don't use gedit, so I remade it for TextMate and Xcode 3/4.


I am sitting on a mostly-done vim version right now as well, the GUI colors are all good, but I wiped out the terminal colors (I want them to just be the defaults). I'm not exactly a vim expert and I almost always use the terminal vim exclusively for git commits, which don't really need highlighting, so the motivation to fix those sort of disappeared.

Another vote for the Oblivion gedit theme. It's very nice.

This is supposed to be the version for Eclipse, but it seems that the colors are kind of different, which is a pity:


That looks cool, please consider putting your code on github so that others can follow its development.

Here you go:


Will upload the vim one later after I finish it up.

I like mustang as well, but I keep coming back to desert: http://www.vim.org/scripts/script.php?script_id=105

Thanks for the kind words about molokai; took a bit to get it ported, but I've enjoyed it a lot since then. 99% of the props should go to the original authors of monokai and Hamish, though :)

Molokai ain't perfect, but I have yet to find one I like more for daily use.

Thanks for the port Tomas - been enjoying it for several years. Always leaves a 'mark' when people see it for the first time.

There's also a 256 colour version for use in terminals:


I love the Railscasts theme (http://railscasts.com/episodes/258-token-fields for example), which is what I usually use with Emacs.

For iTerm2 I copied over the colors from Visor.app's theme.. but Solarized looks really nice, so maybe I'll soon be using that instead.

is there a reason why most of these color schemes (including solarized), have a very low contrast for comments - making them difficult to read. I personally use the desert colorcheme (http://hans.fugal.net/vim/colors/desert.html)

Perhaps to make them "stand-out" less (so they don't distract you when you're skimming the code).

this is interesting - colorscheme as a reflection of programming philosophy.

I actually tend to read (and write) comments a LOT. Which is why, I simply am not able to use any colorscheme that tries to hide comments.

Yeah, I'm a huge fan of desert.

I mostly use IR_black for vim and emacs, that's definitely a classic. But I'm also quite fond of a custom scheme I made; the colors mostly come from Textmate's Made of Code scheme. Here's a screenshot:


If anyone is interested, the theme is here:


The .vim file started out as IR_black, I just hacked at the colors until I was satisfied, so the code's not clean or anything :)

[I also have a OS X terminal theme to go with it, and an emacs version.]

Could you share the emacs theme?

I am currently using darkspectrum[1] for diff output and candycode[2] for everything else. There is a huge gallery of them, viewable with several code samples, on the Vim Color Scheme Test page[3].

[1] http://www.vim.org/scripts/script.php?script_id=2215

[2] http://www.vim.org/scripts/script.php?script_id=1635

[3] http://code.google.com/p/vimcolorschemetest/

After years of dark colorschemes, I'm loving vim-github-theme[1].

[1] https://github.com/acarapetis/vim-github-theme

Used 'elflord' for the longest time, but have lately switched to Koehler.

Screenshot with semi-transparent background: https://picasaweb.google.com/lh/photo/3ORpqSeM1kvLV0lceHpOjw...

I use molokai as well, but with some small tweaks (darker near-black background, lighter more visible comments, and a more visible line highlight). Inconsolata font for life, I've tried just about every other programming font out there and I always keep coming back.

I love lettuce.vim: http://i.imgur.com/67LH9.png

You can download it here: http://www.vim.org/scripts/script.php?script_id=1975

Make sure to enable 256 colors.

I am using Vim on Windows via an app called Console2.

I am not sure how it handles terminal colors. So I just configured Console2 to use Solarized colors and then tried every colorscheme in Vim.

"morning" scheme worked best for me. It is so much easier to read my coworkers crammed code.

I've actually really grown accustomed to Visor's color theme and use it for all my terminal stuff (including vim). http://visor.binaryage.com/

IR_Black for Textmate though

I use brookstream [1]. It's dark, somewhat low-contrast, with shades of blue and purple.

[1] http://www.vim.org/scripts/script.php?script_id=619

I prefer the emacs color-theme 'tangotango':


I also love thayer for iterm2. Here's the github repo for those schemes:


You might like my molokai-inspired color scheme for xterm: https://gist.github.com/845878

I'm using a modified xoria256 in console vim. I gave it a darker background and added some missing colors.

In MacVim I tend to switch between molokai and ir_black.

I like nuvola for VIM; it has clean, solid colors.


So, my mind is blown that you put so much effort into designing a color scheme, and thanks, but maybe put the img/ directory in your git repo somewhere else, so that a git pull of a color scheme doesn't take 50(!) megs.

I was afraid that would be a pain for people, sorry! You're right, I need to do this. There is a reason, which is that the exact same repo does double duty as the webpage (via Hakyll). It's super convenient because I have hakyll process the README out into an index.html (pulling webserver local imgs, so there is some sed magic).

I may try to break out the images as another subtree or make a website subtree. It was lower on my list of priorities, but clearly a pain to others cloning/forking. I'll try to sort it before beta2.

I haven't looked into how one can export gnome-terminal color palettes yet, but if anyone else is interested, I think these are the correct settings in gconf:

    /apps/gnome-terminal/palette: #070736364242:#D3D336368282:#B5B589890000:#CBCB4B4B1616:#2A2AA1A19898:#6C6C7171C4C4:#858599990000:#EEEEE8E8D5D5:#00002B2B3636:#D3D301010202:#58586E6E7575:#65657B7B8383:#838394949696:#26268B8BD2D2:#9393A1A1A1A1:#FDFDF6F6E3E3
    /apps/gnome-terminal/background_color: #00002B2B3636
    /apps/gnome-terminal/foreground_color: #65657B7B8383
Edit: Ok, I pulled down the source for gnome-terminal since I couldn't find a way to export/import color schemes. The color palettes are all hard-coded, so that is unfortunate :(.

Ok, I think I had this wrong and it looks like I've hit a limit on editing my post. Here's the right values (I hope):

(All values are in /apps/gnome-terminal/profiles/Default):

    palette: #070736364242:#D3D301010202:#858599990000:#B5B589890000:#26268B8BD2D2:#D3D336368282:#2A2AA1A19898:#EEEEE8E8D5D5:#00002B2B3636:#CBCB4B4B1616:#58586E6E7575:#65657B7B8383:#838394949696:#6C6C7171C4C4:#9393A1A1A1A1:#FDFDF6F6E3E3
    background_color: #00002B2B3636
    foreground_color: #65657B7B8383

And here's the Light version:

palette: #070736364242:#D3D301010202:#858599990000:#B5B589890000:#26268 B8BD2D2:#D3D336368282:#2A2AA1A19898:#EEEEE8E8D5D5:#00002B2B363 6:#CBCB4B4B1616:#58586E6E7575:#65657B7B8383:#838394949696:#6C6 C7171C4C4:#9393A1A1A1A1:#FDFDF6F6E3E3

background_color: #FDFDF6F6E3E3

foreground_color: #00002B2B3636

(Same palette, just different FG and BG colours)

You can edit the custom palette (it gets saved in .gconf/apps/gnome-terminal/profiles/XXXX/%gconf.xml).

agreed, but there is no mechanism for importing/exporting additional color schemes (I guess you could export an entire profile, but that entails quite a bit more than just color schemes).

the emacs port seems a bit too low contrast


After investigating this (and raising the aforementioned Emacs bug), I've concluded that sRGB hex colors - as used by Ethan - are simply not the right hex colors to enter in Emacs in order to get the desired results. Instead, Emacs apparently works with Generic RGB values, and after some laborious conversion calculations in Apple's "ColorSync Utility", I got the right results:


The color fix will probably get into sellout's repo, so interested parties should prefer that one over mine.

That's awesome! Thank you!

Yes, that seems strange. Does emacs handle gamma differently?

Cocoa Emacs doesn't seem to handle gamma at all; the color you set isn't the color you get. I just raised an emacs bug here: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8402

Why would you use this color scheme on a whole operating system?

I know you were joking, but actually, why not? If the color scheme is easier on someone's eyes, wouldn't it make sense to use it everywhere? Personally I've often found using dark themes in my editor a bit jarring when switching to other tools like a file browser or terminal if the settings are drastically different.

I made a similar port, with some different faces and a slightly different feel:


(Using the latest Emacs under OS X, it suffers from the same color issues mentioned elsewhere in this comment thread, but hopefully Emacs will soon get fixed up accordingly.)

I don't like this scheme and I don't buy the pseudo-science blurb. It's based on shades of blue. Our eyes are the least sensitive to blue. And what's up with the red and pink, is this some cruel joke?

I'll stick with Zenburn[1].

[1] http://slinky.imukuppi.org/zenburn/

Zenburn is easy on the eyes but doesn't offer enough contrast.

I was a dedicated IR_Black user (in both VIM and Visual Studio), and didn't think highly of this at first. But after about an hour, it's grown on me. If I can scrape together some time, I'll throw together a VS2010 color scheme/theme.

Please please do that! I for one would love to have this scheme in VS2010!

Awww, awesome!

Umm, don't use it then?

What's the pseudo-science blurb?

The monotones have symmetric CIELAB lightness differences, so switching from dark to light mode retains the same perceived contrast in brightness between each value. Each mode is equally readable. The accent colors are based off specific colorwheel relations and subsequently translated to CIELAB to ensure perceptual uniformity in terms of lightness. The hues themselves, as with the monotone ab values, have been adjusted within a small range to achieve the most pleasing combination of colors.

Blurby enough? ;-)

I hope that doesn't turn too many other folks off from the page and colorscheme. It may sound like a pseudoscience blurb, particularly if you aren't a color geek, but I sure didn't intend it to. It's all technically relevant and (I thought ;) tightly descriptive.

Lab was actually a big part of the initial inspiration for the colorscheme. I work a lot in lab space (Lab is more correct, but cumbersome to type) and for anything related to actual human vision it is head and shoulders above other color models/spaces. It's also awkward if you think in RGB and notoriously poorly supported outside of Photoshop (though most OS color management systems that I'm aware of translate everything back into Lab or a Lab equivalent).

The color relations are also foundational to palette creation in traditional graphic design. They are super useful in creating a palette that feels harmonious and (subjectively) unified.

I'd be happy to go into more detail, but I tend to go on at length and, much like when I get into talking about code with people not interested in code, talking about color spaces with those not interested is a sure fire turn off :)

Sounds like it could make an interesting blog post.

What part of CIELAB (http://en.wikipedia.org/wiki/Lab_color_space) is pseudo-science? I don't see a section on the Wikipedia page about criticisms or controversies.

Point taken, I should have been less hand-wavy.

CIELAB might not be pseudo-science, but the claim that the application of CIELAB makes this a good scheme is, at best, dubious.

The bright red and pink don't blend with the other colors at all. Their jarring contrast (and red hue) could be adequate for an alert message, but not for innocent and frequent syntax elements.

Maybe there is a math model that captures all relevant aspects that make a good syntax highlighting color scheme. But this model clearly doesn't.

i tried a modified zenburn for a bit (i modify all my colour schemes so that the background is pure black), but went back to desert256 in the end. i just find it more pleasant to look at for hours at a time.

+1 for zenburn

I don't know about the rest of you, but my eyes literally started to hurt when I read the text on that page, presumably because of the color of the text v. background. Doesn't bode well for using it in vim...

Maybe it looks better on a different monitor? (I have a Samsung LCD.)

I found the color scheme easy to read.

Using a Dell monitor attached to a mac via DVI though, and calibrated to the best of my ability using the OSX calibration tool.

Agreed. It's definitely not high enough contrast for such a thin font.

Bizarrely: I, too, had to strain to read the page; which I attributed, however, to the weight of the font: so thin that it won't render without artifacts.

You may need to enable ClearType.

If on Windows XP. Display Properties > Appearance > Effects

I'm on Mac OSX; is there an equivalent?

For Snow Leopard: Open System Preferences, go to Appearance, and uncheck "Use LCD font smoothing when available"

What browser are you using? It looks great to me here in Chrome and Safari.

Chrome on Mac.

I found the theme rather comfortable for using in the terminal; however I set TERM=xterm-256color so that vim would also pick up the light colour scheme—there seemed to be some issues with the background colour on gnome-terminal/Ubuntu.


When I was brave enough to test outside of urxvt and iterm2/terminal.app, it seemed that terminal emulators are all over the place in terms of background color support in vim terminal mode.

You might have tried this already (and it might not actually be related to your issue), but there is a variable you stick in your vimrc (let g:solarized_termtrans=1) to force it to take the background of your terminal emulator (useful only if you are running with the solarized colors in terminal mode).

I should come up with a some recommendations on setting TERM to ensure proper colorscheme support, but that way lies madness (for me at least).

I don't mean to sound particularly thick here, but is there a way to apply these colours to my OSX Terminal too? I've installed the bundle for Terminal.app, and they look lovely in emacs, but can I use them in my general bash environment, too?

Yes, the directions are on GitHub:


Once you've activated that theme in Terminal.app's preferences, all your colors in the shell will use the colors defined in the colorscheme. So red will be the red in the colorscheme, blue -> blue, etc.

Thanks - seems to be working a treat here. Cheers!

How did you get it for emacs? Perhaps I am the one being thick here ... :-/

It just worked, or at least, seems to be working :o)

Fantastic work. If I happen upon some spare time I'll try and port it for TextMate users.

Please do, I'd really appreciate it.

I've got a start going in https://github.com/markstory/solarized

Great work, Mark! I see you're progressing well with the TextMate themes.


I've forked Mark's version and added a bunch of specific styles for the Light version, specifically a lot of rules for PHP and CSS.

It's not 100% yet, but it's already the best TextMate theme I've ever used.


Anyone get a chance to test out how this looks with vimdiff? That's one area that usually ends up looking fugly b/c the theme creator neglected to look at it. Other areas that are typically neglected (though not in this case): code folding, split buffer dividers.

Here's a vimdiff sample from the rvm repo...


Make it for TextMate ;)

It would be nice to have a script that would start with this as a base, but let you tune the contrast. I like the theme, but would like more contrast than this (I use small fonts, and I really feel like more contrast is necessary when doing so).

fwiw, there is a high contrast option in the vim colorscheme (let g:solarized_contrast="high").

I'm working on cleaning up some of the build scripts that generated specific files (the mutt directory has an ugly shell script as an example, there are better ways of course).

Man, I love those sets. Hadn't used that site before but it's awesome. Very nice to see the stark ocean and ink in water in the last set. Not too far off from the deep ocean feel I was targeting during design.

Thanks. Great links.

My favorite vim color scheme is two2tango. Here's a preview http://cl.ly/2Y0v251z0A29203K3d3D

I made a Solarized dark theme for XCode 4. I used the Vim definition as a guide, though varied it a little while staying within the color palette.


I would really love to have emacs, gnome-terminal and gedit themes made out of this color scheme.

any volunteer to submit it for emacs24 @ http://elpa.gnu.org/themes/ ?

Is anybody willing to explain how to switch between light and dark? I can't seem to understand the scss snippet that he gives. Apparently, you only have to switch 4 colors, It would be nice to know what those colors were.

I'll be expanding the webpage to detail that, but essentially:

base03 = background base02 = background highlight base01 = background data (comments, etc.) base0 = normal text

The scheme was designed to allow for: base1 = optional bold/emphasis

Just swap the zeros (initially I was using minus/plus, e.g. base-1 and base+1 but this isn't usable across all apps) to swap dark and light modes. There is a good example of this in the vim script as well as the sass snippet (and the mutt compile script if you are a glutton for ugly bash scripts).

base3 = light background base2 = dark background etc.

You shouldn't need to do any of this manually, however. The vim script has a light/dark mode built in and where there isn't a way to toggle modes I am distributing light and dark versions (the terminal color schemes).

Thanks! I coulden't find a light version of the Xresources script though, that's why I was wondering about switching.

Very nice! It is indeed amazing how much thought and effort was put into this, and it is appreciated. At some point, I'll have to convert for Visual Studio use if someone doesn't beat me to it.

Am I the only coder who doesn't like working with light text on a dark background? I have 20/20 vision, and I find it really uncomfortable to use these.

My theory is that it depends on when/where you normally work. If you have a tendency to code at night or in dark rooms, dark on light is very bright. At least, that's why I go light on dark.

That makes sense. I work from home in a room that's all windows.

I tried to install the iTerm2 colorscheme and also the vim colorscheme, but they look nowhere near the screenshots. Anyone having issues like this?

My vim renders everything way darker (or perhaps is just that there is not as much contrast) than in the screenshots. I double checked that I am using xterm-256color (and also checked against rxvt-unicode-256color). It's too bad, I really like how it looks in your screenshots, but in my computer not so much...

I love the effort put into this, but somehow the background is way too light for my taste, in vim the colorscheme is kind of bland.

I cannot seem to get the colors to render properly on Snow Leopard, using Terminal.app, and vim. Anyone else have any trouble but get it to work?

I installed the thing as instructed. I installed SIMBL and the SIMBL plugin, installed Solarized Dark Terminal.app theme, installed vim using pathogen, and set .vimrc with the additional g:solorized_termcolors=16 option.

Go to Applications > Utilities, right-click on Terminal.app and set 32-bit mode. Hope that helps!

The 64-bit TerminalColours SIMBL plugin that's linked to in the README doesn't play nicely with binaryage's 64-bit Visor plugin, for some reason. However, Evan Phoenix's fork[1] works perfectly for me.

[1] https://github.com/evanphx/terminalcolours/downloads

A bit too much color according to my taste - I like a more subdued color scheme, as seen in http://www.michielovertoom.com/pictures/kwrite-textanalyse.p... (All black on lightgray, strings dark gray, and prussian blue comments).

A norwegian file! Tekstanalyse. Why are the comments in Dutch?

It was a prototype I made for a prospective client. I sometimes use Dutch comments (and variable names) in such a case. Btw, 'Tekstanalyse' is also a Dutch word.

It looks nice, is there a tmTheme file?

Currently I use TwilightMod, which is as the name suggests, a modification of Twilight.

This is what it looks like: http://i.imgur.com/u802t.png

Get it here https://gist.github.com/809720

Does this work in the console (vim)? I currently have desert256 working nicely in iTerm (xterm-256color). I'm away from my computer or I'd test it myself. Thanks! Never seen anyone put this much effort into a color scheme! I actually feel like I personally owe it to you to give this a shot.

Yes, but the 256 mode is actually an approximation of the real color theme. For exact colors you have to set up the 16 ansi colors of your terminal to the right colors and set a var in vimrc. See the docs for details.

Any chance for gedit and gnome terminal versions? Fantastic scheme, would donate my kidney for a gedit port

I made a simple Pygments version[1] for use on my website. I immediately thought it was perfect for my site, but I'm sticking to molokai for Vim. Thanks!

[1]: https://bitbucket.org/john2x/solarized-pygment

When I use this in my .Xdefaults, my terminal emulator (urxvt) goes hot pink ( http://ompldr.org/vODRtMg/2011-04-05-165103_1024x600_scrot.p... ), any ideas?

mine goes all blue, it's awful and I haven't found anyone with this problem. Looks great in vim but it's unusable for urxvt/xterm (and also emacs).

edit: http://imgur.com/OMjdR

Might have a go later at making one that works with urxvt, hopefully that should get it working with xterm.

With that said, if it's not working with urxvt/xterm, what is the Xdefaults working with?

nothing, got a response on twitter and he said he borked it but will fix next release

the bold colors are bad, this makes most of my terminal apps annoying as hell (ncmpcpp, byobu, aptitude, htop)

for one thing, at least one of the bold text colors is the same as the background, this makes this text not even show up when it's present

it would be nice if not for this

I really don't get the terminal color assignments. Why are the brfoo colors set to grey?

Anybody know of a TextMate port?

Yep, come and help finish it :)


Any chance of publishing the Xresources version (or at least hex codes in that file) for the "white" version?

That's the dark version.

It's a remarkable work. Although, on the dark background, the red and the magenta colors are too saturated.

Wow. Beautiful colors. Beautiful site. Very impressed by how much effort the author has put into this.

Any chance someone can pull an Eclipse Color Theme version? (pretty please :)

Could be that I'm missing something, but the dark versions don't seem to be the same as in solarized: http://ethanschoonover.com/img/solarized/solarized-screen-ja...

Does the font on the website look extremely blurry for anyone else...?

Am I the only person on HN that just happily uses the default color schemes that comes with editors?

Just about, yes.

Request for intellij impl.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact