alect-themes.el 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348
  1. ;;; alect-themes.el --- 4 configurable color themes for Emacs
  2. ;; Copyright (C) 2013 Alex Kost
  3. ;; Author: Alex Kost <alezost@gmail.com>
  4. ;; Created: 10 Jul 2013
  5. ;; Version: 0.3
  6. ;; Package-Requires: ((emacs "24.0"))
  7. ;; URL: http://github.com/alezost/alect-themes
  8. ;; Keywords: color theme
  9. ;; This program is free software; you can redistribute it and/or modify
  10. ;; it under the terms of the GNU General Public License as published by
  11. ;; the Free Software Foundation, either version 3 of the License, or
  12. ;; (at your option) any later version.
  13. ;; This program is distributed in the hope that it will be useful,
  14. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;; GNU General Public License for more details.
  17. ;; You should have received a copy of the GNU General Public License
  18. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. ;;; Commentary:
  20. ;; This package provides 4 highly customizable color themes (2 light and
  21. ;; 2 dark) for GNU Emacs 24 or later. These themes were intended to be
  22. ;; used with a GUI. Use those in terminal at your own risk :)
  23. ;; You can install the package from MELPA. If you prefer the manual
  24. ;; installation, put these lines into your init-file:
  25. ;; (add-to-list 'load-path "/path/to/alect-themes")
  26. ;; (add-to-list 'custom-theme-load-path "/path/to/alect-themes")
  27. ;; If you also want to enable a theme on Emacs start, use this:
  28. ;; (load-theme 'alect-light t)
  29. ;; Ways for configuring the themes:
  30. ;;
  31. ;; 1. Modifying color palette for the themes - by customizing
  32. ;; `alect-colors' variable. You may use `alect-generate-colors' to
  33. ;; redefine the whole variable (see the code) or `alect-set-color' to
  34. ;; modify specified colors.
  35. ;;
  36. ;; 2. Overriding face specification. You can change the look of
  37. ;; particular faces by setting `alect-overriding-faces' variable.
  38. ;;
  39. ;; 3. Above that, the inverted color themes (`alect-light-alt' and
  40. ;; `alect-dark-alt') can be configured with
  41. ;; `alect-inverted-color-regexp' variable.
  42. ;; For full description and some screenshots, see
  43. ;; <http://github.com/alezost/alect-themes>.
  44. ;; All screenshots can be found at <http://imgur.com/a/eBx96>.
  45. ;;; Code:
  46. (require 'cl-macs) ; for cl-flet
  47. (defun alect-put-colors (color-name theme-names color-vals var)
  48. "Put theme colors into the variable VAR.
  49. THEME-NAMES is a list of symbols. Theme names should already
  50. exist in the variable.
  51. COLOR-VALS is a list of colors for the specified theme (theme
  52. names and color values should be in matching order)."
  53. (when theme-names
  54. (let ((theme (assoc (car theme-names) var))
  55. (color-val (car color-vals)))
  56. (setcdr theme (cons (cons color-name color-val) (cdr theme))))
  57. (alect-put-colors color-name (cdr theme-names) (cdr color-vals) var)))
  58. ;;;###autoload
  59. (defun alect-generate-colors (theme-names colors)
  60. "Return alist of themes suitable for the variable `alect-colors'.
  61. THEME-NAMES is a list of symbols.
  62. COLORS is a list of lists (COLOR-NAME COLOR-VAL...) where
  63. COLOR-VAL is a color for specified theme (theme names and color
  64. values should be in matching order)."
  65. (let (cols)
  66. (dolist (theme theme-names)
  67. (add-to-list 'cols (list theme)))
  68. (dolist (elem colors)
  69. (alect-put-colors (car elem) theme-names (cdr elem) cols))
  70. cols))
  71. (defgroup alect nil
  72. "Options for alect color themes."
  73. :group 'faces)
  74. (defcustom alect-overriding-faces nil
  75. "List of faces that override original themed faces.
  76. The faces should be in a form accepted by `custom-theme-set-faces'.
  77. Instead of color values (like \"SkyBlue\" or \"#abcdef\") you may
  78. use the names of colors from `alect-colors' (like `magenta' or
  79. `blue+1'). During loading a theme these symbols will be
  80. substituted with values according to the current theme (light or
  81. dark).
  82. Use this variable if you want alect-themes to use non-default
  83. specifications of faces.
  84. Example:
  85. (setq alect-overriding-faces
  86. '((mode-line-buffer-id ((t :foreground bg-2 :weight bold)))
  87. (mode-line ((t :foreground bg-1 :background fg+1
  88. :box (:line-width 2 :color bg-2))))))
  89. Evaluate it and reload an alect-theme to see the difference."
  90. :type 'sexp
  91. :group 'alect)
  92. (defcustom alect-colors
  93. (alect-generate-colors
  94. '(light dark)
  95. '((cursor "#1074cd" "#ffec8b")
  96. (gray-2 "#fafafa" "#e9e9e9")
  97. (gray-1 "#bdbdbd" "#c0c0c0")
  98. (gray "#808080" "#aaaaaa")
  99. (gray+1 "#444444" "#555555")
  100. (gray+2 "#070707" "#000000")
  101. (fg-2 "#6c6c6c" "#8c826d")
  102. (fg-1 "#505050" "#d0bf8f")
  103. (fg "#3f3f3f" "#f0dfaf")
  104. (fg+1 "#262626" "#d5d2be")
  105. (fg+2 "#101010" "#f6f0e1")
  106. (bg-2 "#f6f0e1" "#222222")
  107. (bg-1 "#ded6c5" "#3f3f3f")
  108. (bg "#d9ceb2" "#4f4f4f")
  109. (bg+1 "#d7c89b" "#5f5f5f")
  110. (bg+2 "#ccc19b" "#6f6f6f")
  111. (red-2 "#fa5151" "#fa6a6e")
  112. (red-1 "#e43838" "#fa5151")
  113. (red "#f71010" "#e43838")
  114. (red+1 "#d81212" "#f21515")
  115. (red+2 "#b22222" "#bc1417")
  116. (yellow-2 "#ab9c3a" "#f8ffa0")
  117. (yellow-1 "#838a0b" "#e8e815")
  118. (yellow "#ef8300" "#fe8b04")
  119. (yellow+1 "#a0682d" "#e5c900")
  120. (yellow+2 "#6a621b" "#abab3a")
  121. (green-2 "#3cb368" "#8ce096")
  122. (green-1 "#1c9e28" "#32cd32")
  123. (green "#028902" "#7fb07f")
  124. (green+1 "#008b45" "#3cb370")
  125. (green+2 "#077707" "#099709")
  126. (cyan-2 "#1fb3b3" "#8cf1f1")
  127. (cyan-1 "#409e9f" "#2fdbde")
  128. (cyan "#528d8d" "#1fb3b3")
  129. (cyan+1 "#0d7b72" "#528d8d")
  130. (cyan+2 "#286060" "#0c8782")
  131. (blue-2 "#0092ff" "#b2c3f8")
  132. (blue-1 "#2c53ca" "#94bff3")
  133. (blue "#0000ff" "#62b6ea")
  134. (blue+1 "#0505cc" "#00aff5")
  135. (blue+2 "#00008b" "#3390dc")
  136. (magenta-2 "#dc63dc" "#ebabde")
  137. (magenta-1 "#ba55d3" "#dc8cc3")
  138. (magenta "#a020f0" "#e353b9")
  139. (magenta+1 "#9400d3" "#e81eda")
  140. (magenta+2 "#8b008b" "#be59d8")))
  141. "List of lists containing color palettes for alect-themes.
  142. List ((theme (color . val) ...) ...).
  143. Each list is a cons cell of a theme name (symbol) and alist of
  144. color names (symbols) and values (strings)."
  145. :type '(alist :key-type symbol
  146. :value-type (alist :key-type symbol
  147. :value-type string))
  148. ;; another suitable variant
  149. ;; :type '(repeat (cons symbol
  150. ;; (alist :key-type symbol :value-type string)))
  151. :group 'alect)
  152. (defun alect-set-color (theme-name color-name color-val)
  153. "Set color COLOR-NAME of a theme THEME-NAME to the value of COLOR-VAL.
  154. COLOR-NAME and THEME-NAME are symbols, COLOR-VAL is a string.
  155. See `alect-colors' for details."
  156. (let ((color-alist (cdr (assoc theme-name alect-colors))))
  157. (or color-alist
  158. (error "Theme '%s' does not exist" theme-name))
  159. (let ((color-cons (assoc color-name color-alist)))
  160. (or color-cons
  161. (error "Color '%s' does not exist" color-name))
  162. (setcdr color-cons color-val))))
  163. (defcustom alect-inverted-color-regexp
  164. "^\\(red\\|yellow\\|green\\|cyan\\|blue\\|magenta\\)\\([-+]\\)\\([012]\\)$"
  165. "Regexp matching a name of the color for inverted theme.
  166. The first parenthesized group should match a base color
  167. name (e.g. \"fg\" or \"blue\").
  168. The second group should match a sign (\"-\" or \"+\").
  169. The third group should match a color number (0, 1 or 2).
  170. For available color names, see `alect-colors'.
  171. For description of inverting colors, see `alect-get-color'."
  172. :type 'string
  173. :group 'alect)
  174. (defun alect-get-color (theme-name color-name &optional invert)
  175. "Return the value of color COLOR-NAME for a theme THEME-NAME.
  176. If INVERT is non-nil, return the value of the \"opposite\" color.
  177. E.g. use the value of \"magenta+1\" if COLOR-NAME is
  178. \"magenta-1\" or use \"red-2\" instead of \"red+2\" and so on.
  179. Invert only the color matching `alect-inverted-color-regexp'.
  180. For the values of THEME-NAME and COLOR-NAME, see `alect-colors'."
  181. (and invert
  182. (let ((color (symbol-name color-name)))
  183. (and (string-match alect-inverted-color-regexp color)
  184. (let ((base (match-string 1 color))
  185. (sign (match-string 2 color))
  186. (num (match-string 3 color)))
  187. (and base sign num
  188. (setq color-name
  189. (intern (concat base
  190. (if (equal sign "-")
  191. "+"
  192. "-")
  193. num))))))))
  194. (cdr (assoc color-name
  195. (cdr (assoc theme-name alect-colors)))))
  196. (defun alect-get-customization (theme &optional invert)
  197. "Return cons of settings for theme THEME.
  198. Car of the cons is a list for `custom-theme-set-faces' function.
  199. Cdr of the cons is a list for `custom-theme-set-variables' function.
  200. THEME is a name of the color theme (symbol from `alect-colors').
  201. For INVERT, see `alect-get-color'."
  202. (cl-flet ((gc (col) (alect-get-color theme col invert)))
  203. (cons
  204. ;; FACES
  205. `(;; basic colors
  206. (default ((t :foreground ,(gc 'fg+1)
  207. :background ,(gc 'bg-1))))
  208. (cursor ((t :background ,(gc 'cursor))))
  209. (button ((t :inherit link)))
  210. (link ((t :foreground ,(gc 'blue-1)
  211. :underline t :weight normal)))
  212. (link-visited ((t :foreground ,(gc 'blue+2)
  213. :underline t :weight normal)))
  214. (match ((t :background ,(gc 'green+1)
  215. :foreground ,(gc 'gray-2))))
  216. (escape-glyph ((t :foreground ,(gc 'yellow) :weight bold)))
  217. (fringe ((t :foreground ,(gc 'gray)
  218. :background ,(gc 'bg-2))))
  219. (header-line ((t :foreground ,(gc 'fg+2)
  220. :height 1.13
  221. :box (:line-width 1
  222. :color ,(gc 'fg+2)
  223. :style nil))))
  224. (highlight ((t :foreground ,(gc 'gray+2)
  225. :background ,(gc 'gray-2))))
  226. (shadow ((t :foreground ,(gc 'gray))))
  227. (success ((t :foreground ,(gc 'green) :weight bold)))
  228. (warning ((t :foreground ,(gc 'yellow-1) :weight normal)))
  229. (region ((t :background ,(gc 'bg+2))))
  230. (menu ((t :foreground ,(gc 'fg+1)
  231. :background ,(gc 'bg-1))))
  232. (minibuffer-prompt ((t :inherit alect-prompt)))
  233. (secondary-selection ((t :background ,(gc 'bg+1))))
  234. (trailing-whitespace ((t :background ,(gc 'red))))
  235. (vertical-border ((t :foreground ,(gc 'fg+1))))
  236. ;; auxiliary faces for inheriting
  237. (alect-title ((t :foreground ,(gc 'green+2) :weight bold :height 1.13)))
  238. (alect-prompt ((t :foreground ,(gc 'magenta-1) :weight bold)))
  239. (alect-time ((t :foreground ,(gc 'cyan-2))))
  240. (alect-selected-item ((t :background ,(gc 'bg)
  241. :box (:line-width 1
  242. :color ,(gc 'fg+1)
  243. :style nil))))
  244. (alect-color-level-1 ((t :foreground ,(gc 'blue+1))))
  245. (alect-color-level-2 ((t :foreground ,(gc 'green))))
  246. (alect-color-level-3 ((t :foreground ,(gc 'red+1))))
  247. (alect-color-level-4 ((t :foreground ,(gc 'yellow+2))))
  248. (alect-color-level-5 ((t :foreground ,(gc 'cyan+1))))
  249. (alect-color-level-6 ((t :foreground ,(gc 'blue-1))))
  250. (alect-color-level-7 ((t :foreground ,(gc 'magenta-1))))
  251. (alect-color-level-8 ((t :foreground ,(gc 'yellow))))
  252. (alect-color-level-9 ((t :foreground ,(gc 'green+2))))
  253. (alect-color-level-10 ((t :foreground ,(gc 'red-2))))
  254. (alect-color-level-11 ((t :foreground ,(gc 'cyan-2))))
  255. (alect-color-level-12 ((t :foreground ,(gc 'magenta+2))))
  256. ;; ace-jump
  257. (ace-jump-face-background ((t :foreground ,(gc 'bg+2)
  258. :background ,(gc 'bg-1)
  259. :inverse-video nil)))
  260. (ace-jump-face-foreground ((t :foreground ,(gc 'green+2)
  261. :background ,(gc 'bg-1)
  262. :inverse-video nil)))
  263. ;; ack
  264. (ack-separator ((t :foreground ,(gc 'fg+1))))
  265. (ack-file ((t :foreground ,(gc 'blue))))
  266. (ack-line ((t :foreground ,(gc 'yellow))))
  267. (ack-match ((t :foreground ,(gc 'fg-2)
  268. :background ,(gc 'bg-2) :weight bold)))
  269. ;; android mode
  270. (android-mode-debug-face ((t :foreground ,(gc 'green+1))))
  271. (android-mode-error-face ((t :foreground ,(gc 'fg-2) :weight bold)))
  272. (android-mode-info-face ((t :foreground ,(gc 'fg+1))))
  273. (android-mode-verbose-face ((t :foreground ,(gc 'green))))
  274. (android-mode-warning-face ((t :foreground ,(gc 'yellow))))
  275. ;; auctex
  276. (font-latex-bold ((t :inherit bold)))
  277. (font-latex-warning ((t :inherit font-lock-warning-face)))
  278. (font-latex-sedate ((t :foreground ,(gc 'yellow) :weight bold )))
  279. (font-latex-title-4 ((t :inherit variable-pitch :weight bold)))
  280. ;; auto-complete
  281. (ac-candidate-face ((t :foreground ,(gc 'gray+2)
  282. :background ,(gc 'bg+2))))
  283. (ac-selection-face ((t :foreground ,(gc 'fg+1)
  284. :background ,(gc 'cyan+1) )))
  285. ;; bm
  286. (bm-face ((t :background ,(gc 'yellow-1)
  287. :foreground ,(gc 'bg-1))))
  288. (bm-fringe-face ((t :background ,(gc 'yellow-1)
  289. :foreground ,(gc 'bg-1))))
  290. (bm-fringe-persistent-face ((t :background ,(gc 'green-1)
  291. :foreground ,(gc 'bg-1))))
  292. (bm-persistent-face ((t :background ,(gc 'green-1)
  293. :foreground ,(gc 'bg-1))))
  294. ;; clojure-test-mode
  295. (clojure-test-failure-face ((t :foreground ,(gc 'fg-2)
  296. :weight bold :underline t)))
  297. (clojure-test-error-face ((t :foreground ,(gc 'red)
  298. :weight bold :underline t)))
  299. (clojure-test-success-face ((t :foreground ,(gc 'green+1)
  300. :weight bold :underline t)))
  301. ;; comint
  302. (comint-highlight-prompt ((t :inherit alect-prompt)))
  303. (comint-highlight-input ((t :weight bold)))
  304. ;; compilation
  305. (compilation-column-face ((t :foreground ,(gc 'yellow))))
  306. (compilation-enter-directory-face ((t :foreground ,(gc 'green))))
  307. (compilation-error-face ((t :foreground ,(gc 'red-1) :weight bold :underline t)))
  308. (compilation-face ((t :foreground ,(gc 'fg+1))))
  309. (compilation-info-face ((t :foreground ,(gc 'blue))))
  310. (compilation-info ((t :foreground ,(gc 'green-2) :underline t)))
  311. (compilation-leave-directory-face ((t :foreground ,(gc 'green))))
  312. (compilation-line-face ((t :foreground ,(gc 'yellow))))
  313. (compilation-line-number ((t :foreground ,(gc 'yellow))))
  314. (compilation-message-face ((t :foreground ,(gc 'blue))))
  315. (compilation-warning-face ((t :foreground ,(gc 'fg-2) :weight bold :underline t)))
  316. (compilation-mode-line-exit ((t :foreground ,(gc 'green+2) :weight bold)))
  317. (compilation-mode-line-fail ((t :foreground ,(gc 'red) :weight bold)))
  318. (compilation-mode-line-run ((t :foreground ,(gc 'yellow) :weight bold)))
  319. ;; ctable
  320. (ctbl:face-cell-select ((t :background ,(gc 'blue)
  321. :foreground ,(gc 'bg-1))))
  322. (ctbl:face-continue-bar ((t :background ,(gc 'bg-2)
  323. :foreground ,(gc 'bg-1))))
  324. (ctbl:face-row-select ((t :background ,(gc 'cyan)
  325. :foreground ,(gc 'bg-1))))
  326. ;; customization
  327. (custom-button ((t :inherit custom-button-unraised
  328. :box (:line-width 2
  329. :style released-button))))
  330. (custom-button-pressed ((t :inherit custom-button-unraised
  331. :box (:line-width 2
  332. :style pressed-button))))
  333. (custom-button-mouse ((t :inherit highlight
  334. :box (:line-width 2
  335. :style released-button))))
  336. (custom-button-unraised ((t :foreground ,(gc 'fg+2)
  337. :background ,(gc 'bg+2))))
  338. (custom-button-pressed-unraised ((t :inherit custom-button-unraised :underline t)))
  339. (custom-documentation ((t :inherit font-lock-doc-face)))
  340. (custom-comment ((t :foreground ,(gc 'gray))))
  341. (custom-tag ((t :foreground ,(gc 'blue+2))))
  342. (custom-state ((t :foreground ,(gc 'green+1))))
  343. (custom-link ((t :inherit link)))
  344. (custom-group-subtitle ((t :weight bold)))
  345. (custom-group-tag ((t :inherit outline-1)))
  346. (custom-group-tag-1 ((t :inherit outline-2)))
  347. (custom-face-tag ((t :foreground ,(gc 'magenta+1) :weight bold)))
  348. (custom-variable-tag ((t :inherit font-lock-variable-name-face :weight bold)))
  349. (custom-variable-button ((t :weight bold :underline t)))
  350. (custom-visibility ((t :inherit link :height 0.8)))
  351. ;; diff
  352. (diff-context ((t :foreground ,(gc 'fg-1))))
  353. (diff-added ((t :foreground ,(gc 'green-1))))
  354. (diff-changed ((t :foreground ,(gc 'yellow-1))))
  355. (diff-removed ((t :foreground ,(gc 'red-1))))
  356. (diff-indicator-added ((t :inherit diff-added)))
  357. (diff-indicator-changed ((t :inherit diff-changed)))
  358. (diff-indicator-removed ((t :inherit diff-removed)))
  359. (diff-refine-added ((t :inherit diff-added :slant italic)))
  360. (diff-refine-change ((t :inherit diff-changed :slant italic)))
  361. (diff-refine-removed ((t :inherit diff-removed :slant italic)))
  362. (diff-header ((t :foreground ,(gc 'blue-2) :weight bold)))
  363. (diff-hunk-header ((t :inherit diff-header :foreground ,(gc 'green+2))))
  364. (diff-file-header ((t :inherit diff-header :foreground ,(gc 'cyan-1))))
  365. (diff-function ((t :inherit diff-header :foreground ,(gc 'blue))))
  366. (diff-index ((t :inherit diff-header :foreground ,(gc 'red-1))))
  367. (diff-nonexistent ((t :inherit diff-header :foreground ,(gc 'gray))))
  368. ;; dired
  369. (dired-directory ((t :inherit font-lock-function-name-face)))
  370. (dired-flagged ((t :foreground ,(gc 'red))))
  371. (dired-header ((t :inherit alect-title)))
  372. (dired-ignored ((t :foreground ,(gc 'gray))))
  373. (dired-mark ((t :foreground ,(gc 'blue+1))))
  374. (dired-marked ((t :inherit warning)))
  375. (dired-perm-write ((t :foreground ,(gc 'green-1))))
  376. (dired-symlink ((t :inherit font-lock-constant-face)))
  377. (dired-warning ((t :inherit font-lock-warning-face
  378. :background ,(gc 'bg-2))))
  379. ;; egg
  380. (egg-text-base ((t :foreground ,(gc 'fg+1))))
  381. (egg-help-header-1 ((t :foreground ,(gc 'cyan+1))))
  382. (egg-help-header-2 ((t :foreground ,(gc 'cyan-1))))
  383. (egg-branch ((t :foreground ,(gc 'yellow))))
  384. (egg-branch-mono ((t :foreground ,(gc 'yellow+1))))
  385. (egg-term ((t :foreground ,(gc 'blue))))
  386. (egg-diff-add ((t :foreground ,(gc 'green-2))))
  387. (egg-diff-del ((t :foreground ,(gc 'red+1))))
  388. (egg-diff-file-header ((t :foreground ,(gc 'yellow-2))))
  389. (egg-section-title ((t :foreground ,(gc 'red-1))))
  390. (egg-stash-mono ((t :foreground ,(gc 'green))))
  391. ;; emms
  392. (emms-playlist-track-face ((t :inherit gnus-summary-normal-unread)))
  393. (emms-playlist-selected-face ((t :inherit alect-selected-item)))
  394. (emms-stream-name-face ((t :foreground ,(gc 'blue+1))))
  395. (emms-stream-url-face ((t :inherit default)))
  396. ;; erc
  397. (erc-header-line ((t :inherit header-line)))
  398. (erc-bold-face ((t :weight bold)))
  399. (erc-underline-face ((t :underline t)))
  400. (erc-current-nick-face ((t :foreground ,(gc 'blue) :weight bold)))
  401. (erc-dangerous-host-face ((t :inherit font-lock-warning-face)))
  402. (erc-default-face ((t :foreground ,(gc 'fg+1))))
  403. (erc-direct-msg-face ((t :inherit erc-default-face :foreground ,(gc 'red-2))))
  404. (erc-action-face ((t :inherit erc-bold-face)))
  405. (erc-error-face ((t :inherit font-lock-warning-face)))
  406. (erc-fool-face ((t :foreground ,(gc 'blue-2))))
  407. (erc-highlight-face ((t :inherit hover-highlight)))
  408. (erc-input-face ((t :foreground ,(gc 'magenta))))
  409. (erc-keyword-face ((t :foreground ,(gc 'green+1) :weight normal)))
  410. (erc-nick-default-face ((t :foreground ,(gc 'blue+1) :weight normal)))
  411. (erc-my-nick-face ((t :foreground ,(gc 'red) :weight normal)))
  412. (erc-nick-msg-face ((t :foreground ,(gc 'fg+2))))
  413. (erc-notice-face ((t :foreground ,(gc 'green))))
  414. (erc-palect-face ((t :foreground ,(gc 'fg-2) :weight normal)))
  415. (erc-prompt-face ((t :inherit alect-prompt)))
  416. (erc-timestamp-face ((t :inherit alect-time)))
  417. ;; epa
  418. (epa-mark ((t :foreground ,(gc 'blue+1))))
  419. (epa-string ((t :foreground ,(gc 'cyan+2))))
  420. (epa-validity-disabled ((t :foreground ,(gc 'fg-2))))
  421. (epa-validity-high ((t :foreground ,(gc 'green-1))))
  422. (epa-validity-medium ((t :foreground ,(gc 'yellow-1))))
  423. (epa-validity-low ((t :foreground ,(gc 'red-1))))
  424. ;; ert
  425. (ert-test-result-expected ((t :foreground ,(gc 'green-2)
  426. :background ,(gc 'bg-1))))
  427. (ert-test-result-unexpected ((t :foreground ,(gc 'red)
  428. :background ,(gc 'bg-1))))
  429. ;; eshell
  430. (eshell-prompt ((t :inherit alect-prompt)))
  431. (eshell-ls-archive ((t :foreground ,(gc 'green))))
  432. (eshell-ls-backup ((t :inherit dired-ignored)))
  433. (eshell-ls-clutter ((t :inherit font-lock-comment-face)))
  434. (eshell-ls-directory ((t :inherit dired-directory)))
  435. (eshell-ls-executable ((t :foreground ,(gc 'yellow))))
  436. (eshell-ls-unreadable ((t :foreground ,(gc 'red-2))))
  437. (eshell-ls-readonly ((t :foreground ,(gc 'fg-2))))
  438. (eshell-ls-missing ((t :inherit dired-warning)))
  439. (eshell-ls-product ((t :inherit font-lock-doc-face)))
  440. (eshell-ls-special ((t :foreground ,(gc 'fg+1) :weight bold)))
  441. (eshell-ls-symlink ((t :inherit dired-symlink)))
  442. ;; flycheck
  443. (flycheck-error-face ((t :foreground ,(gc 'red-1) :weight bold :underline t)))
  444. (flycheck-warning-face ((t :foreground ,(gc 'fg-2) :weight bold :underline t)))
  445. ;; flymake
  446. (flymake-errline ((t :foreground ,(gc 'red-1) :weight bold :underline t)))
  447. (flymake-warnline ((t :foreground ,(gc 'fg-2) :weight bold :underline t)))
  448. ;; flyspell
  449. (flyspell-duplicate ((t :foreground ,(gc 'fg-2) :weight bold :underline t)))
  450. (flyspell-incorrect ((t :foreground ,(gc 'red-1) :weight bold :underline t)))
  451. ;; font lock
  452. (font-lock-builtin-face ((t :foreground ,(gc 'magenta-1))))
  453. (font-lock-comment-face ((t :foreground ,(gc 'green+1))))
  454. (font-lock-comment-delimiter-face ((t :inherit font-lock-comment-face)))
  455. (font-lock-constant-face ((t :foreground ,(gc 'cyan-1))))
  456. (font-lock-doc-face ((t :foreground ,(gc 'fg-1) :slant italic)))
  457. (font-lock-doc-string-face ((t :foreground ,(gc 'cyan+2))))
  458. (font-lock-function-name-face ((t :foreground ,(gc 'blue-1))))
  459. (font-lock-keyword-face ((t :foreground ,(gc 'blue+1) :weight bold)))
  460. (font-lock-negation-char-face ((t :foreground ,(gc 'fg+1))))
  461. (font-lock-preprocessor-face ((t :foreground ,(gc 'green-1))))
  462. (font-lock-string-face ((t :foreground ,(gc 'red-2))))
  463. (font-lock-type-face ((t :foreground ,(gc 'magenta+2))))
  464. (font-lock-variable-name-face ((t :foreground ,(gc 'yellow+2))))
  465. (font-lock-warning-face ((t :foreground ,(gc 'red+1) :weight bold)))
  466. ;; git-commit
  467. (git-commit-summary-face ((t :weight bold)))
  468. (git-commit-branch-face ((t :inherit magit-branch)))
  469. (git-commit-comment-file-face ((t :inherit default)))
  470. (git-commit-comment-heading-face ((t :inherit magit-header)))
  471. (git-commit-comment-action-face ((t :foreground ,(gc 'yellow+1))))
  472. ;; git-gutter
  473. (git-gutter:added ((t :foreground ,(gc 'green) :weight bold :inverse-video t)))
  474. (git-gutter:deleted ((t :foreground ,(gc 'red) :weight bold :inverse-video t)))
  475. (git-gutter:modified ((t :foreground ,(gc 'magenta) :weight bold :inverse-video t)))
  476. (git-gutter:unchanged ((t :foreground ,(gc 'fg+1) :weight bold :inverse-video t)))
  477. (git-gutter-fr:added ((t :foreground ,(gc 'green) :weight bold)))
  478. (git-gutter-fr:deleted ((t :foreground ,(gc 'red) :weight bold)))
  479. (git-gutter-fr:modified ((t :foreground ,(gc 'magenta) :weight bold)))
  480. ;; gnus
  481. (gnus-group-news-1-empty ((t :inherit alect-color-level-1)))
  482. (gnus-group-news-2-empty ((t :inherit alect-color-level-2)))
  483. (gnus-group-news-3-empty ((t :inherit alect-color-level-3)))
  484. (gnus-group-news-4-empty ((t :inherit alect-color-level-4)))
  485. (gnus-group-news-5-empty ((t :inherit alect-color-level-5)))
  486. (gnus-group-news-6-empty ((t :inherit alect-color-level-6)))
  487. (gnus-group-news-low-empty ((t :inherit alect-color-level-7)))
  488. (gnus-group-news-1 ((t :inherit gnus-group-news-1-empty :weight bold)))
  489. (gnus-group-news-2 ((t :inherit gnus-group-news-2-empty :weight bold)))
  490. (gnus-group-news-3 ((t :inherit gnus-group-news-3-empty :weight bold)))
  491. (gnus-group-news-4 ((t :inherit gnus-group-news-4-empty :weight bold)))
  492. (gnus-group-news-5 ((t :inherit gnus-group-news-5-empty :weight bold)))
  493. (gnus-group-news-6 ((t :inherit gnus-group-news-6-empty :weight bold)))
  494. (gnus-group-news-low ((t :inherit gnus-group-news-low-empty :weight bold)))
  495. (gnus-group-mail-1-empty ((t :inherit gnus-group-news-1-empty :slant italic)))
  496. (gnus-group-mail-2-empty ((t :inherit gnus-group-news-2-empty :slant italic)))
  497. (gnus-group-mail-3-empty ((t :inherit gnus-group-news-3-empty :slant italic)))
  498. (gnus-group-mail-low-empty ((t :inherit gnus-group-news-low-empty :slant italic)))
  499. (gnus-group-mail-1 ((t :inherit gnus-group-news-1 :slant italic)))
  500. (gnus-group-mail-2 ((t :inherit gnus-group-news-2 :slant italic)))
  501. (gnus-group-mail-3 ((t :inherit gnus-group-news-3 :slant italic)))
  502. (gnus-group-mail-low ((t :inherit gnus-group-news-low :slant italic)))
  503. (gnus-header-content ((t :inherit message-header-other)))
  504. (gnus-header-from ((t :inherit message-header-from)))
  505. (gnus-header-name ((t :inherit message-header-name)))
  506. (gnus-header-newsgroups ((t :inherit message-header-newsgroups)))
  507. (gnus-header-subject ((t :inherit message-header-subject)))
  508. (gnus-summary-cancelled ((t :background ,(gc 'fg-1)
  509. :foreground ,(gc 'bg-2))))
  510. (gnus-summary-low-ancient ((t :foreground ,(gc 'blue-2))))
  511. (gnus-summary-low-read ((t :foreground ,(gc 'green-2))))
  512. (gnus-summary-low-ticked ((t :foreground ,(gc 'red-2))))
  513. (gnus-summary-low-unread ((t :foreground ,(gc 'fg-1))))
  514. (gnus-summary-normal-ancient ((t :foreground ,(gc 'blue))))
  515. (gnus-summary-normal-read ((t :foreground ,(gc 'green))))
  516. (gnus-summary-normal-ticked ((t :foreground ,(gc 'red))))
  517. (gnus-summary-normal-unread ((t :foreground ,(gc 'fg+1))))
  518. (gnus-summary-high-ancient ((t :inherit gnus-summary-normal-ancient :weight bold)))
  519. (gnus-summary-high-read ((t :inherit gnus-summary-normal-read :weight bold)))
  520. (gnus-summary-high-ticked ((t :inherit gnus-summary-normal-ticked :weight bold)))
  521. (gnus-summary-high-unread ((t :inherit gnus-summary-normal-unread :weight bold)))
  522. (gnus-summary-selected ((t :inherit alect-selected-item)))
  523. (gnus-cite-1 ((t :inherit alect-color-level-1)))
  524. (gnus-cite-2 ((t :inherit alect-color-level-2)))
  525. (gnus-cite-3 ((t :inherit alect-color-level-3)))
  526. (gnus-cite-4 ((t :inherit alect-color-level-4)))
  527. (gnus-cite-5 ((t :inherit alect-color-level-5)))
  528. (gnus-cite-6 ((t :inherit alect-color-level-6)))
  529. (gnus-cite-7 ((t :inherit alect-color-level-7)))
  530. (gnus-cite-8 ((t :inherit alect-color-level-8)))
  531. (gnus-cite-9 ((t :inherit alect-color-level-9)))
  532. (gnus-cite-10 ((t :inherit alect-color-level-10)))
  533. (gnus-cite-11 ((t :inherit alect-color-level-11)))
  534. (gnus-signature ((t :foreground ,(gc 'cyan+1))))
  535. (gnus-x ((t :background ,(gc 'fg+1)
  536. :foreground ,(gc 'bg-1))))
  537. ;; grep
  538. (grep-context-face ((t :foreground ,(gc 'fg+1))))
  539. (grep-error-face ((t :foreground ,(gc 'red-1) :weight bold :underline t)))
  540. (grep-hit-face ((t :foreground ,(gc 'blue))))
  541. (grep-match-face ((t :foreground ,(gc 'fg-2) :weight bold)))
  542. ;; guide-key
  543. (guide-key/highlight-command-face ((t :foreground ,(gc 'blue))))
  544. (guide-key/key-face ((t :foreground ,(gc 'green))))
  545. (guide-key/prefix-command-face ((t :foreground ,(gc 'green+1))))
  546. ;; helm
  547. (helm-header ((t :foreground ,(gc 'green)
  548. :background ,(gc 'bg-1)
  549. :underline nil
  550. :box nil)))
  551. (helm-source-header ((t :foreground ,(gc 'yellow)
  552. :background ,(gc 'bg-2)
  553. :underline nil
  554. :weight bold
  555. :box (:line-width -1 :style released-button))))
  556. (helm-selection ((t :background ,(gc 'bg) :underline nil)))
  557. (helm-selection-line ((t :background ,(gc 'bg))))
  558. (helm-visible-mark ((t :foreground ,(gc 'bg-1) :background ,(gc 'yellow-2))))
  559. (helm-candidate-number ((t :foreground ,(gc 'green-2) :background ,(gc 'bg-2))))
  560. (helm-ff-directory ((t :foreground ,(gc 'magenta))))
  561. ;; hl-line-mode
  562. (hl-line ((t :background ,(gc 'bg))))
  563. ;; ido-mode
  564. (ido-first-match ((t :weight bold)))
  565. (ido-only-match ((t :inherit ido-first-match :foreground ,(gc 'fg+2))))
  566. (ido-subdir ((t :inherit dired-directory)))
  567. (ido-virtual ((t :foreground ,(gc 'red-2))))
  568. ;; isearch
  569. (isearch-fail ((t :foreground ,(gc 'fg+1)
  570. :background ,(gc 'red-2))))
  571. (isearch ((t :foreground ,(gc 'bg+1)
  572. :background ,(gc 'fg+2))))
  573. (lazy-highlight ((t :foreground ,(gc 'bg-2)
  574. :background ,(gc 'fg-2))))
  575. ;; js2-mode
  576. (js2-warning-face ((t :foreground,(gc 'fg-2))))
  577. (js2-error-face ((t :foreground ,(gc 'red) :weight bold)))
  578. (js2-jsdoc-tag-face ((t :foreground ,(gc 'green-1))))
  579. (js2-jsdoc-type-face ((t :foreground ,(gc 'green+2))))
  580. (js2-jsdoc-value-face ((t :foreground ,(gc 'cyan-1))))
  581. (js2-function-param-face ((t :foreground ,(gc 'cyan-1))))
  582. (js2-external-variable-face ((t :foreground ,(gc 'fg-2))))
  583. ;; jabber-mode
  584. (jabber-roster-user-away ((t :foreground ,(gc 'green+2))))
  585. (jabber-roster-user-online ((t :foreground ,(gc 'blue-1))))
  586. (jabber-roster-user-dnd ((t :foreground ,(gc 'red+1))))
  587. (jabber-rare-time-face ((t :inherit alect-time)))
  588. (jabber-chat-prompt-local ((t :foreground ,(gc 'blue-1))))
  589. (jabber-chat-prompt-foreign ((t :foreground ,(gc 'red+1))))
  590. (jabber-activity-face ((t :foreground ,(gc 'red+1))))
  591. (jabber-activity-personal-face ((t :foreground ,(gc 'blue+1))))
  592. (jabber-title-small ((t :height 1.1 :weight bold)))
  593. (jabber-title-medium ((t :height 1.2 :weight bold)))
  594. (jabber-title-large ((t :height 1.3 :weight bold)))
  595. ;; linum-mode
  596. (linum ((t :foreground ,(gc 'fg-2))))
  597. ;; magit
  598. (magit-item-highlight ((t nil)))
  599. (magit-header ((t :inherit alect-title)))
  600. (magit-tag ((t :foreground ,(gc 'yellow-1) :weight bold)))
  601. (magit-branch ((t :foreground ,(gc 'blue+1) :weight bold)))
  602. (magit-log-date ((t :inherit alect-time)))
  603. (magit-log-sha1 ((t :foreground ,(gc 'yellow+2))))
  604. (magit-log-author ((t :foreground ,(gc 'magenta-1))))
  605. (magit-log-head-label-head ((t :background ,(gc 'bg-2)
  606. :foreground ,(gc 'fg+2)
  607. :box (:line-width 2 :color ,(gc 'red)))))
  608. (magit-log-head-label-default ((t :box (:line-width 1 :color ,(gc 'fg+1)))))
  609. (magit-log-head-label-local ((t :inherit magit-log-head-label-default
  610. :foreground ,(gc 'blue))))
  611. (magit-log-head-label-remote ((t :inherit magit-log-head-label-default
  612. :foreground ,(gc 'green+1))))
  613. (magit-log-head-label-tags ((t :inherit magit-log-head-label-default
  614. :foreground ,(gc 'yellow-1))))
  615. (magit-log-head-label-wip ((t :inherit magit-log-head-label-default
  616. :foreground ,(gc 'red-1))))
  617. (magit-log-head-label-patches ((t :inherit magit-log-head-label-default
  618. :foreground ,(gc 'cyan-1))))
  619. (magit-log-reflog-label-other ((t :inherit magit-log-head-label-default)))
  620. (magit-log-reflog-label-checkout ((t :inherit magit-branch)))
  621. (magit-log-reflog-label-remote ((t :inherit magit-log-head-label-remote)))
  622. (magit-log-reflog-label-reset ((t :foreground ,(gc 'red) :weight bold)))
  623. (magit-log-reflog-label-rebase ((t :foreground ,(gc 'yellow))))
  624. (magit-log-reflog-label-cherry-pick ((t :foreground ,(gc 'cyan))))
  625. (magit-log-reflog-label-commit ((t :foreground ,(gc 'green-1))))
  626. (magit-log-reflog-label-amend ((t :foreground ,(gc 'magenta))))
  627. (magit-log-reflog-label-merge ((t :foreground ,(gc 'blue-2) :weight bold)))
  628. (magit-cherry-unmatched ((t :foreground ,(gc 'red+2))))
  629. (magit-cherry-equivalent ((t :foreground ,(gc 'cyan+2))))
  630. ;; markdown mode
  631. (markdown-header-face ((t :inherit outline-1)))
  632. (markdown-header-face-1 ((t :inherit outline-1)))
  633. (markdown-header-face-2 ((t :inherit outline-2)))
  634. (markdown-header-face-3 ((t :inherit outline-3)))
  635. (markdown-header-face-4 ((t :inherit outline-4)))
  636. (markdown-header-face-5 ((t :inherit outline-5)))
  637. (markdown-header-face-6 ((t :inherit outline-6)))
  638. (markdown-header-rule-face ((t :inherit markdown-header-face :foreground ,(gc 'fg))))
  639. (markdown-header-delimiter-face ((t :inherit markdown-header-face :foreground ,(gc 'fg+2))))
  640. (markdown-footnote-face ((t :foreground ,(gc 'blue+2))))
  641. (markdown-inline-code-face ((t :foreground ,(gc 'cyan+1))))
  642. (markdown-comment-face ((t :inherit font-lock-comment-face)))
  643. (markdown-blockquote-face ((t :inherit font-lock-doc-face)))
  644. (markdown-bold-face ((t :inherit bold)))
  645. (markdown-italic-face ((t :inherit italic)))
  646. (markdown-missing-link-face ((t :inherit font-lock-warning-face)))
  647. (markdown-link-face ((t :inherit link)))
  648. (markdown-link-title-face ((t :inherit font-lock-string-face)))
  649. (markdown-url-face ((t :foreground ,(gc 'green+2))))
  650. (markdown-language-keyword-face ((t :foreground ,(gc 'magenta+2))))
  651. (markdown-line-break-face ((t :inherit underline)))
  652. (markdown-list-face ((t :foreground ,(gc 'yellow))))
  653. (markdown-metadata-key-face ((t :foreground ,(gc 'blue-2))))
  654. (markdown-metadata-value-face ((t :foreground ,(gc 'red-1))))
  655. (markdown-pre-face ((t :foreground ,(gc 'yellow+2))))
  656. (markdown-reference-face ((t :inherit link)))
  657. ;; message-mode
  658. (message-cited-text ((t :inherit font-lock-comment-face)))
  659. (message-separator ((t :inherit font-lock-comment-face)))
  660. (message-header-name ((t :foreground ,(gc 'yellow+1) :weight bold)))
  661. (message-header-other ((t :foreground ,(gc 'green+1))))
  662. (message-header-to ((t :foreground ,(gc 'blue))))
  663. (message-header-from ((t :foreground ,(gc 'red-1))))
  664. (message-header-cc ((t :foreground ,(gc 'blue-1))))
  665. (message-header-newsgroups ((t :foreground ,(gc 'yellow+2))))
  666. (message-header-subject ((t :foreground ,(gc 'red+1))))
  667. (message-header-xheader ((t :foreground ,(gc 'green-1))))
  668. (message-mml ((t :foreground ,(gc 'cyan-2) :weight bold)))
  669. ;; mew
  670. (mew-face-header-subject ((t :foreground ,(gc 'fg-2))))
  671. (mew-face-header-from ((t :foreground ,(gc 'yellow))))
  672. (mew-face-header-date ((t :inherit alect-time)))
  673. (mew-face-header-to ((t :foreground ,(gc 'red))))
  674. (mew-face-header-key ((t :foreground ,(gc 'green))))
  675. (mew-face-header-private ((t :foreground ,(gc 'green))))
  676. (mew-face-header-important ((t :foreground ,(gc 'blue))))
  677. (mew-face-header-marginal ((t :foreground ,(gc 'fg+1) :weight bold)))
  678. (mew-face-header-warning ((t :foreground ,(gc 'red))))
  679. (mew-face-header-xmew ((t :foreground ,(gc 'green))))
  680. (mew-face-header-xmew-bad ((t :foreground ,(gc 'red))))
  681. (mew-face-body-url ((t :foreground ,(gc 'fg-2))))
  682. (mew-face-body-comment ((t :foreground ,(gc 'fg+1) :slant italic)))
  683. (mew-face-body-cite1 ((t :foreground ,(gc 'green))))
  684. (mew-face-body-cite2 ((t :foreground ,(gc 'blue))))
  685. (mew-face-body-cite3 ((t :foreground ,(gc 'fg-2))))
  686. (mew-face-body-cite4 ((t :foreground ,(gc 'yellow))))
  687. (mew-face-body-cite5 ((t :foreground ,(gc 'red))))
  688. (mew-face-mark-review ((t :foreground ,(gc 'blue))))
  689. (mew-face-mark-escape ((t :foreground ,(gc 'green))))
  690. (mew-face-mark-delete ((t :foreground ,(gc 'red))))
  691. (mew-face-mark-unlink ((t :foreground ,(gc 'yellow))))
  692. (mew-face-mark-refile ((t :foreground ,(gc 'green))))
  693. (mew-face-mark-unread ((t :foreground ,(gc 'yellow+2))))
  694. (mew-face-eof-message ((t :foreground ,(gc 'green))))
  695. (mew-face-eof-part ((t :foreground ,(gc 'yellow))))
  696. ;; mic-paren
  697. (paren-face-match ((t :foreground ,(gc 'cyan)
  698. :background ,(gc 'bg-1)
  699. :weight bold)))
  700. (paren-face-mismatch ((t :foreground ,(gc 'bg-1)
  701. :background ,(gc 'magenta)
  702. :weight bold)))
  703. (paren-face-no-match ((t :foreground ,(gc 'bg-1)
  704. :background ,(gc 'red)
  705. :weight bold)))
  706. ;; mingus
  707. (mingus-directory-face ((t :foreground ,(gc 'blue))))
  708. (mingus-pausing-face ((t :foreground ,(gc 'magenta))))
  709. (mingus-playing-face ((t :foreground ,(gc 'cyan))))
  710. (mingus-playlist-face ((t :foreground ,(gc 'cyan) )))
  711. (mingus-song-file-face ((t :foreground ,(gc 'yellow))))
  712. (mingus-stopped-face ((t :foreground ,(gc 'red))))
  713. ;; i don't know what it is, but this face can often be met in mails
  714. (mm-uu-extract ((t :background ,(gc 'bg)
  715. :foreground ,(gc 'fg+1))))
  716. ;; mode-line
  717. (mode-line-buffer-id ((t :foreground ,(gc 'blue-1) :weight bold)))
  718. (mode-line ((t :foreground ,(gc 'fg+1)
  719. :background ,(gc 'bg-2)
  720. :box (:line-width 2
  721. :style released-button))))
  722. (mode-line-inactive ((t :foreground ,(gc 'fg-2)
  723. :background ,(gc 'bg-1)
  724. :box (:line-width 2
  725. :color ,(gc 'bg-2)
  726. :style nil))))
  727. ;; mu4e
  728. (mu4e-cited-1-face ((t :foreground ,(gc 'blue) :slant italic)))
  729. (mu4e-cited-2-face ((t :foreground ,(gc 'green+2) :slant italic)))
  730. (mu4e-cited-3-face ((t :foreground ,(gc 'cyan-2) :slant italic)))
  731. (mu4e-cited-4-face ((t :foreground ,(gc 'green) :slant italic)))
  732. (mu4e-cited-5-face ((t :foreground ,(gc 'cyan+1) :slant italic)))
  733. (mu4e-cited-6-face ((t :foreground ,(gc 'green-1) :slant italic)))
  734. (mu4e-cited-7-face ((t :foreground ,(gc 'blue) :slant italic)))
  735. (mu4e-replied-face ((t :foreground ,(gc 'bg+2))))
  736. (mu4e-trashed-face ((t :foreground ,(gc 'bg+2) :strike-through t)))
  737. ;; mumamo
  738. (mumamo-background-chunk-major ((t :background nil)))
  739. (mumamo-background-chunk-submode1 ((t :background ,(gc 'bg-2))))
  740. (mumamo-background-chunk-submode2 ((t :background ,(gc 'bg+1))))
  741. (mumamo-background-chunk-submode3 ((t :background ,(gc 'bg+2))))
  742. (mumamo-background-chunk-submode4 ((t :background ,(gc 'bg))))
  743. ;; nav
  744. (nav-face-heading ((t :foreground ,(gc 'yellow))))
  745. (nav-face-button-num ((t :foreground ,(gc 'cyan))))
  746. (nav-face-dir ((t :foreground ,(gc 'green))))
  747. (nav-face-hdir ((t :foreground ,(gc 'red))))
  748. (nav-face-file ((t :foreground ,(gc 'fg+1))))
  749. (nav-face-hfile ((t :foreground ,(gc 'red-2))))
  750. ;; nethack-el
  751. (nethack-dark-gray-face ((t :foreground ,(gc 'fg-1))))
  752. (nethack-message-highlight-face ((t :background ,(gc 'bg)
  753. :foreground ,(gc 'red+2))))
  754. (nethack-yellow-face ((t :foreground ,(gc 'yellow))))
  755. ;; newsticker
  756. (newsticker-date-face ((t :inherit alect-time)))
  757. (newsticker-default-face ((t :foreground ,(gc 'fg+1))))
  758. (newsticker-enclosure-face ((t :foreground ,(gc 'cyan-1))))
  759. (newsticker-extra-face ((t :foreground ,(gc 'bg+1) :height 0.8)))
  760. (newsticker-feed-face ((t :foreground ,(gc 'fg+1))))
  761. (newsticker-immortal-item-face ((t :foreground ,(gc 'green))))
  762. (newsticker-new-item-face ((t :foreground ,(gc 'blue))))
  763. (newsticker-obsolete-item-face ((t :foreground ,(gc 'red))))
  764. (newsticker-old-item-face ((t :foreground ,(gc 'bg+2))))
  765. (newsticker-statistics-face ((t :foreground ,(gc 'fg+1))))
  766. (newsticker-treeview-face ((t :foreground ,(gc 'fg+1))))
  767. (newsticker-treeview-immortal-face ((t :foreground ,(gc 'green))))
  768. (newsticker-treeview-listwindow-face ((t :foreground ,(gc 'fg+1))))
  769. (newsticker-treeview-new-face ((t :foreground ,(gc 'blue) :weight bold)))
  770. (newsticker-treeview-obsolete-face ((t :foreground ,(gc 'red))))
  771. (newsticker-treeview-old-face ((t :foreground ,(gc 'bg+2))))
  772. (newsticker-treeview-selection-face ((t :foreground ,(gc 'yellow))))
  773. ;; org-mode
  774. (org-agenda-date ((t :inherit alect-time)))
  775. (org-agenda-date-today ((t :inherit alect-selected-item
  776. :foreground ,(gc 'cyan-2))))
  777. (org-agenda-structure ((t :inherit alect-title)))
  778. (org-archived ((t :foreground ,(gc 'fg+1) :weight bold)))
  779. (org-checkbox ((t :background ,(gc 'bg+1)
  780. :foreground ,(gc 'gray-2)
  781. :box (:line-width 1 :style released-button))))
  782. (org-date ((t :inherit alect-time)))
  783. (org-date-selected ((t :inherit alect-selected-item)))
  784. (org-deadline-announce ((t :foreground ,(gc 'red-1))))
  785. (org-done ((t :foreground ,(gc 'cyan-1) :weight bold)))
  786. (org-formula ((t :foreground ,(gc 'yellow-2))))
  787. (org-headline-done ((t :foreground ,(gc 'cyan-1))))
  788. (org-hide ((t :foreground ,(gc 'bg-2))))
  789. (org-level-1 ((t :inherit outline-1)))
  790. (org-level-2 ((t :inherit outline-2)))
  791. (org-level-3 ((t :inherit outline-3)))
  792. (org-level-4 ((t :inherit outline-4)))
  793. (org-level-5 ((t :inherit outline-5)))
  794. (org-level-6 ((t :inherit outline-6)))
  795. (org-level-7 ((t :inherit outline-7)))
  796. (org-level-8 ((t :inherit outline-8)))
  797. (org-link ((t :inherit link)))
  798. (org-scheduled ((t :foreground ,(gc 'green-2))))
  799. (org-scheduled-previously ((t :foreground ,(gc 'red-2))))
  800. (org-scheduled-today ((t :foreground ,(gc 'blue+1))))
  801. (org-special-keyword ((t :inherit font-lock-doc-face)))
  802. (org-table ((t :foreground ,(gc 'fg-1))))
  803. (org-tag ((t :slant italic)))
  804. (org-time-grid ((t :foreground ,(gc 'fg-2))))
  805. (org-todo ((t :foreground ,(gc 'red) :weight bold)))
  806. (org-upcoming-deadline ((t :inherit font-lock-keyword-face)))
  807. (org-warning ((t :foreground ,(gc 'red) :weight bold :underline nil)))
  808. (org-column ((t :background ,(gc 'bg-2))))
  809. (org-column-title ((t :background ,(gc 'bg-2) :underline t :weight bold)))
  810. ;; outline
  811. (outline-1 ((t :inherit alect-color-level-1 :weight bold :height 1.12)))
  812. (outline-2 ((t :inherit alect-color-level-2 :weight bold :height 1.12)))
  813. (outline-3 ((t :inherit alect-color-level-3 :weight bold :height 1.12)))
  814. (outline-4 ((t :inherit alect-color-level-4 :weight bold :height 1.12)))
  815. (outline-5 ((t :inherit alect-color-level-5 :weight bold :height 1.12)))
  816. (outline-6 ((t :inherit alect-color-level-6 :weight bold :height 1.12)))
  817. (outline-7 ((t :inherit alect-color-level-7 :weight bold :height 1.12)))
  818. (outline-8 ((t :inherit alect-color-level-8 :weight bold :height 1.12)))
  819. ;; popup
  820. (popup-tip-face ((t :foreground ,(gc 'gray+2)
  821. :background ,(gc 'yellow-2))))
  822. (popup-scroll-bar-foreground-face ((t :background ,(gc 'cyan+2))))
  823. (popup-scroll-bar-background-face ((t :background ,(gc 'bg-2))))
  824. (popup-isearch-match ((t :foreground ,(gc 'fg+1)
  825. :background ,(gc 'bg-1) )))
  826. ;; rainbow-delimiters
  827. (rainbow-delimiters-depth-1-face ((t :foreground ,(gc 'fg+1))))
  828. (rainbow-delimiters-depth-2-face ((t :foreground ,(gc 'green+2))))
  829. (rainbow-delimiters-depth-3-face ((t :foreground ,(gc 'yellow-2))))
  830. (rainbow-delimiters-depth-4-face ((t :foreground ,(gc 'cyan))))
  831. (rainbow-delimiters-depth-5-face ((t :foreground ,(gc 'green-1))))
  832. (rainbow-delimiters-depth-6-face ((t :foreground ,(gc 'blue+1))))
  833. (rainbow-delimiters-depth-7-face ((t :foreground ,(gc 'yellow-1))))
  834. (rainbow-delimiters-depth-8-face ((t :foreground ,(gc 'green+1))))
  835. (rainbow-delimiters-depth-9-face ((t :foreground ,(gc 'cyan-2))))
  836. (rainbow-delimiters-depth-10-face ((t :foreground ,(gc 'fg-2))))
  837. (rainbow-delimiters-depth-11-face ((t :foreground ,(gc 'green))))
  838. (rainbow-delimiters-depth-12-face ((t :foreground ,(gc 'cyan+2))))
  839. ;; rcirc
  840. (rcirc-my-nick ((t :foreground ,(gc 'blue))))
  841. (rcirc-other-nick ((t :foreground ,(gc 'fg-2))))
  842. (rcirc-bright-nick ((t :foreground ,(gc 'blue+1))))
  843. (rcirc-dim-nick ((t :foreground ,(gc 'cyan-2))))
  844. (rcirc-server ((t :foreground ,(gc 'green))))
  845. (rcirc-server-prefix ((t :foreground ,(gc 'green+1))))
  846. (rcirc-timestamp ((t :inherit alect-time)))
  847. (rcirc-nick-in-message ((t :foreground ,(gc 'yellow))))
  848. (rcirc-nick-in-message-full-line ((t :weight bold)))
  849. (rcirc-prompt ((t :inherit alect-prompt)))
  850. (rcirc-track-nick ((t :inverse-video t)))
  851. (rcirc-track-keyword ((t :weight bold)))
  852. (rcirc-url ((t :weight bold)))
  853. (rcirc-keyword ((t :foreground ,(gc 'yellow) :weight bold)))
  854. ;; rpm-mode
  855. (rpm-spec-dir-face ((t :foreground ,(gc 'green))))
  856. (rpm-spec-doc-face ((t :foreground ,(gc 'green))))
  857. (rpm-spec-ghost-face ((t :foreground ,(gc 'red))))
  858. (rpm-spec-macro-face ((t :foreground ,(gc 'yellow))))
  859. (rpm-spec-obsolete-tag-face ((t :foreground ,(gc 'red))))
  860. (rpm-spec-package-face ((t :foreground ,(gc 'red))))
  861. (rpm-spec-section-face ((t :foreground ,(gc 'yellow))))
  862. (rpm-spec-tag-face ((t :foreground ,(gc 'blue))))
  863. (rpm-spec-var-face ((t :foreground ,(gc 'red))))
  864. ;; rst-mode
  865. (rst-level-1-face ((t :inherit alect-color-level-1)))
  866. (rst-level-2-face ((t :inherit alect-color-level-2)))
  867. (rst-level-3-face ((t :inherit alect-color-level-3)))
  868. (rst-level-4-face ((t :inherit alect-color-level-4)))
  869. (rst-level-5-face ((t :inherit alect-color-level-5)))
  870. (rst-level-6-face ((t :inherit alect-color-level-6)))
  871. ;; shell-script
  872. (sh-heredoc ((t :inherit font-lock-doc-face)))
  873. (sh-quoted-exec ((t :foreground ,(gc 'cyan))))
  874. ;; show-paren
  875. (show-paren-mismatch ((t :foreground ,(gc 'gray-2)
  876. :background ,(gc 'red))))
  877. (show-paren-match ((t :foreground ,(gc 'gray-2)
  878. :background ,(gc 'green+1))))
  879. ;; SLIME
  880. (slime-error-face ((t :inherit font-lock-warning-face)))
  881. (slime-repl-input-face ((t :inherit comint-highlight-input)))
  882. (slime-repl-output-face ((t :foreground ,(gc 'green-1))))
  883. (slime-repl-inputed-output-face ((t :foreground ,(gc 'red))))
  884. (slime-repl-output-mouseover-face ((t :inherit highlight)))
  885. (slime-repl-prompt-face ((t :inherit alect-prompt)))
  886. (slime-repl-result-face ((t :foreground ,(gc 'blue+2))))
  887. ;; sml-mode-line
  888. (sml-modeline-end-face ((t :inherit default :width condensed)))
  889. ;; sunrise-commander
  890. (sr-active-path-face ((t :inherit dired-header)))
  891. (sr-passive-path-face ((t :inherit dired-header
  892. :foreground ,(gc 'fg-2))))
  893. (sr-directory-face ((t :inherit dired-directory)))
  894. (sr-marked-file-face ((t :inherit dired-marked)))
  895. (sr-marked-dir-face ((t :inherit sr-alt-marked-file-face :weight bold)))
  896. (sr-alt-marked-file-face ((t :inherit sr-marked-file-face :slant italic)))
  897. (sr-alt-marked-dir-face ((t :inherit sr-marked-dir-face :slant italic)))
  898. (sr-symlink-face ((t :inherit dired-symlink)))
  899. (sr-symlink-directory-face ((t :inherit sr-symlink-face :weight bold)))
  900. (sr-broken-link-face ((t :inherit dired-warning)))
  901. (sr-highlight-path-face ((t :inherit highlight)))
  902. (sr-editing-path-face ((t :foreground ,(gc 'bg-1)
  903. :background ,(gc 'blue-1))))
  904. (sr-clex-hotchar-face ((t :foreground ,(gc 'red))))
  905. (sr-encrypted-face ((t :foreground ,(gc 'yellow))))
  906. (sr-compressed-face ((t :foreground ,(gc 'magenta-1))))
  907. (sr-packaged-face ((t :foreground ,(gc 'magenta+1))))
  908. (sr-log-face ((t :foreground ,(gc 'green-1))))
  909. (sr-xml-face ((t :foreground ,(gc 'green+2))))
  910. (sr-html-face ((t :foreground ,(gc 'cyan+2))))
  911. ;; syslog-mode
  912. (syslog-error ((t :inherit font-lock-warning-face)))
  913. (syslog-warn ((t :inherit warning)))
  914. (syslog-info ((t :foreground ,(gc 'blue-2))))
  915. (syslog-debug ((t :foreground ,(gc 'magenta-1))))
  916. (syslog-hour ((t :foreground ,(gc 'blue+1))))
  917. (syslog-su ((t :foreground ,(gc 'cyan))))
  918. (syslog-ip ((t :foreground ,(gc 'yellow+1) :underline t)))
  919. ;; tabbar
  920. (tabbar-button ((t :foreground ,(gc 'fg+1)
  921. :background ,(gc 'bg-1))))
  922. (tabbar-selected ((t :foreground ,(gc 'fg+1)
  923. :background ,(gc 'bg-1)
  924. :box (:line-width -1 :style pressed-button))))
  925. (tabbar-unselected ((t :foreground ,(gc 'fg+1)
  926. :background ,(gc 'bg)
  927. :box (:line-width -1 :style released-button))))
  928. ;; term
  929. (term-color-black ((t :foreground ,(gc 'bg-1)
  930. :background ,(gc 'bg-2))))
  931. (term-color-red ((t :foreground ,(gc 'yellow+2)
  932. :background ,(gc 'red-2))))
  933. (term-color-green ((t :foreground ,(gc 'green)
  934. :background ,(gc 'green+2))))
  935. (term-color-yellow ((t :foreground ,(gc 'fg-2)
  936. :background ,(gc 'yellow))))
  937. (term-color-blue ((t :foreground ,(gc 'blue-1)
  938. :background ,(gc 'cyan+1))))
  939. (term-color-magenta ((t :foreground ,(gc 'magenta)
  940. :background ,(gc 'red))))
  941. (term-color-cyan ((t :foreground ,(gc 'cyan)
  942. :background ,(gc 'blue))))
  943. (term-color-white ((t :foreground ,(gc 'fg+1)
  944. :background ,(gc 'bg+2))))
  945. (term-default-fg-color ((t :inherit term-color-white)))
  946. (term-default-bg-color ((t :inherit term-color-black)))
  947. ;; volatile-highlights
  948. (vhl/default-face ((t :background ,(gc 'bg-2))))
  949. ;; emacs-w3m
  950. (w3m-anchor ((t :inherit link)))
  951. (w3m-arrived-anchor ((t :inherit link-visited)))
  952. (w3m-form ((t :foreground ,(gc 'red-1) :underline t)))
  953. (w3m-form-button ((t :inherit custom-button)))
  954. (w3m-form-button-pressed ((t :inherit custom-button-pressed)))
  955. (w3m-form-button-mouse ((t :inherit custom-button-mouse)))
  956. (w3m-tab-background ((t :inherit default)))
  957. (w3m-tab-selected ((t :inherit custom-button
  958. :foreground ,(gc 'fg+2))))
  959. (w3m-tab-selected-retrieving ((t :inherit custom-button
  960. :foreground ,(gc 'red))))
  961. (w3m-tab-selected-background ((t :background ,(gc 'bg))))
  962. (w3m-tab-unselected ((t :inherit custom-button
  963. :foreground ,(gc 'fg-1))))
  964. (w3m-tab-unselected-retrieving ((t :inherit custom-button
  965. :foreground ,(gc 'red+2))))
  966. (w3m-tab-unselected-unseen ((t :inherit custom-button
  967. :backround ,(gc 'gray))))
  968. (w3m-tab-mouse ((t :inherit custom-button-mouse)))
  969. (w3m-header-line-location-title ((t :inherit header-line)))
  970. (w3m-header-line-location-content ((t :foreground ,(gc 'blue-1)
  971. :inherit header-line)))
  972. (w3m-history-current-url ((t :inherit alect-selected-item)))
  973. (w3m-image-anchor ((t :background ,(gc 'bg+1))))
  974. ;; wanderlust
  975. (wl-highlight-folder-few-face ((t :foreground ,(gc 'yellow+2))))
  976. (wl-highlight-folder-many-face ((t :foreground ,(gc 'red-1))))
  977. (wl-highlight-folder-path-face ((t :foreground ,(gc 'fg-2))))
  978. (wl-highlight-folder-unread-face ((t :foreground ,(gc 'blue))))
  979. (wl-highlight-folder-zero-face ((t :foreground ,(gc 'fg+1))))
  980. (wl-highlight-folder-unknown-face ((t :foreground ,(gc 'blue))))
  981. (wl-highlight-message-citation-header ((t :foreground ,(gc 'red-1))))
  982. (wl-highlight-message-cited-text-1 ((t :foreground ,(gc 'red))))
  983. (wl-highlight-message-cited-text-2 ((t :foreground ,(gc 'green+2))))
  984. (wl-highlight-message-cited-text-3 ((t :foreground ,(gc 'blue))))
  985. (wl-highlight-message-cited-text-4 ((t :foreground ,(gc 'blue+1))))
  986. (wl-highlight-message-header-contents-face ((t :foreground ,(gc 'green))))
  987. (wl-highlight-message-headers-face ((t :foreground ,(gc 'red+1))))
  988. (wl-highlight-message-important-header-contents ((t :foreground ,(gc 'green+2))))
  989. (wl-highlight-message-header-contents ((t :foreground ,(gc 'green+1))))
  990. (wl-highlight-message-important-header-contents2 ((t :foreground ,(gc 'green+2))))
  991. (wl-highlight-message-signature ((t :foreground ,(gc 'green))))
  992. (wl-highlight-message-unimportant-header-contents ((t :foreground ,(gc 'fg+1))))
  993. (wl-highlight-summary-answered-face ((t :foreground ,(gc 'blue))))
  994. (wl-highlight-summary-disposed-face ((t :foreground ,(gc 'fg+1)
  995. :slant italic)))
  996. (wl-highlight-summary-new-face ((t :foreground ,(gc 'blue))))
  997. (wl-highlight-summary-normal-face ((t :foreground ,(gc 'fg+1))))
  998. (wl-highlight-summary-thread-top-face ((t :foreground ,(gc 'yellow))))
  999. (wl-highlight-thread-indent-face ((t :foreground ,(gc 'magenta))))
  1000. (wl-highlight-summary-refiled-face ((t :foreground ,(gc 'fg+1))))
  1001. (wl-highlight-summary-displaying-face ((t :underline t :weight bold)))
  1002. ;; which-func-mode
  1003. (which-func ((t :foreground ,(gc 'green-2))))
  1004. ;; whitespace-mode
  1005. (whitespace-space ((t :background ,(gc 'bg)
  1006. :foreground ,(gc 'blue-2))))
  1007. (whitespace-hspace ((t :background ,(gc 'bg)
  1008. :foreground ,(gc 'gray))))
  1009. (whitespace-tab ((t :background ,(gc 'fg-2)
  1010. :foreground ,(gc 'blue-2))))
  1011. (whitespace-newline ((t :foreground ,(gc 'blue-2))))
  1012. (whitespace-trailing ((t :background ,(gc 'red))))
  1013. (whitespace-line ((t :background ,(gc 'gray)
  1014. :foreground ,(gc 'gray-2))))
  1015. (whitespace-space-before-tab ((t :background ,(gc 'fg-2)
  1016. :foreground ,(gc 'fg-2))))
  1017. (whitespace-indentation ((t :background ,(gc 'yellow-2)
  1018. :foreground ,(gc 'red-2))))
  1019. (whitespace-empty ((t :background ,(gc 'yellow))))
  1020. (whitespace-space-after-tab ((t :background ,(gc 'yellow-2)
  1021. :foreground ,(gc 'red-2))))
  1022. ;; widget
  1023. (widget-field ((t :background ,(gc 'bg)
  1024. :box (:line-width -1
  1025. :color ,(gc 'fg-2)
  1026. :style nil))))
  1027. (widget-button ((t :foreground ,(gc 'blue-1) :weight bold)))
  1028. (widget-button-pressed ((t :foreground ,(gc 'blue+2) :inherit widget-button)))
  1029. (widget-documentation ((t :foreground ,(gc 'green-1))))
  1030. (widget-inactive ((t :inherit shadow)))
  1031. (widget-single-line-field ((t :foreground ,(gc 'fg)
  1032. :inherit widget-field)))
  1033. ;; yascroll
  1034. (yascroll:thumb-text-area ((t :background ,(gc 'bg-2))))
  1035. (yascroll:thumb-fringe ((t :background ,(gc 'bg-2)
  1036. :foreground ,(gc 'fg-2)))))
  1037. ;; VARIABLES
  1038. `((ansi-color-names-vector
  1039. [,(gc 'bg-1)
  1040. ,(gc 'red)
  1041. ,(gc 'green)
  1042. ,(gc 'yellow)
  1043. ,(gc 'blue)
  1044. ,(gc 'magenta)
  1045. ,(gc 'cyan)
  1046. ,(gc 'fg+1)])
  1047. ;; emms icon at mode line (is taken from emms source)
  1048. (emms-mode-line-icon-image-cache
  1049. '(image :type xpm :ascent center :data ,(concat "/* XPM */
  1050. static char *note[] = {
  1051. /* width height num_colors chars_per_pixel */
  1052. \" 10 11 2 1\",
  1053. /* colors */
  1054. \". c " (gc 'green+1) "\",
  1055. \"# c None s None\",
  1056. /* pixels */
  1057. \"###...####\",
  1058. \"###.#...##\",
  1059. \"###.###...\",
  1060. \"###.#####.\",
  1061. \"###.#####.\",
  1062. \"#...#####.\",
  1063. \"....#####.\",
  1064. \"#..######.\",
  1065. \"#######...\",
  1066. \"######....\",
  1067. \"#######..#\" };"))
  1068. t)
  1069. ;; gnus icon at mode line (is taken from gnus source)
  1070. (gnus-mode-line-image-cache
  1071. '(image :type xpm :ascent center :data ,(concat "/* XPM */
  1072. static char *gnus-pointer[] = {
  1073. /* width height num_colors chars_per_pixel */
  1074. \" 18 13 2 1\",
  1075. /* colors */
  1076. \". c " (gc 'blue-1) "\",
  1077. \"# c None s None\",
  1078. /* pixels */
  1079. \"##################\",
  1080. \"######..##..######\",
  1081. \"#####........#####\",
  1082. \"#.##.##..##...####\",
  1083. \"#...####.###...##.\",
  1084. \"#..###.######.....\",
  1085. \"#####.########...#\",
  1086. \"###########.######\",
  1087. \"####.###.#..######\",
  1088. \"######..###.######\",
  1089. \"###....####.######\",
  1090. \"###..######.######\",
  1091. \"###########.######\" };"))
  1092. t)
  1093. ;; fill-column-indicator
  1094. (fci-rule-color ,(gc 'bg-2))
  1095. ;; vc-annotate
  1096. (vc-annotate-color-map
  1097. '(( 20 . ,(gc 'red-1))
  1098. ( 40 . ,(gc 'red))
  1099. ( 60 . ,(gc 'yellow-2))
  1100. ( 80 . ,(gc 'yellow-1))
  1101. (100 . ,(gc 'yellow))
  1102. (120 . ,(gc 'yellow+1))
  1103. (140 . ,(gc 'green-1))
  1104. (160 . ,(gc 'green-2))
  1105. (180 . ,(gc 'green))
  1106. (200 . ,(gc 'green+1))
  1107. (220 . ,(gc 'green+2))
  1108. (240 . ,(gc 'cyan-1))
  1109. (260 . ,(gc 'cyan))
  1110. (280 . ,(gc 'cyan-2))
  1111. (300 . ,(gc 'blue-1))
  1112. (320 . ,(gc 'blue))
  1113. (340 . ,(gc 'blue+1))
  1114. (360 . ,(gc 'magenta))))
  1115. (vc-annotate-very-old-color ,(gc 'magenta))
  1116. (vc-annotate-background ,(gc 'bg-2))
  1117. ))))
  1118. (defun alect-substitute-color (theme-name plist prop)
  1119. "Substitute color name for property PROP in property list PLIST.
  1120. Return plist with substituted color value. Replace a color only
  1121. if PROP contains such color name (symbol from `alect-colors').
  1122. This function is destructive: PLIST may not stay the same.
  1123. See `alect-substitute-colors-in-plist' for details."
  1124. (let ((color-name (plist-get plist prop))
  1125. color-val)
  1126. (and (symbolp color-name)
  1127. (setq color-val (alect-get-color theme-name color-name))
  1128. (setq plist (plist-put plist prop color-val)))
  1129. plist))
  1130. (defun alect-substitute-colors-in-plist (theme-name plist)
  1131. "Substitute color names in property list PLIST with color values.
  1132. PLIST can also be a list containing property list.
  1133. Color values (strings) are defined by color names (symbols) for a
  1134. specified theme THEME-NAME from `alect-colors' variable. Replace
  1135. colors for the `:foreground' and `:background' properties. If
  1136. there is also `:box' property in PLIST, replace its `:color'
  1137. property as well.
  1138. Return plist with substituted colors. This function is
  1139. destructive: PLIST may not stay the same."
  1140. (if (and (listp (car plist))
  1141. (null (cdr plist)))
  1142. (alect-substitute-colors-in-plist theme-name (car plist))
  1143. (setq plist (alect-substitute-color theme-name plist :foreground))
  1144. (setq plist (alect-substitute-color theme-name plist :background))
  1145. (let ((box-plist (plist-get plist :box)))
  1146. (and box-plist
  1147. (setq box-plist (alect-substitute-color theme-name box-plist :color))
  1148. (setq plist (plist-put plist :box box-plist))))
  1149. plist))
  1150. (defun alect-substitute-colors-in-faces (theme-name faces)
  1151. "Substitute color names in a list FACES with color values.
  1152. FACES is a list of face specifications accepted by
  1153. `custom-theme-set-faces'.
  1154. Return a list of faces with substituted colors. This function is
  1155. destructive: FACES may not stay the same.
  1156. See `alect-substitute-colors-in-plist' for details."
  1157. (mapcar (lambda (face)
  1158. (list (car face)
  1159. (mapcar (lambda (spec)
  1160. (cons (car spec)
  1161. (alect-substitute-colors-in-plist
  1162. theme-name (cdr spec))))
  1163. (cadr face))))
  1164. faces))
  1165. (defun alect-override-faces (original overriding)
  1166. "Override faces from ORIGINAL list with faces from OVERRIDING list.
  1167. Both ORIGINAL and OVERRIDING are lists of face specifications
  1168. accepted by `custom-theme-set-faces'.
  1169. Replace face specifications from ORIGINAL list with the ones from
  1170. OVERRIDING list, add new faces from OVERRIDING list, and return the
  1171. resulting list.
  1172. This function is destructive: ORIGINAL list may not stay the same."
  1173. (mapc (lambda (face)
  1174. (let ((orig-face (assoc (car face) original)))
  1175. (and orig-face
  1176. (setq original (delete orig-face original)))
  1177. (add-to-list 'original face)))
  1178. overriding)
  1179. original)
  1180. (defmacro alect-create-theme (theme &optional invert)
  1181. "Define and provide a color theme THEME.
  1182. For INVERT, see `alect-get-color'."
  1183. (let* ((theme-name (intern (concat "alect-"
  1184. (symbol-name theme)
  1185. (and invert "-alt"))))
  1186. (theme-vals (alect-get-customization theme invert))
  1187. (theme-faces (alect-override-faces
  1188. (car theme-vals)
  1189. (alect-substitute-colors-in-faces
  1190. theme (copy-tree alect-overriding-faces))))
  1191. (theme-vars (cdr theme-vals)))
  1192. ;; FIXME is there a way to avoid this?: variables are not set with
  1193. ;; `custom-theme-set-variables' if they have not been defined yet
  1194. (defvar emms-mode-line-icon-image-cache nil)
  1195. (defvar gnus-mode-line-image-cache nil)
  1196. `(progn
  1197. (deftheme ,theme-name ,(format "The %s color theme."
  1198. (concat (and invert "alternative ")
  1199. (symbol-name theme))))
  1200. (apply 'custom-theme-set-variables ',theme-name ',theme-vars)
  1201. (apply 'custom-theme-set-faces ',theme-name ',theme-faces)
  1202. (provide-theme ',theme-name))))
  1203. ;;;###autoload
  1204. (and load-file-name
  1205. (boundp 'custom-theme-load-path)
  1206. (add-to-list 'custom-theme-load-path
  1207. (file-name-as-directory
  1208. (file-name-directory load-file-name))))
  1209. (provide 'alect-themes)
  1210. ;; Local Variables:
  1211. ;; fill-column: 72
  1212. ;; eval: (and (fboundp 'rainbow-mode) (rainbow-mode))
  1213. ;; End:
  1214. ;;; alect-themes.el ends here