This adds in @josh's 256-color changes (for some reason, I couldn't manage to pull any changes from the repo). It also rearranges things a bit to keep all the color definitions in a table.
This commit is contained in:
parent
c8e9f41c5c
commit
c51b75d5f5
|
@ -13,26 +13,51 @@
|
|||
(eval-when-compile
|
||||
(require 'color-theme))
|
||||
|
||||
(defvar color-theme-solarized-colors
|
||||
;; name ideal 256
|
||||
'((base03 "#002b36" "#1c1c1c")
|
||||
(base02 "#073642" "#262626")
|
||||
(base01 "#586e75" "#4e4e4e")
|
||||
(base00 "#657b83" "#585858")
|
||||
(base0 "#839496" "#808080")
|
||||
(base1 "#93a1a1" "#8a8a8a")
|
||||
(base2 "#eee8d5" "#d7d7af")
|
||||
(base3 "#fdf6e3" "#ffffd7")
|
||||
(yellow "#b58900" "#af8700")
|
||||
(orange "#cb4b16" "#d75f00")
|
||||
(red "#dc322f" "#af0000")
|
||||
(magenta "#d33682" "#af005f")
|
||||
(violet "#6c71c4" "#5f5faf")
|
||||
(blue "#268bd2" "#0087ff")
|
||||
(cyan "#2aa198" "#00afaf")
|
||||
(green "#859900" "#5f8700"))
|
||||
"This is a table of all the colors used by the Solarized color theme. Each
|
||||
column is a different set, one of which will be chosen based on term
|
||||
capabilities, etc.")
|
||||
|
||||
(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"))
|
||||
(flet ((find-color (name)
|
||||
(let ((index (if (or (<= (display-color-cells) 256)) 2 1)))
|
||||
(nth index (assoc name color-theme-solarized-colors)))))
|
||||
(let ((base03 (find-color 'base03))
|
||||
(base02 (find-color 'base02))
|
||||
(base01 (find-color 'base01))
|
||||
(base00 (find-color 'base00))
|
||||
(base0 (find-color 'base0))
|
||||
(base1 (find-color 'base1))
|
||||
(base2 (find-color 'base2))
|
||||
(base3 (find-color 'base3))
|
||||
(yellow (find-color 'yellow))
|
||||
(orange (find-color 'orange))
|
||||
(red (find-color 'red))
|
||||
(magenta (find-color 'magenta))
|
||||
(violet (find-color 'violet))
|
||||
(blue (find-color 'blue))
|
||||
(cyan (find-color 'cyan))
|
||||
(green (find-color 'green)))
|
||||
(when (eq 'light mode)
|
||||
(rotatef base03 base3)
|
||||
(rotatef base02 base2)
|
||||
|
@ -46,7 +71,8 @@ Ported to Emacs by Greg Pfeil, http://ethanschoonover.com/solarized."
|
|||
(cursor-color . ,base0))
|
||||
;; basic
|
||||
(default ((t (:foreground ,base0))))
|
||||
(cursor ((t (:foreground ,base0 :background ,base03 :inverse-video t))))
|
||||
(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))))
|
||||
|
@ -72,7 +98,8 @@ Ported to Emacs by Greg Pfeil, http://ethanschoonover.com/solarized."
|
|||
(compilation-warning ((t (:foreground ,orange :bold t))))
|
||||
;; customize
|
||||
(custom-button
|
||||
((t (:background ,base02 :box (:line-width 2 :style released-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
|
||||
|
@ -89,7 +116,8 @@ Ported to Emacs by Greg Pfeil, http://ethanschoonover.com/solarized."
|
|||
(diff-changed ((t (:foreground ,yellow :inverse-video t))))
|
||||
(diff-removed ((t (:foreground ,red :inverse-video t))))
|
||||
(diff-header ((t (:background ,base01))))
|
||||
(diff-file-header ((t (:background ,base1 :foreground ,base01 :bold t))))
|
||||
(diff-file-header
|
||||
((t (:background ,base1 :foreground ,base01 :bold t))))
|
||||
(diff-refine-change ((t (:background ,base1))))
|
||||
;; emacs-wiki
|
||||
(emacs-wiki-bad-link-face ((t (:foreground ,red :underline t))))
|
||||
|
@ -174,10 +202,11 @@ Ported to Emacs by Greg Pfeil, http://ethanschoonover.com/solarized."
|
|||
(message-header-xheader ((t (:foreground ,violet))))
|
||||
(message-header-name ((t (:foreground ,cyan))))
|
||||
(message-header-other ((t (:foreground ,red))))
|
||||
(message-header-newsgroups ((t (:foreground ,yellow :bold t :italic t))))
|
||||
(message-header-newsgroups
|
||||
((t (:foreground ,yellow :bold t :italic t))))
|
||||
(message-header-subject ((t (:foreground ,base00))))
|
||||
(message-header-cc ((t (:foreground ,green :bold t))))
|
||||
(message-header-to ((t (:foreground ,base1 :bold t))))))))
|
||||
(message-header-to ((t (:foreground ,base1 :bold t)))))))))
|
||||
|
||||
(defun color-theme-solarized-dark ()
|
||||
(interactive)
|
||||
|
|
Loading…
Reference in New Issue