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

639 lines
38 KiB

  1. ;;; dracula-theme.el --- Dracula Theme
  2. ;; Copyright 2015-present, All rights reserved
  3. ;;
  4. ;; Code licensed under the MIT license
  5. ;; Author: film42
  6. ;; Version: 1.7.0
  7. ;; Package-Requires: ((emacs "24.3"))
  8. ;; URL: https://github.com/dracula/emacs
  9. ;;; Commentary:
  10. ;; A dark color theme available for a number of editors.
  11. ;;; Code:
  12. (require 'cl-lib)
  13. (deftheme dracula)
  14. ;;;; Configuration options:
  15. (defgroup dracula nil
  16. "Dracula theme options.
  17. The theme has to be reloaded after changing anything in this group."
  18. :group 'faces)
  19. (defcustom dracula-enlarge-headings t
  20. "Use different font sizes for some headings and titles."
  21. :type 'boolean
  22. :group 'dracula)
  23. (defcustom dracula-height-title-1 1.3
  24. "Font size 100%."
  25. :type 'number
  26. :group 'dracula)
  27. (defcustom dracula-height-title-2 1.1
  28. "Font size 110%."
  29. :type 'number
  30. :group 'dracula)
  31. (defcustom dracula-height-title-3 1.0
  32. "Font size 130%."
  33. :type 'number
  34. :group 'dracula)
  35. (defcustom dracula-height-doc-title 1.44
  36. "Font size 144%."
  37. :type 'number
  38. :group 'dracula)
  39. (defcustom dracula-alternate-mode-line-and-minibuffer nil
  40. "Use less bold and pink in the minibuffer."
  41. :type 'boolean
  42. :group 'dracula)
  43. ;;;; Theme definition:
  44. ;; Assigment form: VARIABLE COLOR [TTY-COLOR]
  45. (let ((colors '(;; Upstream theme color
  46. (dracula-bg "#282a36" "#262626" nil) ; official background
  47. (dracula-fg "#f8f8f2" "#ffffff" "brightwhite") ; official foreground
  48. (dracula-current "#44475a" "#262626" "brightblack") ; official current-line/selection
  49. (dracula-comment "#6272a4" "#7a7a7a" "blue") ; official comment
  50. (dracula-cyan "#8be9fd" "#88eeff" "brightcyan") ; official cyan
  51. (dracula-green "#50fa7b" "#55ff77" "green") ; official green
  52. (dracula-orange "#ffb86c" "#ffbb66" "brightred") ; official orange
  53. (dracula-pink "#ff79c6" "#ff77cc" "magenta") ; official pink
  54. (dracula-purple "#bd93f9" "#bb99ff" "brightmagenta") ; official purple
  55. (dracula-red "#ff5555" "#ff6655" "red") ; official red
  56. (dracula-yellow "#f1fa8c" "#ffff88" "yellow") ; official yellow
  57. ;; Other colors
  58. (bg2 "#373844" "#2e2e2e" "brightblack")
  59. (bg3 "#464752" "#262626" "brightblack")
  60. (bg4 "#565761" "#3f3f3f" "brightblack")
  61. (fg2 "#e2e2dc" "#bfbfbf" "brightwhite")
  62. (fg3 "#ccccc7" "#cccccc" "white")
  63. (fg4 "#b6b6b2" "#bbbbbb" "white")
  64. (other-blue "#0189cc" "#0088cc" "brightblue")))
  65. (faces '(;; default
  66. (cursor :background ,fg3)
  67. (completions-first-difference :foreground ,dracula-pink :weight bold)
  68. (default :background ,dracula-bg :foreground ,dracula-fg)
  69. (default-italic :slant italic)
  70. (ffap :foreground ,fg4)
  71. (fringe :background ,dracula-bg :foreground ,fg4)
  72. (highlight :foreground ,fg3 :background ,bg3)
  73. (hl-line :background ,dracula-current :extend t)
  74. (info-quoted-name :foreground ,dracula-orange)
  75. (info-string :foreground ,dracula-yellow)
  76. (lazy-highlight :foreground ,fg2 :background ,bg2)
  77. (link :foreground ,dracula-cyan :underline t)
  78. (linum :slant italic :foreground ,bg4 :background ,dracula-bg)
  79. (line-number :slant italic :foreground ,bg4 :background ,dracula-bg)
  80. (match :background ,dracula-yellow :foreground ,dracula-bg)
  81. (minibuffer-prompt
  82. ,@(if dracula-alternate-mode-line-and-minibuffer
  83. (list :weight 'normal :foreground dracula-fg)
  84. (list :weight 'bold :foreground dracula-pink)))
  85. (read-multiple-choice-face :inherit completions-first-difference)
  86. (region :inherit match :extend t)
  87. (trailing-whitespace :foreground nil :background ,dracula-orange)
  88. (vertical-border :foreground ,bg2)
  89. (success :foreground ,dracula-green)
  90. (warning :foreground ,dracula-orange)
  91. (error :foreground ,dracula-red)
  92. (header-line :background ,dracula-bg)
  93. ;; syntax
  94. (font-lock-builtin-face :foreground ,dracula-orange)
  95. (font-lock-comment-face :foreground ,dracula-comment)
  96. (font-lock-comment-delimiter-face :foreground ,dracula-comment)
  97. (font-lock-constant-face :foreground ,dracula-cyan)
  98. (font-lock-doc-face :foreground ,dracula-comment)
  99. (font-lock-function-name-face :foreground ,dracula-green :weight bold)
  100. (font-lock-keyword-face :weight bold :foreground ,dracula-pink)
  101. (font-lock-negation-char-face :foreground ,dracula-cyan)
  102. (font-lock-preprocessor-face :foreground ,dracula-orange)
  103. (font-lock-reference-face :foreground ,dracula-cyan)
  104. (font-lock-regexp-grouping-backslash :foreground ,dracula-cyan)
  105. (font-lock-regexp-grouping-construct :foreground ,dracula-purple)
  106. (font-lock-string-face :foreground ,dracula-yellow)
  107. (font-lock-type-face :foreground ,dracula-purple)
  108. (font-lock-variable-name-face :foreground ,dracula-fg
  109. :weight bold)
  110. (font-lock-warning-face :foreground ,dracula-orange :background ,bg2)
  111. ;; auto-complete
  112. (ac-completion-face :underline t :foreground ,dracula-pink)
  113. ;; company
  114. (company-echo-common :foreground ,dracula-bg :background ,dracula-fg)
  115. (company-preview :background ,dracula-bg :foreground ,other-blue)
  116. (company-preview-common :foreground ,bg2 :foreground ,fg3)
  117. (company-preview-search :foreground ,dracula-purple :background ,dracula-bg)
  118. (company-scrollbar-bg :background ,bg3)
  119. (company-scrollbar-fg :foreground ,dracula-pink)
  120. (company-template-field :inherit match)
  121. (company-tooltip :foreground ,fg2 :background ,dracula-bg :weight bold)
  122. (company-tooltip-annotation :foreground ,dracula-cyan)
  123. (company-tooltip-common :foreground ,fg3)
  124. (company-tooltip-common-selection :foreground ,dracula-yellow)
  125. (company-tooltip-mouse :inherit highlight)
  126. (company-tooltip-selection :background ,bg3 :foreground ,fg3)
  127. ;; diff-hl
  128. (diff-hl-change :foreground ,dracula-orange :background ,dracula-orange)
  129. (diff-hl-delete :foreground ,dracula-red :background ,dracula-red)
  130. (diff-hl-insert :foreground ,dracula-green :background ,dracula-green)
  131. ;; dired
  132. (dired-directory :foreground ,dracula-green :weight normal)
  133. (dired-flagged :foreground ,dracula-pink)
  134. (dired-header :foreground ,fg3 :background ,dracula-bg)
  135. (dired-ignored :inherit shadow)
  136. (dired-mark :foreground ,dracula-fg :weight bold)
  137. (dired-marked :foreground ,dracula-orange :weight bold)
  138. (dired-perm-write :foreground ,fg3 :underline t)
  139. (dired-symlink :foreground ,dracula-yellow :weight normal :slant italic)
  140. (dired-warning :foreground ,dracula-orange :underline t)
  141. (diredp-compressed-file-name :foreground ,fg3)
  142. (diredp-compressed-file-suffix :foreground ,fg4)
  143. (diredp-date-time :foreground ,dracula-fg)
  144. (diredp-deletion-file-name :foreground ,dracula-pink :background ,dracula-current)
  145. (diredp-deletion :foreground ,dracula-pink :weight bold)
  146. (diredp-dir-heading :foreground ,fg2 :background ,bg4)
  147. (diredp-dir-name :inherit dired-directory)
  148. (diredp-dir-priv :inherit dired-directory)
  149. (diredp-executable-tag :foreground ,dracula-orange)
  150. (diredp-file-name :foreground ,dracula-fg)
  151. (diredp-file-suffix :foreground ,fg4)
  152. (diredp-flag-mark-line :foreground ,fg2 :slant italic :background ,dracula-current)
  153. (diredp-flag-mark :foreground ,fg2 :weight bold :background ,dracula-current)
  154. (diredp-ignored-file-name :foreground ,dracula-fg)
  155. (diredp-mode-line-flagged :foreground ,dracula-orange)
  156. (diredp-mode-line-marked :foreground ,dracula-orange)
  157. (diredp-no-priv :foreground ,dracula-fg)
  158. (diredp-number :foreground ,dracula-cyan)
  159. (diredp-other-priv :foreground ,dracula-orange)
  160. (diredp-rare-priv :foreground ,dracula-orange)
  161. (diredp-read-priv :foreground ,dracula-purple)
  162. (diredp-write-priv :foreground ,dracula-pink)
  163. (diredp-exec-priv :foreground ,dracula-yellow)
  164. (diredp-symlink :foreground ,dracula-orange)
  165. (diredp-link-priv :foreground ,dracula-orange)
  166. (diredp-autofile-name :foreground ,dracula-yellow)
  167. (diredp-tagged-autofile-name :foreground ,dracula-yellow)
  168. ;; enh-ruby
  169. (enh-ruby-heredoc-delimiter-face :foreground ,dracula-yellow)
  170. (enh-ruby-op-face :foreground ,dracula-pink)
  171. (enh-ruby-regexp-delimiter-face :foreground ,dracula-yellow)
  172. (enh-ruby-string-delimiter-face :foreground ,dracula-yellow)
  173. ;; flyspell
  174. (flyspell-duplicate :underline (:style wave :color ,dracula-orange))
  175. (flyspell-incorrect :underline (:style wave :color ,dracula-red))
  176. ;; font-latex
  177. (font-latex-bold-face :foreground ,dracula-purple)
  178. (font-latex-italic-face :foreground ,dracula-pink :slant italic)
  179. (font-latex-match-reference-keywords :foreground ,dracula-cyan)
  180. (font-latex-match-variable-keywords :foreground ,dracula-fg)
  181. (font-latex-string-face :foreground ,dracula-yellow)
  182. ;; gnus-group
  183. (gnus-group-mail-1 :foreground ,dracula-pink :weight bold)
  184. (gnus-group-mail-1-empty :inherit gnus-group-mail-1 :weight normal)
  185. (gnus-group-mail-2 :foreground ,dracula-cyan :weight bold)
  186. (gnus-group-mail-2-empty :inherit gnus-group-mail-2 :weight normal)
  187. (gnus-group-mail-3 :foreground ,dracula-comment :weight bold)
  188. (gnus-group-mail-3-empty :inherit gnus-group-mail-3 :weight normal)
  189. (gnus-group-mail-low :foreground ,dracula-current :weight bold)
  190. (gnus-group-mail-low-empty :inherit gnus-group-mail-low :weight normal)
  191. (gnus-group-news-1 :foreground ,dracula-pink :weight bold)
  192. (gnus-group-news-1-empty :inherit gnus-group-news-1 :weight normal)
  193. (gnus-group-news-2 :foreground ,dracula-cyan :weight bold)
  194. (gnus-group-news-2-empty :inherit gnus-group-news-2 :weight normal)
  195. (gnus-group-news-3 :foreground ,dracula-comment :weight bold)
  196. (gnus-group-news-3-empty :inherit gnus-group-news-3 :weight normal)
  197. (gnus-group-news-4 :inherit gnus-group-news-low)
  198. (gnus-group-news-4-empty :inherit gnus-group-news-low-empty)
  199. (gnus-group-news-5 :inherit gnus-group-news-low)
  200. (gnus-group-news-5-empty :inherit gnus-group-news-low-empty)
  201. (gnus-group-news-6 :inherit gnus-group-news-low)
  202. (gnus-group-news-6-empty :inherit gnus-group-news-low-empty)
  203. (gnus-group-news-low :foreground ,dracula-current :weight bold)
  204. (gnus-group-news-low-empty :inherit gnus-group-news-low :weight normal)
  205. (gnus-header-content :foreground ,dracula-pink)
  206. (gnus-header-from :foreground ,dracula-fg)
  207. (gnus-header-name :foreground ,dracula-purple)
  208. (gnus-header-subject :foreground ,dracula-green :weight bold)
  209. (gnus-summary-markup-face :foreground ,dracula-cyan)
  210. (gnus-summary-high-unread :foreground ,dracula-pink :weight bold)
  211. (gnus-summary-high-read :inherit gnus-summary-high-unread :weight normal)
  212. (gnus-summary-high-ancient :inherit gnus-summary-high-read)
  213. (gnus-summary-high-ticked :inherit gnus-summary-high-read :underline t)
  214. (gnus-summary-normal-unread :foreground ,other-blue :weight bold)
  215. (gnus-summary-normal-read :foreground ,dracula-comment :weight normal)
  216. (gnus-summary-normal-ancient :inherit gnus-summary-normal-read :weight light)
  217. (gnus-summary-normal-ticked :foreground ,dracula-pink :weight bold)
  218. (gnus-summary-low-unread :foreground ,dracula-comment :weight bold)
  219. (gnus-summary-low-read :inherit gnus-summary-low-unread :weight normal)
  220. (gnus-summary-low-ancient :inherit gnus-summary-low-read)
  221. (gnus-summary-low-ticked :inherit gnus-summary-low-read :underline t)
  222. (gnus-summary-selected :inverse-video t)
  223. ;; haskell-mode
  224. (haskell-operator-face :foreground ,dracula-pink)
  225. (haskell-constructor-face :foreground ,dracula-purple)
  226. ;; helm
  227. (helm-bookmark-w3m :foreground ,dracula-purple)
  228. (helm-buffer-not-saved :foreground ,dracula-purple :background ,dracula-bg)
  229. (helm-buffer-process :foreground ,dracula-orange :background ,dracula-bg)
  230. (helm-buffer-saved-out :foreground ,dracula-fg :background ,dracula-bg)
  231. (helm-buffer-size :foreground ,dracula-fg :background ,dracula-bg)
  232. (helm-candidate-number :foreground ,dracula-bg :background ,dracula-fg)
  233. (helm-ff-directory :foreground ,dracula-green :background ,dracula-bg :weight bold)
  234. (helm-ff-dotted-directory :foreground ,dracula-green :background ,dracula-bg :weight normal)
  235. (helm-ff-executable :foreground ,other-blue :background ,dracula-bg :weight normal)
  236. (helm-ff-file :foreground ,dracula-fg :background ,dracula-bg :weight normal)
  237. (helm-ff-invalid-symlink :foreground ,dracula-pink :background ,dracula-bg :weight bold)
  238. (helm-ff-prefix :foreground ,dracula-bg :background ,dracula-pink :weight normal)
  239. (helm-ff-symlink :foreground ,dracula-pink :background ,dracula-bg :weight bold)
  240. (helm-grep-cmd-line :foreground ,dracula-fg :background ,dracula-bg)
  241. (helm-grep-file :foreground ,dracula-fg :background ,dracula-bg)
  242. (helm-grep-finish :foreground ,fg2 :background ,dracula-bg)
  243. (helm-grep-lineno :foreground ,dracula-fg :background ,dracula-bg)
  244. (helm-grep-match :foreground nil :background nil :inherit helm-match)
  245. (helm-grep-running :foreground ,dracula-green :background ,dracula-bg)
  246. (helm-header :foreground ,fg2 :background ,dracula-bg :underline nil :box nil)
  247. (helm-moccur-buffer :foreground ,dracula-green :background ,dracula-bg)
  248. (helm-selection :background ,bg2 :underline nil)
  249. (helm-selection-line :background ,bg2)
  250. (helm-separator :foreground ,dracula-purple :background ,dracula-bg)
  251. (helm-source-go-package-godoc-description :foreground ,dracula-yellow)
  252. (helm-source-header :foreground ,dracula-pink :background ,dracula-bg :underline nil :weight bold)
  253. (helm-time-zone-current :foreground ,dracula-orange :background ,dracula-bg)
  254. (helm-time-zone-home :foreground ,dracula-purple :background ,dracula-bg)
  255. (helm-visible-mark :foreground ,dracula-bg :background ,bg3)
  256. ;; highlight-indentation minor mode
  257. (highlight-indentation-face :background ,bg2)
  258. ;; icicle
  259. (icicle-whitespace-highlight :background ,dracula-fg)
  260. (icicle-special-candidate :foreground ,fg2)
  261. (icicle-extra-candidate :foreground ,fg2)
  262. (icicle-search-main-regexp-others :foreground ,dracula-fg)
  263. (icicle-search-current-input :foreground ,dracula-pink)
  264. (icicle-search-context-level-8 :foreground ,dracula-orange)
  265. (icicle-search-context-level-7 :foreground ,dracula-orange)
  266. (icicle-search-context-level-6 :foreground ,dracula-orange)
  267. (icicle-search-context-level-5 :foreground ,dracula-orange)
  268. (icicle-search-context-level-4 :foreground ,dracula-orange)
  269. (icicle-search-context-level-3 :foreground ,dracula-orange)
  270. (icicle-search-context-level-2 :foreground ,dracula-orange)
  271. (icicle-search-context-level-1 :foreground ,dracula-orange)
  272. (icicle-search-main-regexp-current :foreground ,dracula-fg)
  273. (icicle-saved-candidate :foreground ,dracula-fg)
  274. (icicle-proxy-candidate :foreground ,dracula-fg)
  275. (icicle-mustmatch-completion :foreground ,dracula-purple)
  276. (icicle-multi-command-completion :foreground ,fg2 :background ,bg2)
  277. (icicle-msg-emphasis :foreground ,dracula-green)
  278. (icicle-mode-line-help :foreground ,fg4)
  279. (icicle-match-highlight-minibuffer :foreground ,dracula-orange)
  280. (icicle-match-highlight-Completions :foreground ,dracula-green)
  281. (icicle-key-complete-menu-local :foreground ,dracula-fg)
  282. (icicle-key-complete-menu :foreground ,dracula-fg)
  283. (icicle-input-completion-fail-lax :foreground ,dracula-pink)
  284. (icicle-input-completion-fail :foreground ,dracula-pink)
  285. (icicle-historical-candidate-other :foreground ,dracula-fg)
  286. (icicle-historical-candidate :foreground ,dracula-fg)
  287. (icicle-current-candidate-highlight :foreground ,dracula-orange :background ,bg3)
  288. (icicle-Completions-instruction-2 :foreground ,fg4)
  289. (icicle-Completions-instruction-1 :foreground ,fg4)
  290. (icicle-completion :foreground ,dracula-fg)
  291. (icicle-complete-input :foreground ,dracula-orange)
  292. (icicle-common-match-highlight-Completions :foreground ,dracula-purple)
  293. (icicle-candidate-part :foreground ,dracula-fg)
  294. (icicle-annotation :foreground ,fg4)
  295. ;; icomplete
  296. (icompletep-determined :foreground ,dracula-orange)
  297. ;; ido
  298. (ido-first-match
  299. ,@(if dracula-alternate-mode-line-and-minibuffer
  300. (list :weight 'normal :foreground dracula-green)
  301. (list :weight 'bold :foreground dracula-pink)))
  302. (ido-only-match :foreground ,dracula-orange)
  303. (ido-subdir :foreground ,dracula-yellow)
  304. (ido-virtual :foreground ,dracula-cyan)
  305. (ido-incomplete-regexp :inherit font-lock-warning-face)
  306. (ido-indicator :foreground ,dracula-fg :background ,dracula-pink)
  307. ;; isearch
  308. (isearch :inherit match :weight bold)
  309. (isearch-fail :foreground ,dracula-bg :background ,dracula-orange)
  310. ;; jde-java
  311. (jde-java-font-lock-constant-face :foreground ,dracula-cyan)
  312. (jde-java-font-lock-modifier-face :foreground ,dracula-pink)
  313. (jde-java-font-lock-number-face :foreground ,dracula-fg)
  314. (jde-java-font-lock-package-face :foreground ,dracula-fg)
  315. (jde-java-font-lock-private-face :foreground ,dracula-pink)
  316. (jde-java-font-lock-public-face :foreground ,dracula-pink)
  317. ;; js2-mode
  318. (js2-external-variable :foreground ,dracula-purple)
  319. (js2-function-param :foreground ,dracula-cyan)
  320. (js2-jsdoc-html-tag-delimiter :foreground ,dracula-yellow)
  321. (js2-jsdoc-html-tag-name :foreground ,other-blue)
  322. (js2-jsdoc-value :foreground ,dracula-yellow)
  323. (js2-private-function-call :foreground ,dracula-cyan)
  324. (js2-private-member :foreground ,fg3)
  325. ;; js3-mode
  326. (js3-error-face :underline ,dracula-orange)
  327. (js3-external-variable-face :foreground ,dracula-fg)
  328. (js3-function-param-face :foreground ,dracula-pink)
  329. (js3-instance-member-face :foreground ,dracula-cyan)
  330. (js3-jsdoc-tag-face :foreground ,dracula-pink)
  331. (js3-warning-face :underline ,dracula-pink)
  332. ;; magit
  333. (magit-branch-local :foreground ,dracula-cyan)
  334. (magit-branch-remote :foreground ,dracula-green)
  335. (magit-tag :foreground ,dracula-orange)
  336. (magit-section-heading :foreground ,dracula-pink :weight bold)
  337. (magit-section-highlight :background ,bg3 :extend t)
  338. (magit-diff-context-highlight :background ,bg3
  339. :foreground ,fg3
  340. :extend t)
  341. (magit-diff-revision-summary :foreground ,dracula-orange
  342. :background ,dracula-bg
  343. :weight bold)
  344. (magit-diff-revision-summary-highlight :foreground ,dracula-orange
  345. :background ,bg3
  346. :weight bold
  347. :extend t)
  348. ;; the four following lines are just a patch of the
  349. ;; upstream color to add the extend keyword.
  350. (magit-diff-added :background "#335533"
  351. :foreground "#ddffdd"
  352. :extend t)
  353. (magit-diff-added-highlight :background "#336633"
  354. :foreground "#cceecc"
  355. :extend t)
  356. (magit-diff-removed :background "#553333"
  357. :foreground "#ffdddd"
  358. :extend t)
  359. (magit-diff-removed-highlight :background "#663333"
  360. :foreground "#eecccc"
  361. :extend t)
  362. (magit-diff-file-heading :foreground ,dracula-fg)
  363. (magit-diff-file-heading-highlight :inherit magit-section-highlight)
  364. (magit-diffstat-added :foreground ,dracula-green)
  365. (magit-diffstat-removed :foreground ,dracula-red)
  366. (magit-hash :foreground ,fg2)
  367. (magit-hunk-heading :background ,bg3)
  368. (magit-hunk-heading-highlight :background ,bg3)
  369. (magit-item-highlight :background ,bg3)
  370. (magit-log-author :foreground ,fg3)
  371. (magit-process-ng :foreground ,dracula-orange :weight bold)
  372. (magit-process-ok :foreground ,dracula-green :weight bold)
  373. ;; markdown
  374. (markdown-blockquote-face :foreground ,dracula-orange)
  375. (markdown-code-face :foreground ,dracula-orange)
  376. (markdown-footnote-face :foreground ,other-blue)
  377. (markdown-header-face :weight normal)
  378. (markdown-header-face-1
  379. :inherit bold :foreground ,dracula-pink
  380. ,@(when dracula-enlarge-headings
  381. (list :height dracula-height-title-1)))
  382. (markdown-header-face-2
  383. :inherit bold :foreground ,dracula-purple
  384. ,@(when dracula-enlarge-headings
  385. (list :height dracula-height-title-2)))
  386. (markdown-header-face-3
  387. :foreground ,dracula-green
  388. ,@(when dracula-enlarge-headings
  389. (list :height dracula-height-title-3)))
  390. (markdown-header-face-4 :foreground ,dracula-yellow)
  391. (markdown-header-face-5 :foreground ,dracula-cyan)
  392. (markdown-header-face-6 :foreground ,dracula-orange)
  393. (markdown-header-face-7 :foreground ,other-blue)
  394. (markdown-header-face-8 :foreground ,dracula-fg)
  395. (markdown-inline-code-face :foreground ,dracula-yellow)
  396. (markdown-plain-url-face :inherit link)
  397. (markdown-pre-face :foreground ,dracula-orange)
  398. (markdown-table-face :foreground ,dracula-purple)
  399. ;; message
  400. (message-mml :foreground ,dracula-green :weight normal)
  401. (message-header-xheader :foreground ,dracula-cyan :weight normal)
  402. ;; mode-line
  403. (mode-line :background ,dracula-current
  404. :box ,dracula-current :inverse-video nil
  405. ,@(if dracula-alternate-mode-line-and-minibuffer
  406. (list :foreground fg3)
  407. (list :foreground nil)))
  408. (mode-line-inactive
  409. :inverse-video nil
  410. ,@(if dracula-alternate-mode-line-and-minibuffer
  411. (list :foreground dracula-comment :background dracula-bg
  412. :box dracula-bg)
  413. (list :foreground dracula-fg :background bg2 :box bg2)))
  414. ;; mu4e
  415. (mu4e-unread-face :foreground ,dracula-pink :weight normal)
  416. (mu4e-view-url-number-face :foreground ,dracula-purple)
  417. (mu4e-highlight-face :background ,dracula-bg
  418. :foreground ,dracula-yellow
  419. :extend t)
  420. (mu4e-header-highlight-face :background ,dracula-current
  421. :foreground ,dracula-fg
  422. :underline nil :weight bold
  423. :extend t)
  424. (mu4e-header-key-face :inherit message-mml)
  425. (mu4e-header-marks-face :foreground ,dracula-purple)
  426. (mu4e-cited-1-face :foreground ,dracula-purple)
  427. (mu4e-cited-2-face :foreground ,dracula-orange)
  428. (mu4e-cited-3-face :foreground ,dracula-comment)
  429. (mu4e-cited-4-face :foreground ,fg2)
  430. (mu4e-cited-5-face :foreground ,fg3)
  431. ;; org
  432. (org-agenda-date :foreground ,dracula-cyan :underline nil)
  433. (org-agenda-dimmed-todo-face :foreground ,dracula-comment)
  434. (org-agenda-done :foreground ,dracula-green)
  435. (org-agenda-structure :foreground ,dracula-purple)
  436. (org-block :foreground ,dracula-orange)
  437. (org-code :foreground ,dracula-yellow)
  438. (org-column :background ,bg4)
  439. (org-column-title :inherit org-column :weight bold :underline t)
  440. (org-date :foreground ,dracula-cyan :underline t)
  441. (org-document-info :foreground ,other-blue)
  442. (org-document-info-keyword :foreground ,dracula-comment)
  443. (org-document-title :weight bold :foreground ,dracula-orange
  444. ,@(when dracula-enlarge-headings
  445. (list :height dracula-height-doc-title)))
  446. (org-done :foreground ,dracula-green)
  447. (org-ellipsis :foreground ,dracula-comment)
  448. (org-footnote :foreground ,other-blue)
  449. (org-formula :foreground ,dracula-pink)
  450. (org-headline-done :foreground ,dracula-comment
  451. :weight normal :strike-through t)
  452. (org-hide :foreground ,dracula-bg :background ,dracula-bg)
  453. (org-level-1 :inherit bold :foreground ,dracula-pink
  454. ,@(when dracula-enlarge-headings
  455. (list :height dracula-height-title-1)))
  456. (org-level-2 :inherit bold :foreground ,dracula-purple
  457. ,@(when dracula-enlarge-headings
  458. (list :height dracula-height-title-2)))
  459. (org-level-3 :weight normal :foreground ,dracula-green
  460. ,@(when dracula-enlarge-headings
  461. (list :height dracula-height-title-3)))
  462. (org-level-4 :weight normal :foreground ,dracula-yellow)
  463. (org-level-5 :weight normal :foreground ,dracula-cyan)
  464. (org-level-6 :weight normal :foreground ,dracula-orange)
  465. (org-level-7 :weight normal :foreground ,other-blue)
  466. (org-level-8 :weight normal :foreground ,dracula-fg)
  467. (org-link :foreground ,dracula-cyan :underline t)
  468. (org-priority :foreground ,dracula-cyan)
  469. (org-scheduled :foreground ,dracula-green)
  470. (org-scheduled-previously :foreground ,dracula-yellow)
  471. (org-scheduled-today :foreground ,dracula-green)
  472. (org-sexp-date :foreground ,fg4)
  473. (org-special-keyword :foreground ,dracula-yellow)
  474. (org-table :foreground ,dracula-purple)
  475. (org-tag :foreground ,dracula-pink :weight bold :background ,bg2)
  476. (org-todo :foreground ,dracula-orange :weight bold :background ,bg2)
  477. (org-upcoming-deadline :foreground ,dracula-yellow)
  478. (org-warning :weight bold :foreground ,dracula-pink)
  479. ;; outline
  480. (outline-1 :foreground ,dracula-pink)
  481. (outline-2 :foreground ,dracula-purple)
  482. (outline-3 :foreground ,dracula-green)
  483. (outline-4 :foreground ,dracula-yellow)
  484. (outline-5 :foreground ,dracula-cyan)
  485. (outline-6 :foreground ,dracula-orange)
  486. ;; powerline
  487. (powerline-evil-base-face :foreground ,bg2)
  488. (powerline-evil-emacs-face :inherit powerline-evil-base-face :background ,dracula-yellow)
  489. (powerline-evil-insert-face :inherit powerline-evil-base-face :background ,dracula-cyan)
  490. (powerline-evil-motion-face :inherit powerline-evil-base-face :background ,dracula-purple)
  491. (powerline-evil-normal-face :inherit powerline-evil-base-face :background ,dracula-green)
  492. (powerline-evil-operator-face :inherit powerline-evil-base-face :background ,dracula-pink)
  493. (powerline-evil-replace-face :inherit powerline-evil-base-face :background ,dracula-red)
  494. (powerline-evil-visual-face :inherit powerline-evil-base-face :background ,dracula-orange)
  495. ;; rainbow-delimiters
  496. (rainbow-delimiters-depth-1-face :foreground ,dracula-fg)
  497. (rainbow-delimiters-depth-2-face :foreground ,dracula-cyan)
  498. (rainbow-delimiters-depth-3-face :foreground ,dracula-purple)
  499. (rainbow-delimiters-depth-4-face :foreground ,dracula-pink)
  500. (rainbow-delimiters-depth-5-face :foreground ,dracula-orange)
  501. (rainbow-delimiters-depth-6-face :foreground ,dracula-green)
  502. (rainbow-delimiters-depth-7-face :foreground ,dracula-yellow)
  503. (rainbow-delimiters-depth-8-face :foreground ,other-blue)
  504. (rainbow-delimiters-unmatched-face :foreground ,dracula-orange)
  505. ;; rpm-spec
  506. (rpm-spec-dir-face :foreground ,dracula-green)
  507. (rpm-spec-doc-face :foreground ,dracula-pink)
  508. (rpm-spec-ghost-face :foreground ,dracula-purple)
  509. (rpm-spec-macro-face :foreground ,dracula-yellow)
  510. (rpm-spec-obsolete-tag-face :inherit font-lock-warning-face)
  511. (rpm-spec-package-face :foreground ,dracula-purple)
  512. (rpm-spec-section-face :foreground ,dracula-yellow)
  513. (rpm-spec-tag-face :foreground ,dracula-cyan)
  514. (rpm-spec-var-face :foreground ,dracula-orange)
  515. ;; show-paren
  516. (show-paren-match-face :background unspecified
  517. :foreground ,dracula-cyan
  518. :weight bold)
  519. (show-paren-match :background unspecified
  520. :foreground ,dracula-cyan
  521. :weight bold)
  522. (show-paren-match-expression :inherit match)
  523. (show-paren-mismatch :inherit font-lock-warning-face)
  524. ;; slime
  525. (slime-repl-inputed-output-face :foreground ,dracula-purple)
  526. ;; spam
  527. (spam :inherit gnus-summary-normal-read :foreground ,dracula-orange
  528. :strike-through t :slant oblique)
  529. ;; tab-bar & tab-line (since Emacs 27.1)
  530. (tab-bar :foreground ,dracula-purple :background ,dracula-current
  531. :inherit variable-pitch)
  532. (tab-bar-tab :foreground ,dracula-pink :background ,dracula-bg
  533. :box (:line-width 2 :color ,dracula-bg :style nil))
  534. (tab-bar-tab-inactive :foreground ,dracula-purple :background ,bg2
  535. :box (:line-width 2 :color ,bg2 :style nil))
  536. (tab-line :foreground ,dracula-purple :background ,dracula-current
  537. :height 0.9 :inherit variable-pitch)
  538. (tab-line-tab :foreground ,dracula-pink :background ,dracula-bg
  539. :box (:line-width 2 :color ,dracula-bg :style nil))
  540. (tab-line-tab-inactive :foreground ,dracula-purple :background ,bg2
  541. :box (:line-width 2 :color ,bg2 :style nil))
  542. (tab-line-tab-current :inherit tab-line-tab)
  543. (tab-line-close-highlight :foreground ,dracula-red)
  544. ;; term
  545. (term :foreground ,dracula-fg :background ,dracula-bg)
  546. (term-color-black :foreground ,dracula-bg :background ,dracula-bg)
  547. (term-color-blue :foreground ,dracula-purple :background ,dracula-purple)
  548. (term-color-cyan :foreground ,dracula-cyan :background ,dracula-cyan)
  549. (term-color-green :foreground ,dracula-green :background ,dracula-green)
  550. (term-color-magenta :foreground ,dracula-pink :background ,dracula-pink)
  551. (term-color-red :foreground ,dracula-red :background ,dracula-red)
  552. (term-color-white :foreground ,dracula-fg :background ,dracula-fg)
  553. (term-color-yellow :foreground ,dracula-yellow :background ,dracula-yellow)
  554. ;; undo-tree
  555. (undo-tree-visualizer-current-face :foreground ,dracula-orange)
  556. (undo-tree-visualizer-default-face :foreground ,fg2)
  557. (undo-tree-visualizer-register-face :foreground ,dracula-purple)
  558. (undo-tree-visualizer-unmodified-face :foreground ,dracula-fg)
  559. ;; web-mode
  560. (web-mode-builtin-face :inherit ,font-lock-builtin-face)
  561. (web-mode-comment-face :inherit ,font-lock-comment-face)
  562. (web-mode-constant-face :inherit ,font-lock-constant-face)
  563. (web-mode-doctype-face :inherit ,font-lock-comment-face)
  564. (web-mode-function-name-face :inherit ,font-lock-function-name-face)
  565. (web-mode-html-attr-name-face :foreground ,dracula-purple)
  566. (web-mode-html-attr-value-face :foreground ,dracula-green)
  567. (web-mode-html-tag-face :foreground ,dracula-pink :weight bold)
  568. (web-mode-keyword-face :foreground ,dracula-pink)
  569. (web-mode-string-face :foreground ,dracula-yellow)
  570. (web-mode-type-face :inherit ,font-lock-type-face)
  571. (web-mode-warning-face :inherit ,font-lock-warning-face)
  572. ;; which-func
  573. (which-func :inherit ,font-lock-function-name-face)
  574. ;; whitespace
  575. (whitespace-big-indent :background ,dracula-red :foreground ,dracula-red)
  576. (whitespace-empty :background ,dracula-orange :foreground ,dracula-red)
  577. (whitespace-hspace :background ,bg3 :foreground ,dracula-comment)
  578. (whitespace-indentation :background ,dracula-orange :foreground ,dracula-red)
  579. (whitespace-line :background ,dracula-bg :foreground ,dracula-pink)
  580. (whitespace-newline :foreground ,dracula-comment)
  581. (whitespace-space :background ,dracula-bg :foreground ,dracula-comment)
  582. (whitespace-space-after-tab :background ,dracula-orange :foreground ,dracula-red)
  583. (whitespace-space-before-tab :background ,dracula-orange :foreground ,dracula-red)
  584. (whitespace-tab :background ,bg2 :foreground ,dracula-comment)
  585. (whitespace-trailing :inherit trailing-whitespace)
  586. ;; yard-mode
  587. (yard-tag-face :inherit ,font-lock-builtin-face)
  588. (yard-directive-face :inherit ,font-lock-builtin-face))))
  589. (apply #'custom-theme-set-faces
  590. 'dracula
  591. (let ((color-names (mapcar #'car colors))
  592. (graphic-colors (mapcar #'cadr colors))
  593. (term-colors (mapcar #'car (mapcar #'cddr colors)))
  594. (tty-colors (mapcar #'car (mapcar #'last colors)))
  595. (expand-for-kind (lambda (kind spec)
  596. (cl-progv color-names kind
  597. (eval `(backquote ,spec))))))
  598. (cl-loop for (face . spec) in faces
  599. collect `(,face
  600. ((((min-colors 16777216)) ; fully graphical envs
  601. ,(funcall expand-for-kind graphic-colors spec))
  602. (((min-colors 256)) ; terminal withs 256 colors
  603. ,(funcall expand-for-kind term-colors spec))
  604. (t ; should be only tty-like envs
  605. ,(funcall expand-for-kind tty-colors spec))))))))
  606. ;;;###autoload
  607. (when load-file-name
  608. (add-to-list 'custom-theme-load-path
  609. (file-name-as-directory (file-name-directory load-file-name))))
  610. (provide-theme 'dracula)
  611. ;; Local Variables:
  612. ;; no-byte-compile: t
  613. ;; indent-tabs-mode: nil
  614. ;; End:
  615. ;;; dracula-theme.el ends here