Fix bug #9221 with memory leak in bidi display.
[bpt/emacs.git] / etc / themes / dichromacy-theme.el
1 ;;; dichromacy-theme.el --- color theme suitable for color-blind users
2
3 ;; Copyright (C) 2011 Free Software Foundation, Inc.
4
5 ;; Author: Chong Yidong <cyd@stupidchicken>
6
7 ;; This file is part of GNU Emacs.
8
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.
13
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.
18
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/>.
21
22 ;;; Code:
23
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.
29
30 Basic, Font Lock, Isearch, Gnus, Message, Flyspell, and
31 Ansi-Color faces are included.")
32
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 (:foreground "white" :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 ;; Font lock faces
64 `(font-lock-builtin-face ((,class (:foreground ,blue))))
65 `(font-lock-comment-face ((,class (:slant italic :foreground ,bluegreen))))
66 `(font-lock-constant-face ((,class (:weight bold :foreground ,vermillion))))
67 `(font-lock-function-name-face ((,class (:foreground ,vermillion))))
68 `(font-lock-keyword-face ((,class (:weight bold :foreground ,skyblue))))
69 `(font-lock-string-face ((,class (:foreground ,bluegray))))
70 `(font-lock-type-face ((,class (:weight bold :foreground ,blue))))
71 `(font-lock-variable-name-face ((,class (:weight bold :foreground ,orange))))
72 `(font-lock-warning-face ((,class (:weight bold :slant italic
73 :foreground ,vermillion))))
74 ;; Button and link faces
75 `(link ((,class (:underline t :foreground ,blue))))
76 `(link-visited ((,class (:underline t :foreground ,redpurple))))
77 ;; Gnus faces
78 `(gnus-group-news-1 ((,class (:weight bold :foreground ,vermillion))))
79 `(gnus-group-news-1-low ((,class (:foreground ,vermillion))))
80 `(gnus-group-news-2 ((,class (:weight bold :foreground ,orange))))
81 `(gnus-group-news-2-low ((,class (:foreground ,orange))))
82 `(gnus-group-news-3 ((,class (:weight bold :foreground ,skyblue))))
83 `(gnus-group-news-3-low ((,class (:foreground ,skyblue))))
84 `(gnus-group-news-4 ((,class (:weight bold :foreground ,redpurple))))
85 `(gnus-group-news-4-low ((,class (:foreground ,redpurple))))
86 `(gnus-group-news-5 ((,class (:weight bold :foreground ,blue))))
87 `(gnus-group-news-5-low ((,class (:foreground ,blue))))
88 `(gnus-group-news-low ((,class (:foreground ,bluegreen))))
89 `(gnus-group-mail-1 ((,class (:weight bold :foreground ,vermillion))))
90 `(gnus-group-mail-1-low ((,class (:foreground ,vermillion))))
91 `(gnus-group-mail-2 ((,class (:weight bold :foreground ,orange))))
92 `(gnus-group-mail-2-low ((,class (:foreground ,orange))))
93 `(gnus-group-mail-3 ((,class (:weight bold :foreground ,skyblue))))
94 `(gnus-group-mail-3-low ((,class (:foreground ,skyblue))))
95 `(gnus-group-mail-low ((,class (:foreground ,bluegreen))))
96 `(gnus-header-content ((,class (:foreground ,redpurple))))
97 `(gnus-header-from ((,class (:weight bold :foreground ,blue))))
98 `(gnus-header-subject ((,class (:foreground ,orange))))
99 `(gnus-header-name ((,class (:foreground ,skyblue))))
100 `(gnus-header-newsgroups ((,class (:foreground ,vermillion))))
101 ;; Message faces
102 `(message-header-name ((,class (:foreground ,skyblue))))
103 `(message-header-cc ((,class (:foreground ,vermillion))))
104 `(message-header-other ((,class (:foreground ,bluegreen))))
105 `(message-header-subject ((,class (:foreground ,orange))))
106 `(message-header-to ((,class (:weight bold :foreground ,blue))))
107 `(message-cited-text ((,class (:slant italic :foreground ,bluegreen))))
108 `(message-separator ((,class (:weight bold :foreground ,redpurple))))
109 ;; Flyspell
110 `(flyspell-duplicate ((,class (:weight unspecified :foreground unspecified
111 :slant unspecified :underline ,orange))))
112 `(flyspell-incorrect ((,class (:weight unspecified :foreground unspecified
113 :slant unspecified :underline ,redpurple)))))
114
115 (custom-theme-set-variables
116 'dichromacy
117 `(ansi-color-names-vector ["black" ,vermillion ,bluegreen ,yellow
118 ,blue ,redpurple ,skyblue "white"])))
119
120 (provide-theme 'dichromacy)
121
122 ;; Local Variables:
123 ;; no-byte-compile: t
124 ;; End:
125
126 ;;; dichromacy-theme.el ends here