Browse Source
git-subtree-dir: emacs-colors-solarized git-subtree-mainline:pull/61/head2915a46ec9git-subtree-split:147d36e31b
3 changed files with 428 additions and 0 deletions
@ -0,0 +1,20 @@
|
||||
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. |
||||
|
||||
@ -0,0 +1,277 @@
|
||||
Solarized |
||||
========= |
||||
|
||||
### [See official homepage for full content](http://ethanschoonover.com/solarized) |
||||
|
||||
## Precision colors for machines and people |
||||
|
||||
[](#features)\ |
||||
|
||||
|
||||
Solarized is a sixteen color palette (eight monotones, eight accent colors) |
||||
designed for use with terminal and gui applications. It has several [unique |
||||
properties](#features). I designed this colorscheme with both precise |
||||
[CIELAB](http://en.wikipedia.org/wiki/Lab_color_space) 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. |
||||
|
||||
\ |
||||
|
||||
Currently available in formats for (cf [screenshots](#screenshots) below): |
||||
|
||||
* **Vim** (the Vim-only portion of Solarized is [available |
||||
here](https://github.com/altercation/vim-colors-solarized), for use with |
||||
Pathogen, etc.) |
||||
* **Mutt** e-mail client (*just* the Mutt colorscheme is [available |
||||
here](https://github.com/altercation/mutt-colors-solarized)) |
||||
* **Xresources** / Xdefaults |
||||
* **iTerm2** |
||||
* OS X **Terminal.app** |
||||
* Adobe Photoshop Palette (inc. L\*a\*b values) |
||||
* Apple Color Picker Palette |
||||
* 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. |
||||
|
||||
**Note:** I am still tweaking the Vim highlighting for specific syntaxes and |
||||
welcome feedback on these. |
||||
|
||||
Download |
||||
-------- |
||||
|
||||
### [Click here to download latest version](http://ethanschoonover.com/files/solarized/solarized.tar.gz) |
||||
|
||||
Or use the following links to access application specific downloads and git |
||||
repositories: |
||||
|
||||
* **Git repo:** |
||||
|
||||
The full git repository is at: <https://github.com/altercation/solarized> |
||||
Get it using the following command: |
||||
|
||||
$ git clone git://github.com/altercation/solarized.git |
||||
|
||||
* **Vim only:** |
||||
|
||||
The vim-only colorscheme (Pathogen ready) is available at: |
||||
<https://github.com/altercation/vim-colors-solarized>. |
||||
|
||||
$ git clone git://github.com/altercation/vim-colors-solarized.git |
||||
|
||||
You can also download it from [vim.org](http://www.vim.org/scripts/script.php?script_id=3520). |
||||
|
||||
* **Mutt only:** |
||||
|
||||
The mutt-only variants can be cloned from |
||||
<https://github.com/altercation/mutt-colors-solarized> |
||||
|
||||
$ git clone git://github.com/altercation/mutt-colors-solarized.git |
||||
|
||||
* **Canonical Project Page:** |
||||
|
||||
Downloads, screenshots and more information are always available from the |
||||
project page: <http://ethanschoonover.com/solarized> |
||||
|
||||
Note that through the magic of |
||||
[git-subtree](https://github.com/apenwarr/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 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** |
||||
|
||||
\ |
||||
|
||||
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 works as a sixteen color palette for compatibility with common |
||||
terminal based applications / emulators. In addition, it has been carefull |
||||
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. |
||||
|
||||
5. **Precision, 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. |
||||
|
||||
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: #d30102; |
||||
$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; |
||||
} |
||||
|
||||
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. |
||||
|
||||
 |
||||
 |
||||
|
||||
Clockwise from upper left: Menlo, Letter Gothic, Terminus, Andale Mono |
||||
|
||||
Screenshots |
||||
----------- |
||||
|
||||
Click to view. |
||||
|
||||
### Mutt |
||||
|
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-mutt-dark.png) |
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-mutt-light.png) |
||||
|
||||
### C (Vim) |
||||
|
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-c-dark.png) |
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-c-light.png) |
||||
|
||||
### Haskell (Vim) |
||||
|
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-haskell-dark.png) |
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-haskell-light.png) |
||||
|
||||
### HTML (Vim) |
||||
|
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-html-dark.png) |
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-html-light.png) |
||||
|
||||
### Java (Vim) |
||||
|
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-java-dark.png) |
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-java-light.png) |
||||
|
||||
### Pandoc Markdown (Vim) |
||||
|
||||
These screen shots show Vim running with my own [Pandoc Kit |
||||
Syntax](/pandockit). |
||||
|
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-pandoc-dark.png) |
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-pandoc-light.png) |
||||
|
||||
### Perl (Vim) |
||||
|
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-perl-dark.png) |
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-perl-light.png) |
||||
|
||||
### Python (Vim) |
||||
|
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-python-dark.png) |
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-python-light.png) |
||||
|
||||
### Ruby (Vim) |
||||
|
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-ruby-dark.png) |
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-ruby-light.png) |
||||
|
||||
### TeX (Vim) |
||||
|
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-tex-dark.png) |
||||
[](https://github.com/altercation/solarized/raw/master/img/solarized-screen-tex-light.png) |
||||
|
||||
|
||||
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 |
||||
|
||||
@ -0,0 +1,131 @@
|
||||
;;; Author: Ethan Schoonover, Solarized; Greg Pfeil, Emacs adaptation |
||||
;;; URL: http://ethanschoonover.com/solarized |
||||
|
||||
;;; This file is not (YET) part of GNU Emacs. |
||||
|
||||
;;; # Usage |
||||
|
||||
;;; 1. Install the color-theme package |
||||
;;; (http://www.emacswiki.org/cgi-bin/wiki/ColorTheme) |
||||
;;; 2. Load this file |
||||
;;; 3. M-x color-theme-solarized-[dark|light] |
||||
|
||||
(eval-when-compile |
||||
(require 'color-theme)) |
||||
|
||||
(defun color-theme-solarized (mode) |
||||
"Color theme by Ethan Schoonover, created 2011-03-24. |
||||
Ported to Emacs by Greg Pfeil, http://ethanschoonover.com/solarized." |
||||
(interactive "Slight or dark? ") |
||||
(let ((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")) |
||||
(when (eq 'light mode) |
||||
(rotatef base03 base3) |
||||
(rotatef base02 base2) |
||||
(rotatef base01 base1) |
||||
(rotatef base00 base0)) |
||||
(color-theme-install |
||||
`(color-theme-solarized |
||||
((foreground-color . ,base0) |
||||
(background-color . ,base03) |
||||
(background-mode . ,mode) |
||||
(cursor-color . ,base0)) |
||||
;; basic |
||||
(default ((t (:foreground ,base0)))) |
||||
(cursor ((t (:foreground ,base0 :background ,base03 :inverse-video t)))) |
||||
(escape-glyph-face ((t (:foreground ,red)))) |
||||
(fringe ((t (:foreground ,base01 :background ,base02)))) |
||||
(header-line ((t (:foreground ,base0 :background ,base2)))) |
||||
(highlight ((t (:background ,base02)))) |
||||
(isearch ((t (:foreground ,yellow :inverse-video t)))) |
||||
(menu ((t (:foreground ,base0 :background ,base02)))) |
||||
(minibuffer-prompt ((t (:foreground ,blue)))) |
||||
(mode-line |
||||
((t (:foreground ,base1 :background ,base02 |
||||
:box (:line-width 1 :color ,base1))))) |
||||
(mode-line-buffer-id ((t (:foreground ,base1)))) |
||||
(mode-line-inactive |
||||
((t (:foreground ,base0 :background ,base02 |
||||
:box (:line-width 1 :color ,base02))))) |
||||
(region ((t (:background ,base02)))) |
||||
(secondary-selection ((t (:background ,base02)))) |
||||
(trailing-whitespace ((t (:foreground ,red :inverse-video t)))) |
||||
(vertical-border ((t (:foreground ,base0)))) |
||||
;; compilation |
||||
(compilation-info ((t (:forground ,green :bold t)))) |
||||
(compilation-warning ((t (:foreground ,orange :bold t)))) |
||||
;; customize |
||||
(custom-button |
||||
((t (:background ,base02 :box (:line-width 2 :style released-button))))) |
||||
(custom-button-mouse ((t (:inherit custom-button :foreground ,base1)))) |
||||
(custom-button-pressed |
||||
((t (:inherit custom-button-mouse |
||||
:box (:line-width 2 :style pressed-button))))) |
||||
(custom-comment-tag ((t (:background ,base02)))) |
||||
(custom-comment-tag ((t (:background ,base02)))) |
||||
(custom-documentation ((t (:inherit default)))) |
||||
(custom-group-tag ((t (:foreground ,orange :bold t)))) |
||||
(custom-link ((t (:foreground ,violet)))) |
||||
(custom-state ((t (:foreground ,green)))) |
||||
(custom-variable-tag ((t (:foreground ,orange :bold t)))) |
||||
;; diff |
||||
(diff-added ((t (:foreground ,green :inverse-video t)))) |
||||
(diff-changed ((t (:foreground ,yellow :inverse-video t)))) |
||||
(diff-removed ((t (:foreground ,red :inverse-video t)))) |
||||
;; emacs-wiki |
||||
(emacs-wiki-bad-link-face ((t (:foreground ,red :underline t)))) |
||||
(emacs-wiki-link-face ((t (:foreground ,blue :underline t)))) |
||||
(emacs-wiki-verbatim-face ((t (:foreground ,base00 :underline t)))) |
||||
;; font-lock |
||||
(font-lock-builtin-face ((t (:foreground ,green)))) |
||||
(font-lock-comment-face ((t (:foreground ,base01 :italic t)))) |
||||
(font-lock-constant-face ((t (:foreground ,cyan)))) |
||||
(font-lock-function-name-face ((t (:foreground ,blue)))) |
||||
(font-lock-keyword-face ((t (:foreground ,green)))) |
||||
(font-lock-string-face ((t (:foreground ,cyan)))) |
||||
(font-lock-type-face ((t (:foreground ,yellow)))) |
||||
(font-lock-variable-name-face ((t (:foreground ,blue)))) |
||||
(font-lock-warning-face ((t (:foreground ,red :bold t)))) |
||||
;; info |
||||
(info-xref ((t (:foreground ,blue :underline t)))) |
||||
(info-xref-visited ((t (:inherit info-xref :foreground ,magenta)))) |
||||
;; org |
||||
(org-hide ((t (:foreground ,base03)))) |
||||
(org-todo ((t (:foreground ,red :bold t)))) |
||||
(org-done ((t (:foreground ,green :bold t)))) |
||||
;; show-paren |
||||
(show-paren-match-face ((t (:background ,cyan :foreground ,base3)))) |
||||
(show-paren-mismatch-face ((t (:background ,red :foreground ,base3)))))))) |
||||
|
||||
(defun color-theme-solarized-dark () |
||||
(interactive) |
||||
(color-theme-solarized 'dark)) |
||||
|
||||
(defun color-theme-solarized-light () |
||||
(interactive) |
||||
(color-theme-solarized 'light)) |
||||
|
||||
(add-to-list 'color-themes |
||||
'(color-theme-solarized-light |
||||
"Solarized Light" |
||||
"Ethan Schoonover & Greg Pfeil <greg@technomadic.org>")) |
||||
(add-to-list 'color-themes |
||||
'(color-theme-solarized-dark |
||||
"Solarized Dark" |
||||
"Ethan Schoonover & Greg Pfeil <greg@technomadic.org>")) |
||||
|
||||
(provide 'color-theme-solarized) |
||||
Loading…
Reference in new issue