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