* lisp/dom.el (dom-strings): New function.
[emacs.git] / etc / themes / dichromacy-theme.el
bloba11d372068b465cb0e8efe8bf38e385bbd0ce075
1 ;;; dichromacy-theme.el --- color theme suitable for color-blind users
3 ;; Copyright (C) 2011-2015 Free Software Foundation, Inc.
5 ;; Author: Chong Yidong <cyd@stupidchicken>
7 ;; This file is part of GNU Emacs.
9 ;; GNU Emacs 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.
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
22 ;;; Code:
24 (deftheme dichromacy
25 "Face colors suitable for red/green color-blind users.
26 The color palette is from B. Wong, Nature Methods 8, 441 (2011).
27 It is intended to provide good variability while being easily
28 differentiated by individuals with protanopia or deuteranopia.
30 Basic, Font Lock, Isearch, Gnus, Message, Flyspell, and
31 Ansi-Color faces are included.")
33 (let ((class '((class color) (min-colors 89)))
34 (orange "#e69f00")
35 (skyblue "#56b4e9")
36 (bluegreen "#009e73")
37 (yellow "#f8ec59")
38 (blue "#0072b2")
39 (vermillion "#d55e00")
40 (redpurple "#cc79a7")
41 (bluegray "#848ea9"))
42 (custom-theme-set-faces
43 'dichromacy
44 `(default ((,class (:foreground "black" :background "white"))))
45 `(cursor ((,class (:background "black"))))
46 ;; Highlighting faces
47 `(fringe ((,class (:background "#f7f7f7"))))
48 `(highlight ((,class (:foreground ,blue :background "#e5e5e5"))))
49 `(region ((,class (:foreground unspecified :background ,yellow))))
50 `(secondary-selection ((,class (:background "#e5e5e5"))))
51 `(isearch ((,class (:foreground "white" :background ,vermillion))))
52 `(lazy-highlight ((,class (:foreground "white" :background ,redpurple))))
53 `(trailing-whitespace ((,class (:background ,vermillion))))
54 ;; Mode line faces
55 `(mode-line ((,class (:box (:line-width -1 :style released-button)
56 :background "#e5e5e5" :foreground "black"))))
57 `(mode-line-inactive ((,class (:box (:line-width -1 :style released-button)
58 :background "#b0b0b0"
59 :foreground "black"))))
60 ;; Escape and prompt faces
61 `(minibuffer-prompt ((,class (:weight bold :foreground ,blue))))
62 `(escape-glyph ((,class (:foreground ,vermillion))))
63 `(error ((,class (:weight bold :slant italic
64 :foreground ,vermillion))))
65 `(warning ((,class (:foreground ,orange))))
66 `(success ((,class (:foreground ,bluegreen))))
67 ;; Font lock faces
68 `(font-lock-builtin-face ((,class (:foreground ,blue))))
69 `(font-lock-comment-face ((,class (:slant italic :foreground ,bluegreen))))
70 `(font-lock-constant-face ((,class (:weight bold :foreground ,vermillion))))
71 `(font-lock-function-name-face ((,class (:foreground ,vermillion))))
72 `(font-lock-keyword-face ((,class (:weight bold :foreground ,skyblue))))
73 `(font-lock-string-face ((,class (:foreground ,bluegray))))
74 `(font-lock-type-face ((,class (:weight bold :foreground ,blue))))
75 `(font-lock-variable-name-face ((,class (:weight bold :foreground ,orange))))
76 ;; Button and link faces
77 `(link ((,class (:underline t :foreground ,blue))))
78 `(link-visited ((,class (:underline t :foreground ,redpurple))))
79 ;; Gnus faces
80 `(gnus-group-news-1 ((,class (:weight bold :foreground ,vermillion))))
81 `(gnus-group-news-1-low ((,class (:foreground ,vermillion))))
82 `(gnus-group-news-2 ((,class (:weight bold :foreground ,orange))))
83 `(gnus-group-news-2-low ((,class (:foreground ,orange))))
84 `(gnus-group-news-3 ((,class (:weight bold :foreground ,skyblue))))
85 `(gnus-group-news-3-low ((,class (:foreground ,skyblue))))
86 `(gnus-group-news-4 ((,class (:weight bold :foreground ,redpurple))))
87 `(gnus-group-news-4-low ((,class (:foreground ,redpurple))))
88 `(gnus-group-news-5 ((,class (:weight bold :foreground ,blue))))
89 `(gnus-group-news-5-low ((,class (:foreground ,blue))))
90 `(gnus-group-news-low ((,class (:foreground ,bluegreen))))
91 `(gnus-group-mail-1 ((,class (:weight bold :foreground ,vermillion))))
92 `(gnus-group-mail-1-low ((,class (:foreground ,vermillion))))
93 `(gnus-group-mail-2 ((,class (:weight bold :foreground ,orange))))
94 `(gnus-group-mail-2-low ((,class (:foreground ,orange))))
95 `(gnus-group-mail-3 ((,class (:weight bold :foreground ,skyblue))))
96 `(gnus-group-mail-3-low ((,class (:foreground ,skyblue))))
97 `(gnus-group-mail-low ((,class (:foreground ,bluegreen))))
98 `(gnus-header-content ((,class (:foreground ,redpurple))))
99 `(gnus-header-from ((,class (:weight bold :foreground ,blue))))
100 `(gnus-header-subject ((,class (:foreground ,orange))))
101 `(gnus-header-name ((,class (:foreground ,skyblue))))
102 `(gnus-header-newsgroups ((,class (:foreground ,vermillion))))
103 ;; Message faces
104 `(message-header-name ((,class (:foreground ,skyblue))))
105 `(message-header-cc ((,class (:foreground ,vermillion))))
106 `(message-header-other ((,class (:foreground ,bluegreen))))
107 `(message-header-subject ((,class (:foreground ,orange))))
108 `(message-header-to ((,class (:weight bold :foreground ,blue))))
109 `(message-cited-text ((,class (:slant italic :foreground ,bluegreen))))
110 `(message-separator ((,class (:weight bold :foreground ,redpurple))))
111 ;; Flyspell
112 `(flyspell-duplicate ((,class (:weight unspecified :foreground unspecified
113 :slant unspecified :underline ,orange))))
114 `(flyspell-incorrect ((,class (:weight unspecified :foreground unspecified
115 :slant unspecified :underline ,redpurple)))))
117 (custom-theme-set-variables
118 'dichromacy
119 `(ansi-color-names-vector ["black" ,vermillion ,bluegreen ,yellow
120 ,blue ,redpurple ,skyblue "white"])))
122 (provide-theme 'dichromacy)
124 ;; Local Variables:
125 ;; no-byte-compile: t
126 ;; End:
128 ;;; dichromacy-theme.el ends here