New face: org-default.
[org-mode/org-mode-NeilSmithlineMods.git] / lisp / org-faces.el
blob31b59c69e50aba72527c481dc276b13ad73fe458
1 ;;; org-faces.el --- Face definitions for Org-mode.
3 ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
4 ;; Free Software Foundation, Inc.
6 ;; Author: Carsten Dominik <carsten at orgmode dot org>
7 ;; Keywords: outlines, hypermedia, calendar, wp
8 ;; Homepage: http://orgmode.org
9 ;; Version: 7.5
11 ;; This file is part of GNU Emacs.
13 ;; GNU Emacs is free software: you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by
15 ;; the Free Software Foundation, either version 3 of the License, or
16 ;; (at your option) any later version.
18 ;; GNU Emacs is distributed in the hope that it will be useful,
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;; GNU General Public License for more details.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
27 ;;; Commentary:
29 ;; This file contains the face definitions for Org.
31 ;;; Code:
33 (require 'org-macs)
34 (require 'org-compat)
36 (defun org-copy-face (old-face new-face docstring &rest attributes)
37 (unless (facep new-face)
38 (if (fboundp 'set-face-attribute)
39 (progn
40 (make-face new-face)
41 (set-face-attribute new-face nil :inherit old-face)
42 (apply 'set-face-attribute new-face nil attributes)
43 (set-face-doc-string new-face docstring))
44 (copy-face old-face new-face)
45 (if (fboundp 'set-face-doc-string)
46 (set-face-doc-string new-face docstring)))))
47 (put 'org-copy-face 'lisp-indent-function 2)
49 (defgroup org-faces nil
50 "Faces in Org-mode."
51 :tag "Org Faces"
52 :group 'org-appearance)
54 (defface org-default
55 (org-compatible-face 'default nil)
56 "Face used for default text."
57 :group 'org-faces)
59 (defface org-hide
60 '((((background light)) (:foreground "white"))
61 (((background dark)) (:foreground "black")))
62 "Face used to hide leading stars in headlines.
63 The foreground color of this face should be equal to the background
64 color of the frame."
65 :group 'org-faces)
67 (defface org-level-1 ;; originally copied from font-lock-function-name-face
68 (org-compatible-face 'outline-1
69 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
70 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
71 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
72 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
73 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
74 (t (:bold t))))
75 "Face used for level 1 headlines."
76 :group 'org-faces)
78 (defface org-level-2 ;; originally copied from font-lock-variable-name-face
79 (org-compatible-face 'outline-2
80 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
81 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
82 (((class color) (min-colors 8) (background light)) (:foreground "yellow"))
83 (((class color) (min-colors 8) (background dark)) (:foreground "yellow" :bold t))
84 (t (:bold t))))
85 "Face used for level 2 headlines."
86 :group 'org-faces)
88 (defface org-level-3 ;; originally copied from font-lock-keyword-face
89 (org-compatible-face 'outline-3
90 '((((class color) (min-colors 88) (background light)) (:foreground "Purple"))
91 (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1"))
92 (((class color) (min-colors 16) (background light)) (:foreground "Purple"))
93 (((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
94 (((class color) (min-colors 8) (background light)) (:foreground "purple" :bold t))
95 (((class color) (min-colors 8) (background dark)) (:foreground "cyan" :bold t))
96 (t (:bold t))))
97 "Face used for level 3 headlines."
98 :group 'org-faces)
100 (defface org-level-4 ;; originally copied from font-lock-comment-face
101 (org-compatible-face 'outline-4
102 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
103 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
104 (((class color) (min-colors 16) (background light)) (:foreground "red"))
105 (((class color) (min-colors 16) (background dark)) (:foreground "red1"))
106 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
107 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
108 (t (:bold t))))
109 "Face used for level 4 headlines."
110 :group 'org-faces)
112 (defface org-level-5 ;; originally copied from font-lock-type-face
113 (org-compatible-face 'outline-5
114 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
115 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
116 (((class color) (min-colors 8)) (:foreground "green"))))
117 "Face used for level 5 headlines."
118 :group 'org-faces)
120 (defface org-level-6 ;; originally copied from font-lock-constant-face
121 (org-compatible-face 'outline-6
122 '((((class color) (min-colors 16) (background light)) (:foreground "CadetBlue"))
123 (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
124 (((class color) (min-colors 8)) (:foreground "magenta"))))
125 "Face used for level 6 headlines."
126 :group 'org-faces)
128 (defface org-level-7 ;; originally copied from font-lock-builtin-face
129 (org-compatible-face 'outline-7
130 '((((class color) (min-colors 16) (background light)) (:foreground "Orchid"))
131 (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue"))
132 (((class color) (min-colors 8)) (:foreground "blue"))))
133 "Face used for level 7 headlines."
134 :group 'org-faces)
136 (defface org-level-8 ;; originally copied from font-lock-string-face
137 (org-compatible-face 'outline-8
138 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
139 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
140 (((class color) (min-colors 8)) (:foreground "green"))))
141 "Face used for level 8 headlines."
142 :group 'org-faces)
144 (defface org-special-keyword ;; originally copied from font-lock-string-face
145 (org-compatible-face 'font-lock-keyword-face
146 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
147 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
148 (t (:italic t))))
149 "Face used for special keywords."
150 :group 'org-faces)
152 (defface org-drawer ;; originally copied from font-lock-function-name-face
153 (org-compatible-face nil
154 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
155 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
156 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
157 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
158 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
159 (t (:bold t))))
160 "Face used for drawers."
161 :group 'org-faces)
163 (defface org-property-value nil
164 "Face used for the value of a property."
165 :group 'org-faces)
167 (defface org-column
168 (org-compatible-face nil
169 '((((class color) (min-colors 16) (background light))
170 (:background "grey90" :weight normal :slant normal :strike-through nil
171 :underline nil))
172 (((class color) (min-colors 16) (background dark))
173 (:background "grey30" :weight normal :slant normal :strike-through nil
174 :underline nil))
175 (((class color) (min-colors 8))
176 (:background "cyan" :foreground "black"
177 :weight normal :slant normal :strike-through nil
178 :underline nil))
179 (t (:inverse-video t))))
180 "Face for column display of entry properties.
181 This is actually only part of the face definition for the text in column view.
182 The following faces apply, with this priority.
184 1. The color of the reference face. This is normally the level fact that
185 is used in the outline. In agenda-mode, it will be the face of the
186 first character in the line. The color is explicitly retained to
187 make sure that the column line still looks a bit like the structure
188 line it is masking.
190 2. The `org-column' face.
192 3. The remaining properties of the reference face.
194 Since column view works by putting overlays with a display property
195 over individual characters in the buffer, the face of the underlining
196 character (this might for example be the a TODO keyword) might still
197 shine through in some properties. So when your column view looks
198 funny, with \"random\" colors, weight, strike-through, try to explicitly
199 set the properties in the `org-column' face. For example, set
200 :underline to nil, or the :slant to `normal'.
202 Under XEmacs, the rules are simpler, because the XEmacs version of
203 column view defines special faces for each outline level. See the file
204 `org-colview-xemacs.el' for details."
205 :group 'org-faces)
207 (defface org-column-title
208 (org-compatible-face nil
209 '((((class color) (min-colors 16) (background light))
210 (:background "grey90" :underline t :weight bold))
211 (((class color) (min-colors 16) (background dark))
212 (:background "grey30" :underline t :weight bold))
213 (((class color) (min-colors 8))
214 (:background "cyan" :foreground "black" :underline t :weight bold))
215 (t (:inverse-video t))))
216 "Face for column display of entry properties."
217 :group 'org-faces)
219 (when (fboundp 'set-face-attribute)
220 ;; Make sure that a fixed-width face is used when we have a column table.
221 (set-face-attribute 'org-column nil
222 :height (face-attribute 'default :height)
223 :family (face-attribute 'default :family)))
225 (defface org-agenda-column-dateline
226 (org-compatible-face 'org-column
227 '((t nil)))
228 "Face used in agenda column view for datelines with summaries."
229 :group 'org-faces)
231 (defface org-warning
232 (org-compatible-face 'font-lock-warning-face
233 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
234 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
235 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
236 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
237 (t (:bold t))))
238 "Face for deadlines and TODO keywords."
239 :group 'org-faces)
241 (defface org-archived ; similar to shadow
242 (org-compatible-face 'shadow
243 '((((class color grayscale) (min-colors 88) (background light))
244 (:foreground "grey50"))
245 (((class color grayscale) (min-colors 88) (background dark))
246 (:foreground "grey70"))
247 (((class color) (min-colors 8) (background light))
248 (:foreground "green"))
249 (((class color) (min-colors 8) (background dark))
250 (:foreground "yellow"))))
251 "Face for headline with the ARCHIVE tag."
252 :group 'org-faces)
254 (defface org-link
255 (org-compatible-face 'link
256 '((((class color) (background light)) (:foreground "Purple" :underline t))
257 (((class color) (background dark)) (:foreground "Cyan" :underline t))
258 (t (:underline t))))
259 "Face for links."
260 :group 'org-faces)
262 (defface org-footnote
263 '((((class color) (background light)) (:foreground "Purple" :underline t))
264 (((class color) (background dark)) (:foreground "Cyan" :underline t))
265 (t (:underline t)))
266 "Face for links."
267 :group 'org-faces)
269 (defface org-ellipsis
270 '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
271 (((class color) (background dark)) (:foreground "LightGoldenrod" :underline t))
272 (t (:strike-through t)))
273 "Face for the ellipsis in folded text."
274 :group 'org-faces)
276 (defface org-target
277 '((((class color) (background light)) (:underline t))
278 (((class color) (background dark)) (:underline t))
279 (t (:underline t)))
280 "Face for link targets."
281 :group 'org-faces)
283 (defface org-date
284 '((((class color) (background light)) (:foreground "Purple" :underline t))
285 (((class color) (background dark)) (:foreground "Cyan" :underline t))
286 (t (:underline t)))
287 "Face for date/time stamps."
288 :group 'org-faces)
290 (defface org-sexp-date
291 '((((class color) (background light)) (:foreground "Purple"))
292 (((class color) (background dark)) (:foreground "Cyan"))
293 (t (:underline t)))
294 "Face for diary-like sexp date specifications."
295 :group 'org-faces)
297 (defface org-tag
298 '((t (:bold t)))
299 "Default face for tags.
300 Note that the variable `org-tag-faces' can be used to overrule this face for
301 specific tags."
302 :group 'org-faces)
304 (defface org-todo ; font-lock-warning-face
305 (org-compatible-face nil
306 '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
307 (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
308 (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
309 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
310 (t (:inverse-video t :bold t))))
311 "Face for TODO keywords."
312 :group 'org-faces)
314 (defface org-done ;; originally copied from font-lock-type-face
315 (org-compatible-face nil
316 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
317 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
318 (((class color) (min-colors 8)) (:foreground "green"))
319 (t (:bold t))))
320 "Face used for todo keywords that indicate DONE items."
321 :group 'org-faces)
323 (defface org-agenda-done ;; originally copied from font-lock-type-face
324 (org-compatible-face nil
325 '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
326 (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
327 (((class color) (min-colors 8)) (:foreground "green"))
328 (t (:bold nil))))
329 "Face used in agenda, to indicate lines switched to DONE.
330 This face is used to de-emphasize items that where brightly colored in the
331 agenda because they were things to do, or overdue. The DONE state itself
332 is of course immediately visible, but for example a passed deadline is
333 \(by default) very bright read. This face could be simply the default face
334 of the frame, for example."
335 :group 'org-faces)
337 (defface org-headline-done ;; originally copied from font-lock-string-face
338 (org-compatible-face nil
339 '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
340 (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
341 (((class color) (min-colors 8) (background light)) (:bold nil))))
342 "Face used to indicate that a headline is DONE.
343 This face is only used if `org-fontify-done-headline' is set. If applies
344 to the part of the headline after the DONE keyword."
345 :group 'org-faces)
347 (defcustom org-faces-easy-properties
348 '((todo . :foreground) (tag . :foreground) (priority . :foreground))
349 "The property changes by easy faces.
350 This is an alist, the keys show the area of application, the values
351 can be `:foreground' or `:background'. A color string for special
352 keywords will then be interpreted as either foreground or background
353 color."
354 :group 'org-faces
355 :group 'org-todo
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 (defcustom org-priority-faces nil
379 "Faces for specific Priorities.
380 This is a list of cons cells, with priority character in the car
381 and faces in the cdr. The face can be a symbol, a color as
382 as a string, or a property list of attributes, like
383 (:foreground \"blue\" :weight bold :underline t).
384 If it is a color string, the variable `org-faces-easy-properties'
385 determines if it is a foreground or a background color."
386 :group 'org-faces
387 :group 'org-todo
388 :type '(repeat
389 (cons
390 (character :tag "Priority")
391 (choice :tag "Face "
392 (string :tag "Color")
393 (sexp :tag "Face")))))
395 (defvar org-tags-special-faces-re nil)
396 (defun org-set-tag-faces (var value)
397 (set var value)
398 (if (not value)
399 (setq org-tags-special-faces-re nil)
400 (setq org-tags-special-faces-re
401 (concat ":\\(" (mapconcat 'car value "\\|") "\\):"))))
403 (defface org-checkbox
404 (org-compatible-face 'bold
405 '((t (:bold t))))
406 "Face for checkboxes"
407 :group 'org-faces)
410 (org-copy-face 'org-todo 'org-checkbox-statistics-todo
411 "Face used for unfinished checkbox statistics.")
413 (org-copy-face 'org-done 'org-checkbox-statistics-done
414 "Face used for finished checkbox statistics.")
416 (defcustom org-tag-faces nil
417 "Faces for specific tags.
418 This is a list of cons cells, with tags in the car and faces in the cdr.
419 The face can be a symbol, a foreground color (in which case the rest is
420 inherited from the `org-tag' face) or a property list of attributes,
421 like (:foreground \"blue\" :weight bold :underline t).
422 If you set this variable through customize, it will immediately be effective
423 in new buffers and in modified lines.
424 If you set it with Lisp, a restart of Emacs is required to activate the
425 changes."
426 :group 'org-faces
427 :group 'org-tags
428 :set 'org-set-tag-faces
429 :type '(repeat
430 (cons
431 (string :tag "Tag ")
432 (choice :tag "Face"
433 (string :tag "Foreground color")
434 (sexp :tag "Face")))))
436 (defface org-table ;; originally copied from font-lock-function-name-face
437 (org-compatible-face nil
438 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
439 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
440 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
441 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
442 (((class color) (min-colors 8) (background light)) (:foreground "blue"))
443 (((class color) (min-colors 8) (background dark)))))
444 "Face used for tables."
445 :group 'org-faces)
447 (defface org-formula
448 (org-compatible-face nil
449 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
450 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
451 (((class color) (min-colors 8) (background light)) (:foreground "red"))
452 (((class color) (min-colors 8) (background dark)) (:foreground "red"))
453 (t (:bold t :italic t))))
454 "Face for formulas."
455 :group 'org-faces)
457 (defface org-code
458 (org-compatible-face 'shadow
459 '((((class color grayscale) (min-colors 88) (background light))
460 (:foreground "grey50"))
461 (((class color grayscale) (min-colors 88) (background dark))
462 (:foreground "grey70"))
463 (((class color) (min-colors 8) (background light))
464 (:foreground "green"))
465 (((class color) (min-colors 8) (background dark))
466 (:foreground "yellow"))))
467 "Face for fixed-width text like code snippets."
468 :group 'org-faces
469 :version "22.1")
471 (defface org-meta-line
472 (org-compatible-face 'font-lock-comment-face nil)
473 "Face for meta lines startin with \"#+\"."
474 :group 'org-faces
475 :version "22.1")
477 (defface org-document-title
478 '((((class color) (background light)) (:foreground "midnight blue" :weight bold :height 1.44))
479 (((class color) (background dark)) (:foreground "pale turquoise" :weight bold :height 1.44))
480 (t (:weight bold :height 1.44)))
481 "Face for document title, i.e. that which follows the #+TITLE: keyword."
482 :group 'org-faces)
484 (defface org-document-info
485 '((((class color) (background light)) (:foreground "midnight blue"))
486 (((class color) (background dark)) (:foreground "pale turquoise"))
487 (t nil))
488 "Face for document date, author and email; i.e. that which
489 follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword."
490 :group 'org-faces)
492 (defface org-document-info-keyword
493 (org-compatible-face 'shadow
494 '((((class color grayscale) (min-colors 88) (background light))
495 (:foreground "grey50"))
496 (((class color grayscale) (min-colors 88) (background dark))
497 (:foreground "grey70"))
498 (((class color) (min-colors 8) (background light))
499 (:foreground "green"))
500 (((class color) (min-colors 8) (background dark))
501 (:foreground "yellow"))))
502 "Face for #+TITLE:, #+AUTHOR:, #+EMAIL: and #+DATE: keywords."
503 :group 'org-faces)
505 (defface org-block
506 (org-compatible-face 'shadow
507 '((((class color grayscale) (min-colors 88) (background light))
508 (:foreground "grey50"))
509 (((class color grayscale) (min-colors 88) (background dark))
510 (:foreground "grey70"))
511 (((class color) (min-colors 8) (background light))
512 (:foreground "green"))
513 (((class color) (min-colors 8) (background dark))
514 (:foreground "yellow"))))
515 "Face text in #+begin ... #+end blocks."
516 :group 'org-faces
517 :version "22.1")
519 (defface org-block-background '((t ()))
520 "Face used for the source block background.")
522 (org-copy-face 'org-meta-line 'org-block-begin-line
523 "Face used for the line delimiting the begin of source blocks.")
525 (org-copy-face 'org-meta-line 'org-block-end-line
526 "Face used for the line delimiting the end of source blocks.")
528 (defface org-verbatim
529 (org-compatible-face 'shadow
530 '((((class color grayscale) (min-colors 88) (background light))
531 (:foreground "grey50" :underline t))
532 (((class color grayscale) (min-colors 88) (background dark))
533 (:foreground "grey70" :underline t))
534 (((class color) (min-colors 8) (background light))
535 (:foreground "green" :underline t))
536 (((class color) (min-colors 8) (background dark))
537 (:foreground "yellow" :underline t))))
538 "Face for fixed-with text like code snippets."
539 :group 'org-faces
540 :version "22.1")
542 (org-copy-face 'org-block 'org-quote
543 "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks.")
544 (org-copy-face 'org-block 'org-verse
545 "Face for #+BEGIN_VERSE ... #+END_VERSE blocks.")
547 (defcustom org-fontify-quote-and-verse-blocks nil
548 "Non-nil means, add a special face to #+begin_quote and #+begin_verse block.
549 When nil, format these as normal Org. This is the default, because the
550 content of these blocks will still be treated as Org syntax."
551 :group 'org-faces
552 :type 'boolean)
554 (defface org-clock-overlay ;; copied from secondary-selection
555 (org-compatible-face nil
556 '((((class color) (min-colors 88) (background light))
557 (:background "yellow1"))
558 (((class color) (min-colors 88) (background dark))
559 (:background "SkyBlue4"))
560 (((class color) (min-colors 16) (background light))
561 (:background "yellow"))
562 (((class color) (min-colors 16) (background dark))
563 (:background "SkyBlue4"))
564 (((class color) (min-colors 8))
565 (:background "cyan" :foreground "black"))
566 (t (:inverse-video t))))
567 "Basic face for displaying the secondary selection."
568 :group 'org-faces)
570 (defface org-agenda-structure ;; originally copied from font-lock-function-name-face
571 (org-compatible-face nil
572 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
573 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
574 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
575 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
576 (((class color) (min-colors 8)) (:foreground "blue" :bold t))
577 (t (:bold t))))
578 "Face used in agenda for captions and dates."
579 :group 'org-faces)
581 (org-copy-face 'org-agenda-structure 'org-agenda-date
582 "Face used in agenda for normal days.")
584 (org-copy-face 'org-agenda-date 'org-agenda-date-today
585 "Face used in agenda for today."
586 :weight 'bold :italic 't)
588 (org-copy-face 'secondary-selection 'org-agenda-clocking
589 "Face marking the current clock item in the agenda.")
591 (org-copy-face 'org-agenda-date 'org-agenda-date-weekend
592 "Face used in agenda for weekend days.
593 See the variable `org-agenda-weekend-days' for a definition of which days
594 belong to the weekend."
595 :weight 'bold)
597 (defface org-scheduled
598 (org-compatible-face nil
599 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
600 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
601 (((class color) (min-colors 8)) (:foreground "green"))
602 (t (:bold t :italic t))))
603 "Face for items scheduled for a certain day."
604 :group 'org-faces)
606 (defface org-scheduled-today
607 (org-compatible-face nil
608 '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
609 (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
610 (((class color) (min-colors 8)) (:foreground "green"))
611 (t (:bold t :italic t))))
612 "Face for items scheduled for a certain day."
613 :group 'org-faces)
615 (defface org-agenda-dimmed-todo-face
616 '((((background light)) (:foreground "grey50"))
617 (((background dark)) (:foreground "grey50")))
618 "Face used to dim blocked tasks in the agenda."
619 :group 'org-faces)
621 (defface org-scheduled-previously
622 (org-compatible-face nil
623 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
624 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
625 (((class color) (min-colors 8) (background light)) (:foreground "red"))
626 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
627 (t (:bold t))))
628 "Face for items scheduled previously, and not yet done."
629 :group 'org-faces)
631 (defface org-upcoming-deadline
632 (org-compatible-face nil
633 '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
634 (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
635 (((class color) (min-colors 8) (background light)) (:foreground "red"))
636 (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
637 (t (:bold t))))
638 "Face for items scheduled previously, and not yet done."
639 :group 'org-faces)
641 (defcustom org-agenda-deadline-faces
642 '((1.0 . org-warning)
643 (0.5 . org-upcoming-deadline)
644 (0.0 . default))
645 "Faces for showing deadlines in the agenda.
646 This is a list of cons cells. The cdr of each cell is a face to be used,
647 and it can also just be like '(:foreground \"yellow\").
648 Each car is a fraction of the head-warning time that must have passed for
649 this the face in the cdr to be used for display. The numbers must be
650 given in descending order. The head-warning time is normally taken
651 from `org-deadline-warning-days', but can also be specified in the deadline
652 timestamp itself, like this:
654 DEADLINE: <2007-08-13 Mon -8d>
656 You may use d for days, w for weeks, m for months and y for years. Months
657 and years will only be treated in an approximate fashion (30.4 days for a
658 month and 365.24 days for a year)."
659 :group 'org-faces
660 :group 'org-agenda-daily/weekly
661 :type '(repeat
662 (cons
663 (number :tag "Fraction of head-warning time passed")
664 (sexp :tag "Face"))))
666 (defface org-agenda-restriction-lock
667 (org-compatible-face nil
668 '((((class color) (min-colors 88) (background light)) (:background "yellow1"))
669 (((class color) (min-colors 88) (background dark)) (:background "skyblue4"))
670 (((class color) (min-colors 16) (background light)) (:background "yellow1"))
671 (((class color) (min-colors 16) (background dark)) (:background "skyblue4"))
672 (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
673 (t (:inverse-video t))))
674 "Face for showing the agenda restriction lock."
675 :group 'org-faces)
677 (defface org-time-grid ;; originally copied from font-lock-variable-name-face
678 (org-compatible-face nil
679 '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
680 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
681 (((class color) (min-colors 8)) (:foreground "yellow" :weight light))))
682 "Face used for time grids."
683 :group 'org-faces)
685 (org-copy-face 'org-time-grid 'org-agenda-current-time
686 "Face used to show the current time in the time grid.")
688 (defface org-agenda-diary
689 (org-compatible-face 'default
690 nil)
691 "Face used for agenda entries that come from the Emacs diary."
692 :group 'org-faces)
694 (defconst org-level-faces
695 '(org-level-1 org-level-2 org-level-3 org-level-4
696 org-level-5 org-level-6 org-level-7 org-level-8
699 (defcustom org-n-level-faces (length org-level-faces)
700 "The number of different faces to be used for headlines.
701 Org-mode defines 8 different headline faces, so this can be at most 8.
702 If it is less than 8, the level-1 face gets re-used for level N+1 etc."
703 :type 'integer
704 :group 'org-faces)
706 (defcustom org-cycle-level-faces t
707 "Non-nil means level styles cycle after level `org-n-level-faces'.
708 Then so level org-n-level-faces+1 is styled like level 1.
709 If nil, then all levels >=org-n-level-faces are styled like
710 level org-n-level-faces"
711 :group 'org-appearance
712 :group 'org-faces
713 :type 'boolean)
715 (defface org-latex-and-export-specials
716 (let ((font (cond ((assq :inherit custom-face-attributes)
717 '(:inherit underline))
718 (t '(:underline t)))))
719 `((((class grayscale) (background light))
720 (:foreground "DimGray" ,@font))
721 (((class grayscale) (background dark))
722 (:foreground "LightGray" ,@font))
723 (((class color) (background light))
724 (:foreground "SaddleBrown"))
725 (((class color) (background dark))
726 (:foreground "burlywood"))
727 (t (,@font))))
728 "Face used to highlight math latex and other special exporter stuff."
729 :group 'org-faces)
731 (org-copy-face 'modeline 'org-mode-line-clock
732 "Face used for clock display in mode line.")
733 (org-copy-face 'modeline 'org-mode-line-clock-overrun
734 "Face used for clock display for overrun tasks in mode line."
735 :background "red")
737 (provide 'org-faces)
739 ;; arch-tag: 9dab5f91-c4b9-4d6f-bac3-1f6211ad0a04
741 ;;; org-faces.el ends here