1 ;;; dichromacy-theme.el --- color theme suitable for color-blind users
3 ;; Copyright (C) 2011-2017 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 <https://www.gnu.org/licenses/>.
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)))
39 (vermillion "#d55e00")
42 (custom-theme-set-faces
44 `(default ((,class
(:foreground
"black" :background
"white"))))
45 `(cursor ((,class
(:background
"black"))))
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
))))
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
)
59 :foreground
"black"))))
60 ;; Escape and prompt faces
61 `(minibuffer-prompt ((,class
(:weight bold
:foreground
,blue
))))
62 `(escape-glyph ((,class
(:foreground
,vermillion
))))
63 `(homoglyph ((,class
(:foreground
,vermillion
))))
64 `(error ((,class
(:weight bold
:slant italic
65 :foreground
,vermillion
))))
66 `(warning ((,class
(:foreground
,orange
))))
67 `(success ((,class
(:foreground
,bluegreen
))))
69 `(font-lock-builtin-face ((,class
(:foreground
,blue
))))
70 `(font-lock-comment-face ((,class
(:slant italic
:foreground
,bluegreen
))))
71 `(font-lock-constant-face ((,class
(:weight bold
:foreground
,vermillion
))))
72 `(font-lock-function-name-face ((,class
(:foreground
,vermillion
))))
73 `(font-lock-keyword-face ((,class
(:weight bold
:foreground
,skyblue
))))
74 `(font-lock-string-face ((,class
(:foreground
,bluegray
))))
75 `(font-lock-type-face ((,class
(:weight bold
:foreground
,blue
))))
76 `(font-lock-variable-name-face ((,class
(:weight bold
:foreground
,orange
))))
77 ;; Button and link faces
78 `(link ((,class
(:underline t
:foreground
,blue
))))
79 `(link-visited ((,class
(:underline t
:foreground
,redpurple
))))
81 `(gnus-group-news-1 ((,class
(:weight bold
:foreground
,vermillion
))))
82 `(gnus-group-news-1-low ((,class
(:foreground
,vermillion
))))
83 `(gnus-group-news-2 ((,class
(:weight bold
:foreground
,orange
))))
84 `(gnus-group-news-2-low ((,class
(:foreground
,orange
))))
85 `(gnus-group-news-3 ((,class
(:weight bold
:foreground
,skyblue
))))
86 `(gnus-group-news-3-low ((,class
(:foreground
,skyblue
))))
87 `(gnus-group-news-4 ((,class
(:weight bold
:foreground
,redpurple
))))
88 `(gnus-group-news-4-low ((,class
(:foreground
,redpurple
))))
89 `(gnus-group-news-5 ((,class
(:weight bold
:foreground
,blue
))))
90 `(gnus-group-news-5-low ((,class
(:foreground
,blue
))))
91 `(gnus-group-news-low ((,class
(:foreground
,bluegreen
))))
92 `(gnus-group-mail-1 ((,class
(:weight bold
:foreground
,vermillion
))))
93 `(gnus-group-mail-1-low ((,class
(:foreground
,vermillion
))))
94 `(gnus-group-mail-2 ((,class
(:weight bold
:foreground
,orange
))))
95 `(gnus-group-mail-2-low ((,class
(:foreground
,orange
))))
96 `(gnus-group-mail-3 ((,class
(:weight bold
:foreground
,skyblue
))))
97 `(gnus-group-mail-3-low ((,class
(:foreground
,skyblue
))))
98 `(gnus-group-mail-low ((,class
(:foreground
,bluegreen
))))
99 `(gnus-header-content ((,class
(:foreground
,redpurple
))))
100 `(gnus-header-from ((,class
(:weight bold
:foreground
,blue
))))
101 `(gnus-header-subject ((,class
(:foreground
,orange
))))
102 `(gnus-header-name ((,class
(:foreground
,skyblue
))))
103 `(gnus-header-newsgroups ((,class
(:foreground
,vermillion
))))
105 `(message-header-name ((,class
(:foreground
,skyblue
))))
106 `(message-header-cc ((,class
(:foreground
,vermillion
))))
107 `(message-header-other ((,class
(:foreground
,bluegreen
))))
108 `(message-header-subject ((,class
(:foreground
,orange
))))
109 `(message-header-to ((,class
(:weight bold
:foreground
,blue
))))
110 `(message-cited-text ((,class
(:slant italic
:foreground
,bluegreen
))))
111 `(message-separator ((,class
(:weight bold
:foreground
,redpurple
))))
113 `(flyspell-duplicate ((,class
(:weight unspecified
:foreground unspecified
114 :slant unspecified
:underline
,orange
))))
115 `(flyspell-incorrect ((,class
(:weight unspecified
:foreground unspecified
116 :slant unspecified
:underline
,redpurple
)))))
118 (custom-theme-set-variables
120 `(ansi-color-names-vector ["black" ,vermillion
,bluegreen
,yellow
121 ,blue
,redpurple
,skyblue
"white"])))
123 (provide-theme 'dichromacy
)
126 ;; no-byte-compile: t
129 ;;; dichromacy-theme.el ends here