2 changed files with 85 additions and 193 deletions
@ -1,193 +0,0 @@
|
||||
Solarized Vim Theme |
||||
|
||||
Ethan Schoonover <es@ethanschoonover.com> |
||||
|
||||
Download the latest release and see screenshots/details on use: |
||||
http://ethanschoonover.com/solarized |
||||
|
||||
|
||||
--------------------------------------------------------------------- |
||||
QUICKSTART: |
||||
--------------------------------------------------------------------- |
||||
Put the following two lines in your vimrc: |
||||
|
||||
set background=dark |
||||
colorscheme solarized |
||||
|
||||
or, for the light background mode of Solarized: |
||||
|
||||
set background=light |
||||
colorscheme solarized |
||||
|
||||
Other options are detailed below. |
||||
|
||||
IMPORTANT NOTE FOR TERMINAL USERS: |
||||
If you are running vim in a terminal, Solarized will run in 256 color mode if |
||||
the terminal supports it, but those 256 colors are (in all 256 color terminal |
||||
emulators) limited to a "degraded" color palette. While the colors will all |
||||
approximate the specific Solarized color values, if you prefer an accurate |
||||
color palette you can set the ANSI colors in your terminal and use the 16 |
||||
color terminal mode using the g:solarized_termcolors="16" option detailed |
||||
below. The ANSI color map is specified in the table below and terminal color |
||||
themes are available for download from the web page listed at the top of this |
||||
file, including xorg defaul color values and themes for OS X Terminal.app and |
||||
iTerm 2. |
||||
|
||||
|
||||
--------------------------------------------------------------------- |
||||
LICENSE |
||||
--------------------------------------------------------------------- |
||||
|
||||
|
||||
--------------------------------------------------------------------- |
||||
ABOUT |
||||
--------------------------------------------------------------------- |
||||
|
||||
SOLARIZED is a precisely designed color scheme with unique characteristics: |
||||
|
||||
PRECISION: Solarized is comprised of eight base monotone colors complemented |
||||
by eight accent colors. The monotone colors are specified in L*a*b* |
||||
colorspace for perceptually uniform contrast, even when the palette is |
||||
inverted from dark to light background mode. Accent colors are selected based |
||||
on specific color-wheel relationships to the base monotone series |
||||
(complement, triad, tetrad, split-complement, etc). |
||||
|
||||
INVERSION: Solarized can easily switch from light to dark background mode and |
||||
yet maintains L* (lightness) relationships in the entire base monotone |
||||
palette set. Accent colors retain excellent readability on both light and |
||||
dark backgrounds. Thus the vim solarized colorscheme, for example, can be |
||||
easily modified and extended without any effort spent on maintaining the |
||||
light/dark modes separately; the mode switch is the simple inversion of four |
||||
color values. |
||||
|
||||
READABILITY: Solarized has been designed as a "selective contrast" |
||||
colorscheme (versus the more common high or low contrast schemes). Elements |
||||
which are secondary in importance, or which should minimize their visual |
||||
intrusiveness (e.g. line numbers and comments in vim) use the lower contrast |
||||
base color values, while high value content (e.g. code) uses higher contrast |
||||
base values as well as accent colors. |
||||
|
||||
SCALABILITY: Solarized has been designed to be used both in the full palette |
||||
mode (in text editors where many colors are useful for syntax highlighting) |
||||
as well as in a scaled down five color mode for graphic design purposes (web |
||||
pages). |
||||
|
||||
PERSONALITY: Solarized aims to be flexible in many contexts and as such it |
||||
maintains the common primary and secondary named colors (red, blue, yellow, |
||||
green, etc.). Despite the common nature of these hues, each color has been |
||||
carefully tuned in terms of saturation, luminosity (more accurately, L* |
||||
lightness) so that the entire palette has a rich, warm feel in the accent |
||||
range as evidenced by the ochre yellow and oxygenated blood red, |
||||
complementing the deep-sea blue-greens of the base monotone colors. |
||||
|
||||
On the name: "Solarized" refers to the dual light/dark mode of the palette, |
||||
somewhat analogous to the photographic effect of solarization. The Ian Brown |
||||
album "Solarized" is also on regular rotation in my playlist. |
||||
|
||||
|
||||
--------------------------------------------------------------------- |
||||
COLOR VALUES |
||||
--------------------------------------------------------------------- |
||||
|
||||
Download palettes and files from: http://ethanschoonover.com/solarized |
||||
|
||||
Solarized HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB |
||||
base03 #00141b 8/4 brblack 233 #121212 05 -06 -07 0 20 27 194 100 10 |
||||
base02 #13242a 0/4 black 234 #1c1c1c 13 -06 -06 19 36 42 194 54 16 |
||||
base01 #3f4e53 10/7 brgreen 237 #3a3a3a 32 -05 -05 63 78 83 195 24 33 |
||||
base00 #5e6d73 11/7 bryellow 240 #585858 45 -05 -05 94 109 115 197 18 45 |
||||
base0 #77878c 12/6 brblue 242 #6c6c6c 55 -05 -05 119 135 140 194 15 55 |
||||
base1 #9ba9a7 14/4 brcyan 246 #949494 68 -05 -01 155 169 167 174 8 66 |
||||
base2 #d8dbd4 7/7 white 252 #d0d0d0 87 -02 03 216 219 212 87 3 86 |
||||
base3 #f7f0dd 15/7 brwhite 230 #ffffd7 95 00 10 247 240 221 44 11 97 |
||||
yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 |
||||
orange #bb3e07 9/3 brred 130 #af5f00 45 50 55 187 62 7 18 96 73 |
||||
red #bd000f 1/1 red 124 #af0000 40 65 50 189 0 15 355 100 74 |
||||
magenta #c42376 5/5 magenta 125 #af005f 45 65 -05 196 35 118 329 82 77 |
||||
violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 |
||||
blue #007fc4 4/4 blue 32 #0087d7 50 -10 -45 0 127 196 201 100 77 |
||||
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 |
||||
|
||||
|
||||
--------------------------------------------------------------------- |
||||
OPTIONS |
||||
--------------------------------------------------------------------- |
||||
|
||||
Set these in your vimrc file prior to calling the colorscheme. |
||||
|
||||
option name default optional |
||||
|
||||
------------------------------------------------ |
||||
g:solarized_style = "dark" | "light" |
||||
------------------------------------------------ |
||||
If "solarized_style" isn't set, Solarized will use the value set by |
||||
"background" in your vimrc. I recommend using "background" for simplicity. |
||||
Thus in your vimrc file, the following sequences would set Solarized to |
||||
either dark or light mode, respectively: |
||||
|
||||
set background=dark |
||||
colorscheme solarized |
||||
|
||||
set background=light |
||||
colorscheme solarized |
||||
|
||||
The above is equivalent to: |
||||
|
||||
let g:solarized_style = "dark" |
||||
colorscheme solarized |
||||
|
||||
let g:solarized_style = "light" |
||||
colorscheme solarized |
||||
|
||||
Note that, if set, g:solarized_style overrides the setting for "background". |
||||
|
||||
------------------------------------------------ |
||||
g:solarized_contrast = "normal"| "high" |
||||
------------------------------------------------ |
||||
Solarized has been designed to keep contrast of less critical elements low |
||||
(e.g. comments are lower contrast). Solarized has also been tested on devices |
||||
with a wide variety of gamma values and should perform well on most displays. |
||||
If you find you want to increase contrast for the low contrast items |
||||
(comments, etc.) you can set this value to "high" (default is "normal"). |
||||
I encourage you to use it in normal mode first. |
||||
|
||||
------------------------------------------------ |
||||
g:solarized_termtrans = 0 | 1 |
||||
------------------------------------------------ |
||||
On some terminals (urxvt in my tests) Vim colorthemes may override |
||||
transparency settings of the terminal. Setting this to "1" changes the |
||||
background value in terminal Vim mode to "NONE" allowing your terminal |
||||
background color/transparency to be used for Vim's background. This shouldn't |
||||
be necessary in OSX terminal applications such as Terminal and iTerm2. |
||||
|
||||
------------------------------------------------ |
||||
g:solarized_termcolors= 16 | 256 |
||||
------------------------------------------------ |
||||
A very important setting if you are using Vim in terminals and want accurate |
||||
colors. There are two options: |
||||
16 - Use the named 16 colors of the terminal (red, blue, etc.). In order for |
||||
the colors to be accurately reproduced for this colorscheme, you must set |
||||
your terminal's 16 colors to match Solarized. I list the terminal color |
||||
values in a table above, and also provide downloads of colorscheme for |
||||
command terminal applications from http://ejas.net/solarized |
||||
|
||||
------------------------------------------------ |
||||
g:solarized_degrade = 0 | 1 |
||||
------------------------------------------------ |
||||
Used primarily during testing, this can be set to 1 to force Solarized to |
||||
degrade the hex color values to xterm/256 color approximate matching values. |
||||
Note that while in terminal mode in a 256 color terminal, these degraded |
||||
color values will be used automatically unless you have adjusted your |
||||
terminal's default 16 colors and set g:solarized_termcolors to 16 in your |
||||
vimrc before setting your colorscheme. |
||||
|
||||
------------------------------------------------ |
||||
g:solarized_bold = 1 | 0 |
||||
------------------------------------------------ |
||||
------------------------------------------------ |
||||
g:solarized_underline = 1 | 0 |
||||
------------------------------------------------ |
||||
------------------------------------------------ |
||||
g:solarized_italic = 0 | 1 |
||||
------------------------------------------------ |
||||
@ -0,0 +1,85 @@
|
||||
Solarized Colorscheme for Vim |
||||
============================= |
||||
|
||||
Developed by Ethan Schoonover <es@ethanschoonover.com> |
||||
|
||||
See the [homepage for the Solarized colorscheme][solarized] for screenshots, |
||||
details and colorscheme versions for Vim, Mutt, popular terminal emulators and |
||||
other applications. |
||||
|
||||
If you have come across this colorscheme via the [vim-only repository on |
||||
github][vim-solarized-github], or the [vim.org script page][vimorg-script] see |
||||
the link above to the Solarized homepage or |
||||
visit the [github repository for Solarized][solarized-github]. |
||||
|
||||
[solarized]: http://ethanschoonover.com/solarized |
||||
[solarized-github]: https://github.com/altercation/solarized |
||||
[vim-solarized-github]: https://github.com/altercation/vim-colors-solarized |
||||
[vimorg-script]: http://vim.org/script |
||||
|
||||
Installation |
||||
------------ |
||||
|
||||
Put the following two lines in your vimrc: |
||||
|
||||
set background=dark |
||||
colorscheme solarized |
||||
|
||||
or, for the light background mode of Solarized: |
||||
|
||||
set background=light |
||||
colorscheme solarized |
||||
|
||||
See the [Solarized homepage][solarized] for screenshots which will help you |
||||
select either the light or dark background. |
||||
|
||||
Advanced Configuration |
||||
---------------------- |
||||
|
||||
**IMPORTANT NOTE FOR TERMINAL USERS** |
||||
If you are running vim in a terminal, Solarized will run in 256 color mode if |
||||
the terminal supports it, but those 256 colors are (in all 256 color terminal |
||||
emulators) limited to a "degraded" color palette. While the colors will all |
||||
approximate the specific Solarized color values, if you prefer an accurate |
||||
color palette you can set the ANSI colors in your terminal and use the 16 color |
||||
terminal mode using the g:solarized_termcolors="16" option detailed below. The |
||||
ANSI color map is specified in the table below and terminal color themes are |
||||
available for download from the web page listed at the top of this file, |
||||
including xorg defaul color values and themes for OS X Terminal.app and iTerm2. |
||||
|
||||
Code Notes |
||||
---------- |
||||
|
||||
Use folding to view the `solarized.vim` script with `foldmethod=marker` turned |
||||
on. |
||||
|
||||
I have attempted to modularize the creation of Vim colorschemes in this script |
||||
and, while it could be refactored further, it should be a good foundation for |
||||
the creation of any color scheme. By simply changing the sixteen values in the |
||||
GUI section and testing in gvim (or mvim) you can rapidly prototype new |
||||
colorschemes without diving into the weeds of line-item editing each syntax |
||||
highlight declaration. |
||||
|
||||
|
||||
License |
||||
------- |
||||
Copyright (c) 2011 Ethan Schoonover |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in |
||||
all copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
THE SOFTWARE. |
||||
|
||||
Loading…
Reference in new issue