org-element: Externalize docview links
[org-mode/org-kjn.git] / lisp / org-faces.el
blob36f810e20615bc262665455131ad0cb27b728385
1 ;;; org-faces.el --- Face definitions for Org-mode.
3 ;; Copyright (C) 2004-2014 Free Software Foundation, Inc.
5 ;; Author: Carsten Dominik <carsten at orgmode dot org>
6 ;; Keywords: outlines, hypermedia, calendar, wp
7 ;; Homepage: http://orgmode.org
8 ;;
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation, either version 3 of the License, or
14 ;; (at your option) any later version.
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25 ;;; Commentary:
27 ;; This file contains the face definitions for Org.
29 ;;; Code:
31 (require 'org-macs)
32 (require 'org-compat)
34 (when (featurep 'xemacs)
35 (put 'mode-line 'face-alias 'modeline))
37 (defgroup org-faces nil
38 "Faces in Org-mode."
39 :tag "Org Faces"
40 :group 'org-appearance)
42 (defface org-default
43 (org-compatible-face 'default nil)
44 "Face used for default text."
45 :group 'org-faces)
47 (defface org-hide
48 '((((background light)) (:foreground "white"))
49 (((background dark)) (:foreground "black")))
50 "Face used to hide leading stars in headlines.
51 The foreground color of this face should be equal to the background
52 color of the frame."
53 :group 'org-faces)
55 (defface org-level-1 ;; originally copied from font-lock-function-name-face
56 (org-compatible-face 'outline-1
57 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
58 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
59 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
60 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
61 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
62 (t (:bold t))))
63 "Face used for level 1 headlines."
64 :group 'org-faces)
66 (defface org-level-2 ;; originally copied from font-lock-variable-name-face
67 (org-compatible-face 'outline-2
68 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
69 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
70 (((class color) (min-colors 8) (background light)) (:foreground "yellow"))
71 (((class color) (min-colors 8) (background dark)) (:foreground "yellow" :bold t))
72 (t (:bold t))))
73 "Face used for level 2 headlines."
74 :group 'org-faces)
76 (defface org-level-3 ;; originally copied from font-lock-keyword-face
77 (org-compatible-face 'outline-3
78 '((((class color) (min-colors 88) (background light)) (:foreground "Purple"))
79 (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1"))
80 (((class color) (min-colors 16) (background light)) (:foreground "Purple"))
81 (((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
82 (((class color) (min-colors 8) (background light)) (:foreground "purple" :bold t))
83 (((class color) (min-colors 8) (background dark)) (:foreground "cyan" :bold t))
84 (t (:bold t))))
85 "Face used for level 3 headlines."
86 :group 'org-faces)
88 (defface org-level-4 ;; originally copied from font-lock-comment-face
89 (org-compatible-face 'outline-4
90 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
91 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
92 (((class color) (min-colors 16) (background light)) (:foreground "red"))
93 (((class color) (min-colors 16) (background dark)) (:foreground "red1"))
94 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
95 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
96 (t (:bold t))))
97 "Face used for level 4 headlines."
98 :group 'org-faces)
100 (defface org-level-5 ;; originally copied from font-lock-type-face
101 (org-compatible-face 'outline-5
102 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
103 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
104 (((class color) (min-colors 8)) (:foreground "green"))))
105 "Face used for level 5 headlines."
106 :group 'org-faces)
108 (defface org-level-6 ;; originally copied from font-lock-constant-face
109 (org-compatible-face 'outline-6
110 '((((class color) (min-colors 16) (background light)) (:foreground "CadetBlue"))
111 (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
112 (((class color) (min-colors 8)) (:foreground "magenta"))))
113 "Face used for level 6 headlines."
114 :group 'org-faces)
116 (defface org-level-7 ;; originally copied from font-lock-builtin-face
117 (org-compatible-face 'outline-7
118 '((((class color) (min-colors 16) (background light)) (:foreground "Orchid"))
119 (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue"))
120 (((class color) (min-colors 8)) (:foreground "blue"))))
121 "Face used for level 7 headlines."
122 :group 'org-faces)
124 (defface org-level-8 ;; originally copied from font-lock-string-face
125 (org-compatible-face 'outline-8
126 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
127 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
128 (((class color) (min-colors 8)) (:foreground "green"))))
129 "Face used for level 8 headlines."
130 :group 'org-faces)
132 (defface org-special-keyword ;; originally copied from font-lock-string-face
133 (org-compatible-face 'font-lock-keyword-face
134 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
135 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
136 (t (:italic t))))
137 "Face used for special keywords."
138 :group 'org-faces)
140 (defface org-drawer ;; originally copied from font-lock-function-name-face
141 (org-compatible-face nil
142 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
143 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
144 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
145 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
146 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
147 (t (:bold t))))
148 "Face used for drawers."
149 :group 'org-faces)
151 (defface org-property-value nil
152 "Face used for the value of a property."
153 :group 'org-faces)
155 (defface org-column
156 (org-compatible-face nil
157 '((((class color) (min-colors 16) (background light))
158 (:background "grey90" :weight normal :slant normal :strike-through nil
159 :underline nil))
160 (((class color) (min-colors 16) (background dark))
161 (:background "grey30" :weight normal :slant normal :strike-through nil
162 :underline nil))
163 (((class color) (min-colors 8))
164 (:background "cyan" :foreground "black"
165 :weight normal :slant normal :strike-through nil
166 :underline nil))
167 (t (:inverse-video t))))
168 "Face for column display of entry properties.
169 This is actually only part of the face definition for the text in column view.
170 The following faces apply, with this priority.
172 1. The color of the reference face. This is normally the level fact that
173 is used in the outline. In agenda-mode, it will be the face of the
174 first character in the line. The color is explicitly retained to
175 make sure that the column line still looks a bit like the structure
176 line it is masking.
178 2. The `org-column' face.
180 3. The remaining properties of the reference face.
182 Since column view works by putting overlays with a display property
183 over individual characters in the buffer, the face of the underlining
184 character (this might for example be the a TODO keyword) might still
185 shine through in some properties. So when your column view looks
186 funny, with \"random\" colors, weight, strike-through, try to explicitly
187 set the properties in the `org-column' face. For example, set
188 :underline to nil, or the :slant to `normal'.
190 Under XEmacs, the rules are simpler, because the XEmacs version of
191 column view defines special faces for each outline level. See the file
192 `org-colview-xemacs.el' in Org's contrib/ directory for details."
193 :group 'org-faces)
195 (defface org-column-title
196 (org-compatible-face nil
197 '((((class color) (min-colors 16) (background light))
198 (:background "grey90" :underline t :weight bold))
199 (((class color) (min-colors 16) (background dark))
200 (:background "grey30" :underline t :weight bold))
201 (((class color) (min-colors 8))
202 (:background "cyan" :foreground "black" :underline t :weight bold))
203 (t (:inverse-video t))))
204 "Face for column display of entry properties."
205 :group 'org-faces)
207 (defface org-agenda-column-dateline
208 (org-compatible-face 'org-column
209 '((t nil)))
210 "Face used in agenda column view for datelines with summaries."
211 :group 'org-faces)
213 (defface org-warning
214 (org-compatible-face 'font-lock-warning-face
215 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
216 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
217 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
218 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
219 (t (:bold t))))
220 "Face for deadlines and TODO keywords."
221 :group 'org-faces)
223 (defface org-archived ; similar to shadow
224 (org-compatible-face 'shadow
225 '((((class color grayscale) (min-colors 88) (background light))
226 (:foreground "grey50"))
227 (((class color grayscale) (min-colors 88) (background dark))
228 (:foreground "grey70"))
229 (((class color) (min-colors 8) (background light))
230 (:foreground "green"))
231 (((class color) (min-colors 8) (background dark))
232 (:foreground "yellow"))))
233 "Face for headline with the ARCHIVE tag."
234 :group 'org-faces)
236 (defface org-link
237 (org-compatible-face 'link
238 '((((class color) (background light)) (:foreground "Purple" :underline t))
239 (((class color) (background dark)) (:foreground "Cyan" :underline t))
240 (t (:underline t))))
241 "Face for links."
242 :group 'org-faces)
244 (defface org-footnote
245 '((((class color) (background light)) (:foreground "Purple" :underline t))
246 (((class color) (background dark)) (:foreground "Cyan" :underline t))
247 (t (:underline t)))
248 "Face for footnotes."
249 :group 'org-faces)
251 (defface org-ellipsis
252 '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
253 (((class color) (background dark)) (:foreground "LightGoldenrod" :underline t))
254 (t (:strike-through t)))
255 "Face for the ellipsis in folded text."
256 :group 'org-faces)
258 (defface org-target
259 '((((class color) (background light)) (:underline t))
260 (((class color) (background dark)) (:underline t))
261 (t (:underline t)))
262 "Face for link targets."
263 :group 'org-faces)
265 (defface org-date
266 '((((class color) (background light)) (:foreground "Purple" :underline t))
267 (((class color) (background dark)) (:foreground "Cyan" :underline t))
268 (t (:underline t)))
269 "Face for date/time stamps."
270 :group 'org-faces)
272 (defface org-date-selected
273 (org-compatible-face nil
274 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :inverse-video t))
275 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :inverse-video t))
276 (((class color) (min-colors 8) (background light)) (:foreground "red" :inverse-video t))
277 (((class color) (min-colors 8) (background dark)) (:foreground "red" :inverse-video t))
278 (t (:inverse-video t))))
279 "Face for highlighting the calendar day when using `org-read-date'.
280 Using a bold face here might cause discrepancies while displaying the
281 calendar."
282 :group 'org-faces)
284 (defface org-sexp-date
285 '((((class color) (background light)) (:foreground "Purple"))
286 (((class color) (background dark)) (:foreground "Cyan"))
287 (t (:underline t)))
288 "Face for diary-like sexp date specifications."
289 :group 'org-faces)
291 (defface org-tag
292 '((t (:bold t)))
293 "Default face for tags.
294 Note that the variable `org-tag-faces' can be used to overrule this face for
295 specific tags."
296 :group 'org-faces)
298 (defface org-list-dt
299 '((t (:bold t)))
300 "Default face for definition terms in lists."
301 :group 'org-faces)
303 (defface org-todo ; font-lock-warning-face
304 (org-compatible-face nil
305 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
306 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
307 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
308 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
309 (t (:inverse-video t :bold t))))
310 "Face for TODO keywords."
311 :group 'org-faces)
313 (defface org-done ;; originally copied from font-lock-type-face
314 (org-compatible-face nil
315 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
316 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
317 (((class color) (min-colors 8)) (:foreground "green"))
318 (t (:bold t))))
319 "Face used for todo keywords that indicate DONE items."
320 :group 'org-faces)
322 (defface org-agenda-done ;; originally copied from font-lock-type-face
323 (org-compatible-face nil
324 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
325 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
326 (((class color) (min-colors 8)) (:foreground "green"))
327 (t (:bold nil))))
328 "Face used in agenda, to indicate lines switched to DONE.
329 This face is used to de-emphasize items that where brightly colored in the
330 agenda because they were things to do, or overdue. The DONE state itself
331 is of course immediately visible, but for example a passed deadline is
332 \(by default) very bright read. This face could be simply the default face
333 of the frame, for example."
334 :group 'org-faces)
336 (defface org-headline-done ;; originally copied from font-lock-string-face
337 (org-compatible-face nil
338 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
339 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
340 (((class color) (min-colors 8) (background light)) (:bold nil))))
341 "Face used to indicate that a headline is DONE.
342 This face is only used if `org-fontify-done-headline' is set. If applies
343 to the part of the headline after the DONE keyword."
344 :group 'org-faces)
346 (defcustom org-faces-easy-properties
347 '((todo . :foreground) (tag . :foreground) (priority . :foreground))
348 "The property changes by easy faces.
349 This is an alist, the keys show the area of application, the values
350 can be `:foreground' or `:background'. A color string for special
351 keywords will then be interpreted as either foreground or background
352 color."
353 :group 'org-faces
354 :group 'org-todo
355 :version "24.1"
356 :type '(repeat
357 (cons (choice (const todo) (const tag) (const priority))
358 (choice (const :foreground) (const :background)))))
360 (defcustom org-todo-keyword-faces nil
361 "Faces for specific TODO keywords.
362 This is a list of cons cells, with TODO keywords in the car
363 and faces in the cdr. The face can be a symbol, a color
364 as a string (in which case the rest is inherited from the `org-todo' face),
365 or a property list of attributes, like
366 (:foreground \"blue\" :weight bold :underline t).
367 If it is a color string, the variable `org-faces-easy-properties'
368 determines if it is a foreground or a background color."
369 :group 'org-faces
370 :group 'org-todo
371 :type '(repeat
372 (cons
373 (string :tag "Keyword")
374 (choice :tag "Face "
375 (string :tag "Color")
376 (sexp :tag "Face")))))
378 (defface org-priority ;; originally copied from font-lock-string-face
379 (org-compatible-face 'font-lock-keyword-face
380 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
381 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
382 (t (:italic t))))
383 "Face used for priority cookies."
384 :group 'org-faces)
386 (defcustom org-priority-faces nil
387 "Faces for specific Priorities.
388 This is a list of cons cells, with priority character in the car
389 and faces in the cdr. The face can be a symbol, a color as
390 as a string, or a property list of attributes, like
391 (:foreground \"blue\" :weight bold :underline t).
392 If it is a color string, the variable `org-faces-easy-properties'
393 determines if it is a foreground or a background color."
394 :group 'org-faces
395 :group 'org-todo
396 :type '(repeat
397 (cons
398 (character :tag "Priority")
399 (choice :tag "Face "
400 (string :tag "Color")
401 (sexp :tag "Face")))))
403 (defvar org-tags-special-faces-re nil)
404 (defun org-set-tag-faces (var value)
405 (set var value)
406 (if (not value)
407 (setq org-tags-special-faces-re nil)
408 (setq org-tags-special-faces-re
409 (concat ":\\(" (mapconcat 'car value "\\|") "\\):"))))
411 (defface org-checkbox
412 (org-compatible-face 'bold
413 '((t (:bold t))))
414 "Face for checkboxes."
415 :group 'org-faces)
417 (defface org-checkbox-statistics-todo
418 '((t (:inherit org-todo)))
419 "Face used for unfinished checkbox statistics."
420 :group 'org-faces)
422 (defface org-checkbox-statistics-done
423 '((t (:inherit org-done)))
424 "Face used for finished checkbox statistics."
425 :group 'org-faces)
427 (defcustom org-tag-faces nil
428 "Faces for specific tags.
429 This is a list of cons cells, with tags in the car and faces in the cdr.
430 The face can be a symbol, a foreground color (in which case the rest is
431 inherited from the `org-tag' face) or a property list of attributes,
432 like (:foreground \"blue\" :weight bold :underline t).
433 If you set this variable through customize, it will immediately be effective
434 in new buffers and in modified lines.
435 If you set it with Lisp, a restart of Emacs is required to activate the
436 changes."
437 :group 'org-faces
438 :group 'org-tags
439 :set 'org-set-tag-faces
440 :type '(repeat
441 (cons
442 (string :tag "Tag ")
443 (choice :tag "Face"
444 (string :tag "Foreground color")
445 (sexp :tag "Face")))))
447 (defface org-table ;; originally copied from font-lock-function-name-face
448 (org-compatible-face nil
449 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
450 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
451 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
452 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
453 (((class color) (min-colors 8) (background light)) (:foreground "blue"))
454 (((class color) (min-colors 8) (background dark)))))
455 "Face used for tables."
456 :group 'org-faces)
458 (defface org-formula
459 (org-compatible-face nil
460 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
461 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
462 (((class color) (min-colors 8) (background light)) (:foreground "red"))
463 (((class color) (min-colors 8) (background dark)) (:foreground "red"))
464 (t (:bold t :italic t))))
465 "Face for formulas."
466 :group 'org-faces)
468 (defface org-code
469 (org-compatible-face 'shadow
470 '((((class color grayscale) (min-colors 88) (background light))
471 (:foreground "grey50"))
472 (((class color grayscale) (min-colors 88) (background dark))
473 (:foreground "grey70"))
474 (((class color) (min-colors 8) (background light))
475 (:foreground "green"))
476 (((class color) (min-colors 8) (background dark))
477 (:foreground "yellow"))))
478 "Face for fixed-width text like code snippets."
479 :group 'org-faces
480 :version "22.1")
482 (defface org-meta-line
483 (org-compatible-face 'font-lock-comment-face nil)
484 "Face for meta lines starting with \"#+\"."
485 :group 'org-faces
486 :version "22.1")
488 (defface org-document-title
489 '((((class color) (background light)) (:foreground "midnight blue" :weight bold))
490 (((class color) (background dark)) (:foreground "pale turquoise" :weight bold))
491 (t (:weight bold)))
492 "Face for document title, i.e. that which follows the #+TITLE: keyword."
493 :group 'org-faces)
495 (defface org-document-info
496 '((((class color) (background light)) (:foreground "midnight blue"))
497 (((class color) (background dark)) (:foreground "pale turquoise"))
498 (t nil))
499 "Face for document date, author and email; i.e. that which
500 follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword."
501 :group 'org-faces)
503 (defface org-document-info-keyword
504 (org-compatible-face 'shadow
505 '((((class color grayscale) (min-colors 88) (background light))
506 (:foreground "grey50"))
507 (((class color grayscale) (min-colors 88) (background dark))
508 (:foreground "grey70"))
509 (((class color) (min-colors 8) (background light))
510 (:foreground "green"))
511 (((class color) (min-colors 8) (background dark))
512 (:foreground "yellow"))))
513 "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords."
514 :group 'org-faces)
516 (defface org-block
517 (org-compatible-face 'shadow
518 '((((class color grayscale) (min-colors 88) (background light))
519 (:foreground "grey50"))
520 (((class color grayscale) (min-colors 88) (background dark))
521 (:foreground "grey70"))
522 (((class color) (min-colors 8) (background light))
523 (:foreground "green"))
524 (((class color) (min-colors 8) (background dark))
525 (:foreground "yellow"))))
526 "Face text in #+begin ... #+end blocks."
527 :group 'org-faces
528 :version "22.1")
530 (defface org-block-begin-line
531 '((t (:inherit org-meta-line)))
532 "Face used for the line delimiting the begin of source blocks."
533 :group 'org-faces)
535 (defface org-block-end-line
536 '((t (:inherit org-block-begin-line)))
537 "Face used for the line delimiting the end of source blocks."
538 :group 'org-faces)
540 (defface org-verbatim
541 (org-compatible-face 'shadow
542 '((((class color grayscale) (min-colors 88) (background light))
543 (:foreground "grey50" :underline t))
544 (((class color grayscale) (min-colors 88) (background dark))
545 (:foreground "grey70" :underline t))
546 (((class color) (min-colors 8) (background light))
547 (:foreground "green" :underline t))
548 (((class color) (min-colors 8) (background dark))
549 (:foreground "yellow" :underline t))))
550 "Face for fixed-with text like code snippets."
551 :group 'org-faces
552 :version "22.1")
554 (defface org-quote
555 '((t (:inherit org-block)))
556 "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks."
557 :group 'org-faces)
559 (defface org-verse
560 '((t (:inherit org-block)))
561 "Face for #+BEGIN_VERSE ... #+END_VERSE blocks."
562 :group 'org-faces)
564 (defcustom org-fontify-quote-and-verse-blocks nil
565 "Non-nil means, add a special face to #+begin_quote and #+begin_verse block.
566 When nil, format these as normal Org. This is the default, because the
567 content of these blocks will still be treated as Org syntax."
568 :group 'org-faces
569 :version "24.1"
570 :type 'boolean)
572 (defface org-clock-overlay ;; copied from secondary-selection
573 (org-compatible-face nil
574 '((((class color) (min-colors 88) (background light))
575 (:background "LightGray" :foreground "black"))
576 (((class color) (min-colors 88) (background dark))
577 (:background "SkyBlue4" :foreground "white"))
578 (((class color) (min-colors 16) (background light))
579 (:background "gray" :foreground "black"))
580 (((class color) (min-colors 16) (background dark))
581 (:background "SkyBlue4" :foreground "white"))
582 (((class color) (min-colors 8))
583 (:background "cyan" :foreground "black"))
584 (t (:inverse-video t))))
585 "Basic face for displaying the secondary selection."
586 :group 'org-faces)
588 (defface org-agenda-structure ;; originally copied from font-lock-function-name-face
589 (org-compatible-face nil
590 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
591 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
592 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
593 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
594 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
595 (t (:bold t))))
596 "Face used in agenda for captions and dates."
597 :group 'org-faces)
599 (defface org-agenda-date
600 '((t (:inherit org-agenda-structure)))
601 "Face used in agenda for normal days."
602 :group 'org-faces)
604 (defface org-agenda-date-today
605 '((t (:inherit org-agenda-date :weight bold :italic t)))
606 "Face used in agenda for today."
607 :group 'org-faces)
609 (defface org-agenda-clocking
610 '((t (:inherit secondary-selection)))
611 "Face marking the current clock item in the agenda."
612 :group 'org-faces)
614 (defface org-agenda-date-weekend
615 '((t (:inherit org-agenda-date :weight bold)))
616 "Face used in agenda for weekend days.
618 See the variable `org-agenda-weekend-days' for a definition of
619 which days belong to the weekend."
620 :group 'org-faces)
622 (defface org-scheduled
623 (org-compatible-face nil
624 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
625 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
626 (((class color) (min-colors 8)) (:foreground "green"))
627 (t (:bold t :italic t))))
628 "Face for items scheduled for a certain day."
629 :group 'org-faces)
631 (defface org-scheduled-today
632 (org-compatible-face nil
633 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
634 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
635 (((class color) (min-colors 8)) (:foreground "green"))
636 (t (:bold t :italic t))))
637 "Face for items scheduled for a certain day."
638 :group 'org-faces)
640 (defface org-agenda-dimmed-todo-face
641 '((((background light)) (:foreground "grey50"))
642 (((background dark)) (:foreground "grey50")))
643 "Face used to dim blocked tasks in the agenda."
644 :group 'org-faces)
646 (defface org-scheduled-previously
647 (org-compatible-face nil
648 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
649 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
650 (((class color) (min-colors 8) (background light)) (:foreground "red"))
651 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
652 (t (:bold t))))
653 "Face for items scheduled previously, and not yet done."
654 :group 'org-faces)
656 (defface org-upcoming-deadline
657 (org-compatible-face nil
658 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
659 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
660 (((class color) (min-colors 8) (background light)) (:foreground "red"))
661 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
662 (t (:bold t))))
663 "Face for items scheduled previously, and not yet done."
664 :group 'org-faces)
666 (defcustom org-agenda-deadline-faces
667 '((1.0 . org-warning)
668 (0.5 . org-upcoming-deadline)
669 (0.0 . default))
670 "Faces for showing deadlines in the agenda.
671 This is a list of cons cells. The cdr of each cell is a face to be used,
672 and it can also just be like '(:foreground \"yellow\").
673 Each car is a fraction of the head-warning time that must have passed for
674 this the face in the cdr to be used for display. The numbers must be
675 given in descending order. The head-warning time is normally taken
676 from `org-deadline-warning-days', but can also be specified in the deadline
677 timestamp itself, like this:
679 DEADLINE: <2007-08-13 Mon -8d>
681 You may use d for days, w for weeks, m for months and y for years. Months
682 and years will only be treated in an approximate fashion (30.4 days for a
683 month and 365.24 days for a year)."
684 :group 'org-faces
685 :group 'org-agenda-daily/weekly
686 :type '(repeat
687 (cons
688 (number :tag "Fraction of head-warning time passed")
689 (sexp :tag "Face"))))
691 (defface org-agenda-restriction-lock
692 (org-compatible-face nil
693 '((((class color) (min-colors 88) (background light)) (:background "#eeeeee"))
694 (((class color) (min-colors 88) (background dark)) (:background "#1C1C1C"))
695 (((class color) (min-colors 16) (background light)) (:background "#eeeeee"))
696 (((class color) (min-colors 16) (background dark)) (:background "#1C1C1C"))
697 (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
698 (t (:inverse-video t))))
699 "Face for showing the agenda restriction lock."
700 :group 'org-faces)
702 (defface org-agenda-filter-tags
703 (org-compatible-face 'mode-line nil)
704 "Face for tag(s) in the mode-line when filtering the agenda."
705 :group 'org-faces)
707 (defface org-agenda-filter-regexp
708 (org-compatible-face 'mode-line nil)
709 "Face for regexp(s) in the mode-line when filtering the agenda."
710 :group 'org-faces)
712 (defface org-agenda-filter-category
713 (org-compatible-face 'mode-line nil)
714 "Face for categories(s) in the mode-line when filtering the agenda."
715 :group 'org-faces)
717 (defface org-time-grid ;; originally copied from font-lock-variable-name-face
718 (org-compatible-face nil
719 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
720 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
721 (((class color) (min-colors 8)) (:foreground "yellow" :weight light))))
722 "Face used for time grids."
723 :group 'org-faces)
725 (defface org-agenda-current-time
726 '((t (:inherit org-time-grid)))
727 "Face used to show the current time in the time grid."
728 :group 'org-faces)
730 (defface org-agenda-diary
731 (org-compatible-face 'default nil)
732 "Face used for agenda entries that come from the Emacs diary."
733 :group 'org-faces)
735 (defface org-agenda-calendar-event
736 (org-compatible-face 'default nil)
737 "Face used to show events and appointments in the agenda."
738 :group 'org-faces)
740 (defface org-agenda-calendar-sexp
741 (org-compatible-face 'default nil)
742 "Face used to show events computed from a S-expression."
743 :group 'org-faces)
745 (defconst org-level-faces
746 '(org-level-1 org-level-2 org-level-3 org-level-4
747 org-level-5 org-level-6 org-level-7 org-level-8
750 (defcustom org-n-level-faces (length org-level-faces)
751 "The number of different faces to be used for headlines.
752 Org-mode defines 8 different headline faces, so this can be at most 8.
753 If it is less than 8, the level-1 face gets re-used for level N+1 etc."
754 :type 'integer
755 :group 'org-faces)
757 (defcustom org-cycle-level-faces t
758 "Non-nil means level styles cycle after level `org-n-level-faces'.
759 Then so level org-n-level-faces+1 is styled like level 1.
760 If nil, then all levels >=org-n-level-faces are styled like
761 level org-n-level-faces"
762 :group 'org-appearance
763 :group 'org-faces
764 :version "24.1"
765 :type 'boolean)
767 (defface org-latex-and-related
768 (let ((font (cond ((assq :inherit custom-face-attributes)
769 '(:inherit underline))
770 (t '(:underline t)))))
771 `((((class grayscale) (background light))
772 (:foreground "DimGray" ,@font))
773 (((class grayscale) (background dark))
774 (:foreground "LightGray" ,@font))
775 (((class color) (background light))
776 (:foreground "SaddleBrown"))
777 (((class color) (background dark))
778 (:foreground "burlywood"))
779 (t (,@font))))
780 "Face used to highlight LaTeX data, entities and sub/superscript."
781 :group 'org-faces
782 :version "24.4"
783 :package-version '(Org . "8.0"))
785 (defface org-macro
786 (org-compatible-face 'org-latex-and-related nil)
787 "Face for macros."
788 :group 'org-faces
789 :version "24.4"
790 :package-version '(Org . "8.0"))
792 (defface org-tag-group
793 (org-compatible-face 'org-tag nil)
794 "Face for group tags."
795 :group 'org-faces
796 :version "24.4"
797 :package-version '(Org . "8.0"))
799 (defface org-mode-line-clock
800 '((t (:inherit mode-line)))
801 "Face used for clock display in mode line."
802 :group 'org-faces)
804 (defface org-mode-line-clock-overrun
805 '((t (:inherit mode-line :background "red")))
806 "Face used for clock display for overrun tasks in mode line."
807 :group 'org-faces)
809 (provide 'org-faces)
811 ;;; org-faces.el ends here