You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

devalot-theme.el 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. ;;; devalot-theme.el --- Solarized-based custom theme for faces.
  2. ;;
  3. ;; Copyright (C) 2007-2012 Peter Jones <pjones@pmade.com>
  4. ;;
  5. ;; Permission is hereby granted, free of charge, to any person obtaining
  6. ;; a copy of this software and associated documentation files (the
  7. ;; "Software"), to deal in the Software without restriction, including
  8. ;; without limitation the rights to use, copy, modify, merge, publish,
  9. ;; distribute, sublicense, and/or sell copies of the Software, and to
  10. ;; permit persons to whom the Software is furnished to do so, subject to
  11. ;; the following conditions:
  12. ;;
  13. ;; The above copyright notice and this permission notice shall be
  14. ;; included in all copies or substantial portions of the Software.
  15. ;;
  16. ;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  17. ;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  18. ;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  19. ;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  20. ;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  21. ;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  22. ;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23. ;;
  24. ;;; Commentary
  25. ;;
  26. ;; The majority of the colors in this theme come from the Solarized
  27. ;; palette, which is released under an MIT license:
  28. ;; https://github.com/altercation/solarized.
  29. ;;
  30. ;;
  31. ;;; Code:
  32. (deftheme devalot "A theme loosely based on solarized.")
  33. ;; Create the faces if they don't already exist.
  34. (put 'devalot 'theme-immediate t)
  35. ;;; Notes
  36. ;; * To see all faces in effect: list-faces-display
  37. ;; * To see all colors: list-colors-display
  38. (let ((yellow "#b58900")
  39. (yellow-high "#b5a924")
  40. (orange "#cb4b16")
  41. (orange-high "#cb683f")
  42. (red "#dc322f")
  43. (red-high "#dc5c5a")
  44. (magenta "#d33682")
  45. (magenta-high "#d36198")
  46. (violet "#6c71c4")
  47. (violet-high "#9396c4")
  48. (blue "#268bd2")
  49. (blue-high "#509cd2")
  50. (cyan "#2aa198")
  51. (cyan-high "#4aa19a")
  52. (green "#859900")
  53. (green-high "#88b324")
  54. (bg-normal "#222222")
  55. (bg-off "#003340")
  56. (bg-high "#083d4a")
  57. (bg-low "#2a2a2a")
  58. (bg-inverse "#fdf6e3")
  59. (fg-normal "#839496")
  60. (fg-low "#586e75")
  61. (fg-high "#93a1a1")
  62. (fg-inverse "#657b83")
  63. (class '((class color) (min-colors 89))))
  64. (custom-theme-set-faces
  65. 'devalot
  66. `(default ((((type graphic)) (:background ,bg-normal :foreground ,fg-normal))))
  67. `(cursor ((t (:background ,magenta-high :foreground ,bg-normal))))
  68. `(error ((t (:foreground ,red-high))))
  69. `(warning ((t (:foreground ,yellow-high))))
  70. `(success ((t (:foreground ,green-high))))
  71. `(match ((t (:background ,bg-high :foreground ,fg-normal))))
  72. `(fringe ((t (:background ,bg-low :foreground ,fg-low))))
  73. `(lazy-highlight ((t (:background ,bg-high :foreground ,magenta-high))))
  74. `(isearch ((t (:background ,magenta :foreground ,bg-inverse :bold t))))
  75. `(region ((t (:background ,bg-high))))
  76. `(highlight ((t (:background ,green-high :foreground ,bg-low))))
  77. `(hl-line ((t (:inherit 'highlight))))
  78. `(link ((,class (:underline ,blue-high :foreground ,fg-normal))
  79. (t (:underline "blue" :foreground "blue"))))
  80. ;; Show paren
  81. `(show-paren-match ((t (:background ,bg-inverse :foreground ,blue :bold t))))
  82. ;; Font-lock
  83. `(font-lock-builtin-face ((t (:foreground ,fg-low))))
  84. `(font-lock-comment-delimiter-face ((t (:foreground ,fg-low :bold t))))
  85. `(font-lock-comment-face ((t (:foreground ,violet :italic t))))
  86. `(font-lock-constant-face ((t (:foreground ,yellow))))
  87. `(font-lock-function-name-face ((t (:foreground ,orange :bold t))))
  88. `(font-lock-keyword-face ((t (:foreground ,green :bold t))))
  89. `(font-lock-preprocessor-face ((t (:foreground ,red))))
  90. `(font-lock-string-face ((t (:foreground ,violet-high))))
  91. `(font-lock-type-face ((t (:foreground ,blue :bold t))))
  92. `(font-lock-variable-name-face ((t (:foreground ,magenta-high))))
  93. `(font-lock-warning-face ((t (:foreground ,magenta :background ,bg-off :bold t))))
  94. ;; Minibuffer
  95. `(minibuffer-noticeable-prompt ((t (:foreground ,red-high :bold t))))
  96. `(minibuffer-prompt ((t (:foreground ,magenta :bold t))))
  97. ;; Modeline and Things in the Modeline
  98. `(modeline ((,class (:background ,green :foreground ,bg-normal :box (:line-width 1 :style released-button)))
  99. (t (:background "green" :foreground "black"))))
  100. `(mode-line-inactive ((t (:background ,bg-low :foreground ,fg-low :box (:line-width 1 :style released-button)))))
  101. `(modeline-mousable ((t (:background ,bg-high :foreground ,fg-normal))))
  102. `(modeline-mousable-minor-mode ((t (:background ,bg-high :foreground ,bg-high))))
  103. ;; Flyspell
  104. `(flyspell-duplicate ((t (:foreground ,yellow-high :underline ,yellow))))
  105. `(flyspell-incorrect ((t (:foreground ,magenta-high :underline ,red))))
  106. ;; Dired
  107. `(dired-directory ((t (:foreground ,blue :bold t))))
  108. `(dired-flagged ((t (:foreground ,magenta-high))))
  109. `(dired-header ((t (:foreground ,orange))))
  110. `(dired-ignored ((t (:foreground ,fg-low))))
  111. `(dired-mark ((t (:foreground ,yellow))))
  112. `(dired-marked ((t (:foreground ,yellow-high))))
  113. `(dired-perm-write ((t (:foreground ,fg-high))))
  114. `(dired-symlink ((t (:foreground ,cyan))))
  115. `(dired-warning ((t (:underline ,yellow-high))))
  116. ;; Outline Mode
  117. `(outline-1 ((,class (:foreground ,blue-high :bold t))
  118. (t (:foreground "blue" :bold t))))
  119. `(outline-2 ((,class (:foreground ,green-high :bold t))
  120. (t (:foreground "green" :bold t))))
  121. `(outline-3 ((,class (:foreground ,cyan-high :bold nil))
  122. (t (:foreground "cyan" :bold t))))
  123. `(outline-4 ((,class (:foreground ,orange :bold nil))
  124. (t (:foreground "orange" :bold t))))
  125. `(outline-5 ((,class (:foreground ,yellow-high :bold nil))
  126. (t (:foreground "magenta"))))
  127. ;; Org-Mode
  128. `(org-level-1 ((t (:inherit 'outline-1))))
  129. `(org-level-2 ((t (:inherit 'outline-2))))
  130. `(org-level-3 ((t (:inherit 'outline-3))))
  131. `(org-level-4 ((t (:inherit 'outline-4 :italic t))))
  132. `(org-level-5 ((t (:inherit 'outline-5))))
  133. `(org-archived ((t (:inherit 'font-lock-string-face))))
  134. `(org-document-title ((t (:inherit 'font-lock-comment-delimiter-face))))
  135. `(org-document-info-keyword ((t (:inherit 'font-lock-keyword-face))))
  136. `(org-meta-line ((t (:inherit 'font-lock-constant-face))))
  137. `(org-link ((t (:inherit 'link))))
  138. `(org-agenda-date ((t (:inherit 'outline-1))))
  139. `(org-agenda-date-weekend ((t (:inherit 'outline-1))))
  140. `(org-agenda-structure ((t (:foreground ,violet))))
  141. `(org-agenda-clocking ((t (:background ,bg-off))))
  142. `(org-scheduled-today ((t (:inherit 'font-lock-comment-face))))
  143. `(org-scheduled-previously ((t (:inherit 'font-lock-warning-face))))
  144. `(org-upcoming-deadline ((t (:inherit 'font-lock-string-face))))
  145. `(org-warning ((t (:inherit 'font-lock-warning-face))))
  146. `(org-date ((t (:foreground ,fg-low))))
  147. `(org-tag ((t (:foreground ,fg-low))))
  148. `(org-tag-default ((t (:inherit 'org-tag))))
  149. `(org-column ((t (:background ,bg-low))))
  150. `(org-column-title ((t (:inherit 'mode-line :background ,orange-high))))
  151. `(org-checkbox ((t (:inherit 'mode-line :background ,green))))
  152. `(org-todo ((t (:inherit 'mode-line :background ,red))))
  153. `(org-done ((t (:inherit 'mode-line :background ,green))))
  154. `(org-hide ((,class (:foreground ,bg-off))
  155. (t (:foreground "black"))))
  156. `(org-special-keyword ((,class (:foreground ,fg-low))
  157. (t (:foreground "gray"))))
  158. `(org-code ((,class (:inherit 'font-lock-keyword-face :bold nil))
  159. (nil (:foreground "green"))))
  160. `(org-block ((t (:inherit 'org-code))))
  161. `(org-block-begin-line ((t (:inherit 'org-special-keyword))))
  162. `(org-block-end-line ((t (:inherit 'org-block-begin-line))))
  163. ;; ERB (Ruby Embedded in HTML)
  164. `(erb-face ((t (:background ,bg-normal :foreground ,fg-normal))))
  165. `(erb-delim-face ((,class (:foreground ,fg-low)) (t (:foreground "magenta"))))
  166. `(erb-out-face ((t (:background ,bg-normal :foreground ,fg-normal))))
  167. `(erb-out-delim-face ((,class (:foreground ,blue :background ,bg-normal)) (t (:foreground "blue"))))
  168. `(erb-comment-delim-face ((t (:foreground ,fg-low :bold t))))
  169. `(erb-comment-face ((t (:foreground ,violet :italic t))))
  170. ;; Diff Mode
  171. `(diff-added ((t (:foreground ,green))))
  172. `(diff-changed ((t (:foreground ,yellow))))
  173. `(diff-removed ((t (:foreground ,red))))
  174. `(diff-indicator-added ((t (:foreground ,green :background ,bg-low))))
  175. `(diff-indicator-chnaged ((t (:foreground ,yellow :background ,bg-low))))
  176. `(diff-indicator-removed ((t (:foreground ,red :background ,bg-low))))
  177. `(diff-context ((t (:foreground ,fg-low))))
  178. ;; Magit (Git GUI)
  179. `(magit-diff-add ((t (:inherit 'diff-added))))
  180. `(magit-diff-del ((t (:inherit 'diff-removed))))
  181. `(magit-diff-file-header ((t (:inherit 'font-lock-constant-face))))
  182. `(magit-diff-hunk-header ((t (:inherit 'font-lock-keyword-face))))
  183. `(magit-diff-none ((t (:inherit 'font-lock-comment-delimiter-face))))
  184. `(magit-branch ((t (:inherit 'font-lock-comment-face))))
  185. `(magit-header ((t (:inherit 'outline-1))))
  186. `(magit-item-highlight ((t (:background ,bg-low))))
  187. ;; Compilation
  188. `(compilation-info ((t (:inherit 'font-lock-string-face :bold t))))
  189. `(compilation-error ((t (:underline ,red :bold t))))
  190. `(compilation-line-number ((t (:foreground ,orange :bold t))))
  191. `(flymake-errline ((t :underline ,magenta-high :background ,bg-off, :foreground ,magenta-high)))
  192. `(flymake-warnline ((t :underline ,yellow ,bg-normal)))
  193. ;; nXML
  194. `(nxml-element-colon-face ((t (:inherit 'font-lock-type-face))))
  195. `(nxml-element-prefix-face ((t (:inherit 'font-lock-keyword-face))))
  196. `(nxml-attribute-value-delimiter-face ((t (:inherit 'font-lock-string-face))))
  197. `(nxml-cdata-section-content-face ((t (:inherit 'font-lock-string-face))))
  198. `(nxml-attribute-value-face ((t (:inherit 'font-lock-string-face))))
  199. `(nxml-attribute-local-name-face ((t (:inherit 'font-lock-constant-face))))
  200. `(nxml-entity-ref-name-face ((t (:inherit 'font-lock-constant-face))))
  201. `(nxml-element-colon-face ((t (:inherit 'font-lock-function-name-face))))
  202. `(nxml-element-prefix-face ((t (:inherit 'font-lock-function-name-face))))
  203. `(nxml-element-local-name-face ((t (:inherit 'font-lock-function-name-face))))
  204. `(nxml-tag-delimiter-face ((t (:inherit 'font-lock-function-name-face))))
  205. `(nxml-tag-slash-face ((t (:inherit 'font-lock-function-name-face))))
  206. `(nxml-comment-delimiter-face ((t (:inherit 'font-lock-comment-delimiter-face))))
  207. `(nxml-comment-content-face ((t (:inherit 'font-lock-comment-face))))
  208. ;; ido
  209. `(ido-first-match ((t (:foreground ,magenta-high))))
  210. `(ido-only-match ((t (:foreground ,green :bold t))))
  211. `(ido-subdir ((t (:foreground ,blue :bold t))))
  212. `(ido-virtual ((t (:foreground ,fg-low))))
  213. ;; rcIRC
  214. `(rcirc-track-nick ((t (:foreground ,fg-low :bold t))))
  215. `(rcirc-track-keyword ((t (:inherit 'rcirc-track-nick))))
  216. `(rcirc-server ((t (:foreground ,fg-high))))
  217. `(rcirc-timestamp ((t (:inherit 'rcirc-server))))
  218. `(rcirc-my-nick ((t (:foreground ,violet))))
  219. `(rcirc-url ((t (:inherit 'link))))
  220. ;; Message mode (mail)
  221. `(message-header-subject ((t (:inherit 'default :bold t))))
  222. ;; LaTeX
  223. `(font-latex-sectioning-0-face ((t (:inherit 'outline-1 :height 1.0))))
  224. `(font-latex-sectioning-1-face ((t (:inherit 'font-latex-sectioning-0-face))))
  225. `(font-latex-sectioning-2-face ((t (:inherit 'font-latex-sectioning-0-face))))
  226. `(font-latex-sectioning-3-face ((t (:inherit 'font-latex-sectioning-0-face))))
  227. `(font-latex-sectioning-4-face ((t (:inherit 'font-latex-sectioning-0-face))))
  228. `(font-latex-sectioning-5-face ((t (:inherit 'font-latex-sectioning-0-face))))
  229. ;; Whitespace Mode
  230. `(whitespace-tab ((t (:background ,bg-low))))
  231. `(whitespace-trailing ((t (:background ,bg-normal :foreground ,fg-normal))))
  232. `(whitespace-empty ((t (:background ,bg-normal :foreground ,fg-normal))))
  233. `(whitespace-line ((t (:background ,bg-normal :underline ,bg-off))))
  234. ;; Remaining Junk
  235. `(completion-dynamic-face ((t (:inherit 'match))))))
  236. ;;;###autoload
  237. (when load-file-name
  238. (add-to-list 'custom-theme-load-path
  239. (file-name-as-directory (file-name-directory load-file-name))))
  240. (provide-theme 'devalot)