color-theme-tomorrow.el 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. ;;; color-theme-tomorrow.el --- GNU Emacs port of the Tomorrow Theme.
  2. ;;; Commentary:
  3. ;;
  4. ;;; Tomorrow Theme
  5. ;;
  6. ;; Originally by Chris Kempson https://github.com/ChrisKempson/Tomorrow-Theme
  7. ;; Ported to GNU Emacs by Chris Charles
  8. (require 'color-theme)
  9. ;;; Code:
  10. (defun color-theme-tomorrow-real (&optional variant)
  11. "Enable the appropriate Tomorrow theme based on VARIANT.
  12. VARIANT can be 'night, 'night-eighties, 'night-blue or
  13. 'night-bright. If VARIANT is not present, the light Tomorrow
  14. theme will be used."
  15. (let ((background "#ffffff")
  16. (current-line "#e9efff")
  17. (selection "#d6d6d6")
  18. (foreground "#4d4d4c")
  19. (comment "#8e908c")
  20. (cursor "#aeafad")
  21. (red "#c82829")
  22. (orange "#f5871f")
  23. (yellow "#eab700")
  24. (green "#718c00")
  25. (aqua "#3e999f")
  26. (blue "#4271ae")
  27. (purple "#8959a8"))
  28. (cond ((eq variant 'night)
  29. (setq background "#1d1f21"
  30. current-line "#282a2e"
  31. selection "#373b41"
  32. foreground "#c5c8c6"
  33. comment "#969896"
  34. cursor "#aeafad"
  35. red "#cc6666"
  36. orange "#de935f"
  37. yellow "#f0c674"
  38. green "#b5bd68"
  39. aqua "#8abeb7"
  40. blue "#81a2be"
  41. purple "#b294bb"))
  42. ((eq variant 'night-eighties)
  43. (setq background "#2d2d2d"
  44. current-line "#393939"
  45. selection "#515151"
  46. foreground "#cccccc"
  47. comment "#999999"
  48. cursor "#cccccc"
  49. red "#f2777a"
  50. orange "#f99157"
  51. yellow "#ffcc66"
  52. green "#99cc99"
  53. aqua "#66cccc"
  54. blue "#6699cc"
  55. purple "#cc99cc"))
  56. ((eq variant 'night-blue)
  57. (setq background "#002451"
  58. current-line "#00346e"
  59. selection "#003f8e"
  60. foreground "#ffffff"
  61. comment "#7285b7"
  62. cursor "#ffffff"
  63. red "#ff9da4"
  64. orange "#ffc58f"
  65. yellow "#ffeead"
  66. green "#d1f1a9"
  67. aqua "#99ffff"
  68. blue "#bbdaff"
  69. purple "#ebbbff"))
  70. ((eq variant 'night-bright)
  71. (setq background "#000000"
  72. current-line "#2a2a2a"
  73. selection "#424242"
  74. foreground "#eaeaea"
  75. comment "#969896"
  76. cursor "#9f9f9f"
  77. red "#d54e53"
  78. orange "#e78c45"
  79. yellow "#e7c547"
  80. green "#b9ca4a"
  81. aqua "#70c0b1"
  82. blue "#7aa6da"
  83. purple "#c397d8")))
  84. (color-theme-install
  85. `(color-theme-tomorrow-real
  86. ((background . ,background)
  87. (background-mode . dark)
  88. (border-color . ,cursor)
  89. (cursor-color . ,cursor)
  90. (foreground-color . ,foreground))
  91. ;; Built-in stuff (Emacs 23)
  92. (default ((t (:background ,background :foreground ,foreground))))
  93. (error ((t (:foreground ,red))))
  94. (escape-glyph ((t (:foreground ,aqua))))
  95. (fringe ((t (:background ,current-line))))
  96. (highlight ((t (:background ,green :foreground ,current-line))))
  97. (link ((t (:foreground ,blue))))
  98. (link-visited ((t (:foreground ,purple))))
  99. (minibuffer-prompt ((t (:foreground ,blue))))
  100. (mode-line ((t (:background ,selection :foreground ,foreground))))
  101. (mode-line-inactive ((t (:background ,current-line :foreground ,foreground))))
  102. (region ((t (:background ,selection))))
  103. (secondary-selection ((t (:background ,blue))))
  104. (shadow ((t (:foreground ,comment))))
  105. (success ((t (:foreground ,green))))
  106. (trailing-whitespace ((t (:background ,red))))
  107. (warning ((t (:foreground ,orange))))
  108. ;; Font-lock stuff
  109. (font-lock-builtin-face ((t (:foreground ,aqua))))
  110. (font-lock-comment-face ((t (:foreground ,comment))))
  111. (font-lock-constant-face ((t (:foreground ,aqua))))
  112. (font-lock-doc-string-face ((t (:foreground ,comment))))
  113. (font-lock-function-name-face ((t (:foreground ,blue))))
  114. (font-lock-keyword-face ((t (:foreground ,purple))))
  115. (font-lock-string-face ((t (:foreground ,green))))
  116. (font-lock-type-face ((t (:foreground ,yellow))))
  117. (font-lock-variable-name-face ((t (:foreground ,orange))))
  118. (font-lock-warning-face ((t (:foreground ,red))))
  119. ;; hl-line-mode
  120. (hl-line ((t (:background ,current-line))))
  121. ;; linum-mode
  122. (linum ((t (:background ,current-line :foreground ,foreground))))
  123. ;; org-mode
  124. (org-date ((t (:foreground ,purple))))
  125. (org-done ((t (:foreground ,green))))
  126. (org-hide ((t (:foreground ,current-line))))
  127. (org-link ((t (:foreground ,blue))))
  128. (org-todo ((t (:foreground ,red))))
  129. ;; show-paren-mode
  130. (show-paren-match-face ((t (:background ,blue :foreground ,current-line))))
  131. (show-paren-mismatch-face ((t (:background ,orange :foreground ,current-line))))
  132. ;; whitespace-mode
  133. (whitespace-empty ((t (:background ,yellow :foreground ,red))))
  134. (whitespace-hspace ((t (:background ,selection :foreground ,comment))))
  135. (whitespace-indentation ((t (:background ,yellow :foreground ,red))))
  136. (whitespace-line ((t (:background ,current-line :foreground ,purple))))
  137. (whitespace-newline ((t (:foreground ,comment))))
  138. (whitespace-space ((t (:background ,current-line :foreground ,comment))))
  139. (whitespace-space-after-tab ((t (:background ,yellow :foreground ,red))))
  140. (whitespace-space-before-tab ((t (:background ,orange :foreground ,red))))
  141. (whitespace-tab ((t (:background ,selection :foreground ,comment))))
  142. (whitespace-trailing ((t (:background ,red :foreground ,yellow))))
  143. ;; rainbow-delimiters
  144. (rainbow-delimiters-depth-1-face ((t (:foreground ,purple))))
  145. (rainbow-delimiters-depth-2-face ((t (:foreground ,blue))))
  146. (rainbow-delimiters-depth-3-face ((t (:foreground ,aqua))))
  147. (rainbow-delimiters-depth-4-face ((t (:foreground ,green))))
  148. (rainbow-delimiters-depth-5-face ((t (:foreground ,yellow))))
  149. (rainbow-delimiters-depth-6-face ((t (:foreground ,orange))))
  150. (rainbow-delimiters-depth-7-face ((t (:foreground ,red))))
  151. (rainbow-delimiters-depth-8-face ((t (:foreground ,comment))))
  152. (rainbow-delimiters-depth-9-face ((t (:foreground ,foreground))))
  153. ;; auctex
  154. (font-latex-bold-face ((t (:foreground ,green))))
  155. (font-latex-doctex-documentation-face ((t (:background ,current-line))))
  156. (font-latex-italic-face ((t (:foreground ,green))))
  157. (font-latex-math-face ((t (:foreground ,orange))))
  158. (font-latex-sectioning-0-face ((t (:foreground ,yellow))))
  159. (font-latex-sectioning-1-face ((t (:foreground ,yellow))))
  160. (font-latex-sectioning-2-face ((t (:foreground ,yellow))))
  161. (font-latex-sectioning-3-face ((t (:foreground ,yellow))))
  162. (font-latex-sectioning-4-face ((t (:foreground ,yellow))))
  163. (font-latex-sectioning-5-face ((t (:foreground ,yellow))))
  164. (font-latex-sedate-face ((t (:foreground ,aqua))))
  165. (font-latex-string-face ((t (:foreground ,yellow))))
  166. (font-latex-verbatim-face ((t (:foreground ,orange))))
  167. (font-latex-warning-face ((t (:foreground ,red))))))))
  168. (defun color-theme-tomorrow ()
  169. "Base light Tomorrow theme."
  170. (interactive)
  171. (color-theme-tomorrow-real))
  172. (provide 'color-theme-tomorrow)
  173. (defun color-theme-tomorrow-night ()
  174. "Dark Tomorrow theme."
  175. (interactive)
  176. (color-theme-tomorrow-real 'night))
  177. (provide 'color-theme-tomorrow-night)
  178. (defun color-theme-tomorrow-night-eighties ()
  179. "Somewhat lighter dark Tomorrow theme."
  180. (interactive)
  181. (color-theme-tomorrow-real 'night-eighties))
  182. (provide 'color-theme-tomorrow-night-eighties)
  183. (defun color-theme-tomorrow-night-blue ()
  184. "Dark Tomorrow theme with a blue background."
  185. (interactive)
  186. (color-theme-tomorrow-real 'night-blue))
  187. (provide 'color-theme-tomorrow-night-blue)
  188. (defun color-theme-tomorrow-night-bright ()
  189. "Dark Tomorrow theme with a brighter, higher-contrast look."
  190. (interactive)
  191. (color-theme-tomorrow-real 'night-bright))
  192. (provide 'color-theme-tomorrow-night-bright)
  193. (add-to-list 'color-themes
  194. '(color-theme-tomorrow
  195. "Tomorrow" "Chris Kempson (ported by Chris Charles)"))
  196. (add-to-list 'color-themes
  197. '(color-theme-tomorrow-night
  198. "Tomorrow Night" "Chris Kempson (ported by Chris Charles)"))
  199. (add-to-list 'color-themes
  200. '(color-theme-tomorrow-night-eighties
  201. "Tomorrow Night Eighties" "Chris Kempson (ported by Chris Charles)"))
  202. (add-to-list 'color-themes
  203. '(color-theme-tomorrow-night-blue
  204. "Tomorrow Night Blue" "Chris Kempson (ported by Chris Charles)"))
  205. (add-to-list 'color-themes
  206. '(color-theme-tomorrow-night-bright
  207. "Tomorrow Night Bright" "Chris Kempson (ported by Chris Charles)"))
  208. ;;; color-theme-tomorrow.el ends here