alect-themes.el 77 KB

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