Giter Site home page Giter Site logo

altercation / solarized Goto Github PK

View Code? Open in Web Editor NEW
15.7K 402.0 3.5K 33.75 MB

precision color scheme for multiple applications (terminal, vim, etc.) with both dark/light modes

Home Page: http://ethanschoonover.com/solarized

License: MIT License

Emacs Lisp 5.00% Shell 8.21% JavaScript 0.55% Perl 10.62% C 0.71% Haskell 0.95% Java 0.42% PHP 0.92% Python 2.41% Ruby 0.90% AppleScript 4.39% Vim Script 49.66% HTML 14.29% TeX 0.96%

solarized's Introduction

title description author tags colors created modified
Solarized
Precision colors for machines and people
Ethan Schoonover
test, testing, test123
light yellow
2011 Mar 15
2011 Apr 16

Solarized

Precision colors for machines and people

solarized dualmode

Solarized is a sixteen color palette (eight monotones, eight accent colors) designed for use with terminal and gui applications. It has several unique properties. I designed this colorscheme with both precise CIELAB lightness relationships and a refined set of hues based on fixed color wheel relationships. It has been tested extensively in real world use on color calibrated displays (as well as uncalibrated/intentionally miscalibrated displays) and in a variety of lighting conditions.

See the changelog for what's new in the most recent release.

solarized palette

solarized vim

Currently available in formats for (cf screenshots below):

Editors & IDEs

Terminal Emulators

Other Applications

Palettes

  • Adobe Photoshop Palette (inc. L*a*b values)
  • Apple Color Picker Palettes
  • GIMP Palette

Don't see the application you want to use it in? Download the palettes (or pull the values from the table below) and create your own. Submit it back and I'll happily note the contribution and include it on this page. See also the Usage & Development section below for details on the specific values to be used in different contexts.

Download

Current release is v1.0.0beta2. See the changelog for details on what's new in this release.

Fresh Code on GitHub

You can also use the following links to access application specific downloads and git repositories:

Note that through the magic of git-subtree these repositories are all kept in sync, so you can pull any of them and get the most up-to-date version.

Features

  1. Selective contrast

    On a sunny summer day I love to read a book outside. Not right in the sun; that's too bright. I'll hunt for a shady spot under a tree. The shaded paper contrasts with the crisp text nicely. If you were to actually measure the contrast between the two, you'd find it is much lower than black text on a white background (or white on black) on your display device of choice. Black text on white from a computer display is akin to reading a book in direct sunlight and tires the eye.

    solarized selective contrast

    Solarized reduces brightness contrast but, unlike many low contrast colorschemes, retains contrasting hues (based on colorwheel relations) for syntax highlighting readability.

  2. Both sides of the force

    solarized dualmode

    I often switch between dark and light modes when editing text and code. Solarized retains the same selective contrast relationships and overall feel when switching between the light and dark background modes. A lot of thought, planning and testing has gone into making both modes feel like part of a unified colorscheme.

  3. 16/5 palette modes

    solarized palettes

    Solarized works as a sixteen color palette for compatibility with common terminal based applications / emulators. In addition, it has been carefully designed to scale down to a variety of five color palettes (four base monotones plus one accent color) for use in design work such as web design. In every case it retains a strong personality but doesn't overwhelm.

  4. Precision, symmetry

    solarized symmetry

    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 *a*b values, have been adjusted within a small range to achieve the most pleasing combination of colors.

    See also the Usage & Development section below for details on the specific values to be used in different contexts.

    This makes colorscheme inversion trivial. Here, for instance, is a sass (scss) snippet that inverts solarized based on the class of the html tag (e.g. <html class="dark red"> to give a dark background with red accent):

    $base03:    #002b36;
    $base02:    #073642;
    $base01:    #586e75;
    $base00:    #657b83;
    $base0:     #839496;
    $base1:     #93a1a1;
    $base2:     #eee8d5;
    $base3:     #fdf6e3;
    $yellow:    #b58900;
    $orange:    #cb4b16;
    $red:       #dc322f;
    $magenta:   #d33682;
    $violet:    #6c71c4;
    $blue:      #268bd2;
    $cyan:      #2aa198;
    $green:     #859900;
    @mixin rebase($rebase03,$rebase02,$rebase01,$rebase00,$rebase0,$rebase1,$rebase2,$rebase3)
    {
        background-color:$rebase03;
        color:$rebase0;
        * { color:$rebase0; }
        h1,h2,h3,h4,h5,h6 { color:$rebase1; border-color: $rebase0; }
        a, a:active, a:visited { color: $rebase1; }
    }
    @mixin accentize($accent) {
        a, a:active, a:visited, code.url { color: $accent; }
        h1,h2,h3,h4,h5,h6 {color:$accent}
    }
    /* light is default mode, so pair with general html definition */
    html, .light { @include rebase($base3,$base2,$base1,$base0,$base00,$base01,$base02,$base03)}
    .dark  { @include rebase($base03,$base02,$base01,$base00,$base0,$base1,$base2,$base3)}
    html * {
        color-profile: sRGB;
        rendering-intent: auto;
    }
    

    See also the full css stylesheet for this site.

Installation

Installation instructions for each version of the colorscheme are included in the subdirectory README files. Note that for Vim (and possibly for Mutt) you may want to clone the specific repository (for instance if you are using Pathogen). See the links at the top of this file.

Font Samples

Solarized has been designed to handle fonts of various weights and retain readability, from the classic Terminus to the beefy Menlo.

font samples - light font samples - dark

Clockwise from upper left: Menlo, Letter Gothic, Terminus, Andale Mono.

Preview all code samples in specific font faces by selecting a link from this list:

Screenshots

Click to view.

Mutt

mutt dark mutt light

C (Vim)

c dark c light

Haskell (Vim)

haskell dark haskell light

HTML (Vim)

html dark html light

Java (Vim)

java dark java light

Javascript (Vim)

javascript dark javascript light

Pandoc Markdown (Vim)

These screen shots show Vim running with my own Pandoc Kit Syntax.

pandoc dark pandoc light

Perl (Vim)

perl dark perl light

PHP (Vim)

php dark php light

Python (Vim)

python dark python light

Ruby (Vim)

ruby dark ruby light

Shell (Vim)

shell dark shell light

TeX (Vim)

tex dark tex light

The Values

L*a*b values are canonical (White D65, Reference D50), other values are matched in sRGB space.

SOLARIZED HEX     16/8 TERMCOL  XTERM/HEX   L*A*B      RGB         HSB
--------- ------- ---- -------  ----------- ---------- ----------- -----------
base03    #002b36  8/4 brblack  234 #1c1c1c 15 -12 -12   0  43  54 193 100  21
base02    #073642  0/4 black    235 #262626 20 -12 -12   7  54  66 192  90  26
base01    #586e75 10/7 brgreen  240 #585858 45 -07 -07  88 110 117 194  25  46
base00    #657b83 11/7 bryellow 241 #626262 50 -07 -07 101 123 131 195  23  51
base0     #839496 12/6 brblue   244 #808080 60 -06 -03 131 148 150 186  13  59
base1     #93a1a1 14/4 brcyan   245 #8a8a8a 65 -05 -02 147 161 161 180   9  63
base2     #eee8d5  7/7 white    254 #e4e4e4 92 -00  10 238 232 213  44  11  93
base3     #fdf6e3 15/7 brwhite  230 #ffffd7 97  00  10 253 246 227  44  10  99
yellow    #b58900  3/3 yellow   136 #af8700 60  10  65 181 137   0  45 100  71
orange    #cb4b16  9/3 brred    166 #d75f00 50  50  55 203  75  22  18  89  80
red       #dc322f  1/1 red      160 #d70000 50  65  45 220  50  47   1  79  86
magenta   #d33682  5/5 magenta  125 #af005f 50  65 -05 211  54 130 331  74  83
violet    #6c71c4 13/5 brmagenta 61 #5f5faf 50  15 -45 108 113 196 237  45  77
blue      #268bd2  4/4 blue      33 #0087ff 55 -10 -45  38 139 210 205  82  82
cyan      #2aa198  6/6 cyan      37 #00afaf 60 -35 -05  42 161 152 175  74  63
green     #859900  2/2 green     64 #5f8700 60 -20  65 133 153   0  68 100  60

Usage & Development

If you are considering developing a port for Solarized, please see also the developer notes for information about optional repository structure and readme formats.

Solarized flips between light and dark modes. In each mode, four monotones form the core values (with an optional fifth for emphasized content).

value samples - dark

value samples - light

Thus in the case of a dark background colorscheme, the normal relationship for background and body text is base03:base0 (please note that body text is not base00). Note also that in cases where the background and foreground can be specified as a pair value, text can be highlighted using a combination of base02:base1. The L*a*b lightness difference between base03:base0 and base02:base1 is identical by design, resulting in identical readability against both normal and highlighted backgrounds. An example use case is folded text in Vim which uses base02 for the background and base1 for the foreground.

The values in this example are simply inverted in the case of a light background.

solarized's People

Contributors

adamnbowen avatar adamv avatar alanhamlett avatar altercation avatar anthonydisanti avatar bobthecow avatar borisfaure avatar brantb avatar callahad avatar counterleft avatar deplorableword avatar dscho avatar dstcruz avatar icathing avatar ivanoats avatar jeffmarshall avatar jpo avatar juhasz avatar markstory avatar nelstrom avatar ornicar avatar rcarmo avatar seils avatar sellout avatar sethwoodworth avatar ssiano avatar tpope avatar trevorbramble avatar zakj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

solarized's Issues

TaskPaper Theme

I'd love to see a theme for TaskPaper! If no one gets around to it, I may do it eventually, but I thought I'd put it out there to see if anyone's interested.

ls color highlighting of directories writable by everyone

Great color scheme, but has one annoying problem when using it in .Xresources:
Using "ls --color" on a folder that contains directories writable by everyone gives a very ugly printout since ls also sets a background color. Any good workaround for this?

To test:
$ mkdir a
$ chmod 002 a
$ ls --color .
Look at a in the listing...

Create IntelliJ theme

I have an IntelliJ color scheme for Solarized Dark, but don't know how to extract just the color settings from an IntelliJ config file set. If anyone knows how to do this, let me know, and I can paste in that file.

qt 4 palettes and custom colours

I've posted the relevant snippet of ~/.config/Trolltech.conf as a gist. Just copy and paste it into your file, replacing the possibly existing lines.

:gui results in white background

  1. Start vim from the terminal (either iTerm or Terminal.app).
  2. Run :gui.

The new MacVim window looks like it's using the default color scheme but :colorscheme returns solarized. Running :colorscheme solarized fixes the colors.

Not that good looking in mintty / cygwin

Solarized does not look good on a mintty terminal in Cygwin.

I have 256 colors enabled, and e.g. xoria256 looks decent, too.

Any idea what's going on here?
Looks to me like there is only the 8 color palette available maybe? (&t_Co is 256 though)

(Not really an issue, since it looks good on my good OS (Linux) and I am using gVim mostly on Windows, but wanted to let you know).

Screenshot showing solarized in vim/cygwin in mintty
http://i.imgur.com/MDIMJ.png

Solarized borks less?

Not sure if I just have an incorrect setting, but check the screencap for what man grep looks like.

solarized less via man grep

iterm text color highlighting

I've installed the color theme for iterm, which has worked for the background and standard text, but hasn't provided any color highlighting for file types, prompt, etc.

iterm screenshot

The colorscheme seems to be working in vim through iterm:

vim screenshot

running tests (rspec, etc) seems to colorize passing tests as yellow

I'm running tests and getting passing tests as yellow. They should be green. currently passing = yellow, pending = orange and failing = red. There needs to be better differentiation.

I'm happy to help track down more info but not sure where to start looking. :)

Thanks
James

ansi colors - bright colors/lscolors/dircolors - 256 color remapping

I tried the Solarized colorscheme in both gnome-terminal and uxterm, and I ran into one major problem: Solarized seems to use several of the standard terminal colors (notably bright green and bright blue) as its "base" colors, which makes them lighter/darker versions of the base colors rather than the intended terminal colors. Notably, this means that many standard uses of terminal highlighting, such as the use of color in prompts or ls, will use the base colors rather than something distinctive.

I noticed this particularly with ls: normally, ls highlights directories in bright blue, and executables in bright green, but both of those became variants of the base color, making them much less distinctive except for the use of bold. In particular, executables prove almost completely indistinguishable from normal files, and directories appear bold but not distinguishable by color.

I like the colorscheme in general, and in particular I like that all of the same colors work in both the light and dark versions. However, the use of colors other than black and white (and their bright variants) as base colors breaks the expectations of normal terminal applications.

Irssi theme?

The default Irssi theme doesn't play too well with Solarized Dark. It'd be interesting to see an Irssi theme designed from the ground up to be as well designed and concise as Solarized / it's website.

Output of ls don't reveal colors for dirs nor files.

Hello,

Having problems using your color scheme for iTerm2 to display output with colors. Like colors for the lsoutput, etc.

How can I easily solve this?

PS. This is a bit unrelated, but I'm also unable to set the color scheme for MacVim to be light, not dark. SOLVED! Needed to set the g:solarized_style :)

Ed2t: To make the links in Vim display proper, I needed to set let :solarized_termtrans=1. (When starting Vim without file, you can see the exampels have links almost not displayed.

Also, when using the light scheme for iTerm2, I can see the text input.

Thank you.. Really like this scheme :D

Xdefaults: Dark theme insuficient color diferences

There appears to be very low or none difference between Black and Emphasized black respectively White and Emphasized green in the Dark theme.
First one is used eg in htop to print CPU/RAM usage values. The later one is usually used to distinguish normal and executable files when ls --color=auto, so seems to be rather important. As for the light theme the White and Emphasized green difference is solved nicely.

[gVim] high contrast doesn't work

let g:solarized_contrast="high" before colors solarized with set background=darkdoesn't do anything
here is what I mean:

Contrast bug

also, low contrast makes some text indistinguishable from background

try block in ToggleBG silently throws error

use of try...finally with silent! remap in
togglebackground.vim means that anybody who had already mapped to
something in their normal vimrc would get no error messages, but vim
would still exit with code 1, which breaks most scripts (for example,
git). Please consider other ways of detecting the mapping without
generating an error, or at least put a more prominent message in the
finally block that vim will exit with an error code from the current
session. (via joey l)

RSpec stack trace invisible in iTerm2 with dark theme

The RSpec stack trace shown when a spec fails is pretty much invisible in iTerm2 with the dark theme:

rspec stack trace

I highlighted the second line of the stack trace to make it legible.

Is this something that can be tweaked, or does RSpec need a Solarized theme of its own?

CSS Issue

Using the light theme, hard to see position value:

css issue

Vim in iTerm2

Hey @altercation,

Thanks for a great color scheme. It's pure genius. I have it set up in MacVim and am loving it.

I'm having difficulty setting it up for iTerm2/terminal vim. I downloaded and installed the latest nightly of iTerm2 and successfully imported the color scheme. The terminal window is now nice and blue. However, when I run vim in that terminal there is no syntax highlighting and the background color turns brownish.

image1

image2

I'm using the latest solarized code from the repo.

What am I doing wrong?

Thanks!

Status line and folds are not easy to find.

I like how this scheme looks, so I want to give it a good test drive, but I'm finding something that hasn't happened before to me.

The status line and folds colors are too close to the background (dark), so it's not easy to distinguish where they are. I often find myself looking for them, with other schemes the status line popped in front of my eyes so it was easy to find the limit between windows, the same with folds.

Here is a screenshot.

Notepad++ theme

The "fun" part of this is a lot of it is set per language, and notepad++ supports a lot of languages.

Italic doesn't work on Vim with Monospace font

I'm using Ubuntu Linux, my Vim is configured to use Monospace 11pt. I'm using GVim, and for some reason comments don't come up in Italics. Bolds are a bit hit and miss too, it'd appear to me that the 'def' keyword should show in Bold for both Ruby and Python, but only the Ruby version does.

latest update breaks listchars in X11 vim on OSX

I use vim in an xterm on OSX. I recently did a pull to get the latest version. After this my listchars are badly broken.

Here is my listchar assignment in vimrc:

set listchars=tab:▸\ ,trail:◇,extends:»,precedes:«,eol:¬ 

Now these chars show up as dotted red boxes. (I can provide a screenshot if needed). When the line is highlighted by CursorLine the listchars are normal, but on every other line they are messed up.

The old version I was using (worked correctly):
commit a211ae8
Date: Sat Mar 26 13:25:20 2011 -0700

The new version (not working correctly):
commit 4727d3a
Date: Sun Apr 10 00:10:24 2011 -0700

Matt

troubleshoot terminfo issues resulting in lack of proper 8-15 ansi color display

Reproducible bug: In OS X Terminal.app (tested in snow leopard), when an xterm-256color terminfo file is present ansi colors 0-15 render properly (when referenced as such). When using xterm-color or ansi, only 0-8 render properly and t_Co is still reported as 8. Could set up another check in solarized.vim to set colors as terminal escape sequences.

VIM Toggle function error in X11

Using vim in an xterm on OSX:

Hitting F5 generates this error:

Error detected while processing function 15_TogBG:
line 1:
E121: Undefined variable: g:colors_name
E15: Invalid expression: "colorscheme " . g:colors_name
Press ENTER or type command to continue

The F5 toggle works fine in macvim and AppleTerminal.app.

Using:
commit 4727d3a
Date: Sun Apr 10 00:10:24 2011 -0700

iTerm2 selection colors should not be one of the Solarized colors

The color of "selection" should not be any of the Solarized colors.
It should be slightly different.

This way, text won't just disappear if you happen to drag your mouse over text of a certain color.

For both dark and light palettes, I shifted the brightness of the colors slightly.

Maybe Ethan can come up with 2 new colors for this purpose.

How should bold/bright be handled by terminal emulators?

Original Title of this issue: iTerm2 README should mention bold mode

By default, iTerm2 renders bold text in 2 ways:

  1. bold font
  2. bright colors

The bright colors don't work with a solarized palette. For example, "bold green" would just become gray.

The README should instruct that users uncheck the "Draw bold text in bright colors" for all users.

Add Textmate / Sublime support

Looks like there are tools for automatically converting .tmtheme bundles into vim colorschemes, but not the other way around. sad trombone

If it does happen -- much appreciated!

Vim: search-replace: current match looks the same as other matches

Do something like:

:%s/old/new/gc

in vim. It highlights all matches in the file then selects one of the matches and says

replace with new (y/n//a/q/l/^E/^Y)?

The problem is that with solarized the selected match looks exactly like the other matches, so you don't know which one vim is offerring to replace.

E254: Cannot allocate color error in vim

Everything works fine in MacVim but when I launch vim in OSX terminal I get a whole lot of E254: Cannot allocate color errors. In my .vimrc I have this: let g:solarized_termcolors=16 before colorscheme solarized, after all the errors vim says to Press ENTER or type command to continue if I do that vim launches with white on black.

Terminal transparency

After using the solarized OS X terminal color scheme, I noticed it added a bit of transparency. This is silly, since transparency tends to reduce readability.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.