1 ;;; org-faces.el --- Face definitions for Org-mode.
3 ;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 ;; Author: Carsten Dominik <carsten at orgmode dot org>
6 ;; Keywords: outlines, hypermedia, calendar, wp
7 ;; Homepage: http://orgmode.org
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
28 ;; This file contains the face definitons for Org.
35 (defgroup org-faces nil
38 :group
'org-font-lock
)
41 '((((background light
)) (:foreground
"white"))
42 (((background dark
)) (:foreground
"black")))
43 "Face used to hide leading stars in headlines.
44 The foreground color of this face should be equal to the background
48 (defface org-level-1
;; originally copied from font-lock-function-name-face
49 (org-compatible-face 'outline-1
50 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Blue1"))
51 (((class color
) (min-colors 88) (background dark
)) (:foreground
"LightSkyBlue"))
52 (((class color
) (min-colors 16) (background light
)) (:foreground
"Blue"))
53 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightSkyBlue"))
54 (((class color
) (min-colors 8)) (:foreground
"blue" :bold t
))
56 "Face used for level 1 headlines."
59 (defface org-level-2
;; originally copied from font-lock-variable-name-face
60 (org-compatible-face 'outline-2
61 '((((class color
) (min-colors 16) (background light
)) (:foreground
"DarkGoldenrod"))
62 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightGoldenrod"))
63 (((class color
) (min-colors 8) (background light
)) (:foreground
"yellow"))
64 (((class color
) (min-colors 8) (background dark
)) (:foreground
"yellow" :bold t
))
66 "Face used for level 2 headlines."
69 (defface org-level-3
;; originally copied from font-lock-keyword-face
70 (org-compatible-face 'outline-3
71 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Purple"))
72 (((class color
) (min-colors 88) (background dark
)) (:foreground
"Cyan1"))
73 (((class color
) (min-colors 16) (background light
)) (:foreground
"Purple"))
74 (((class color
) (min-colors 16) (background dark
)) (:foreground
"Cyan"))
75 (((class color
) (min-colors 8) (background light
)) (:foreground
"purple" :bold t
))
76 (((class color
) (min-colors 8) (background dark
)) (:foreground
"cyan" :bold t
))
78 "Face used for level 3 headlines."
81 (defface org-level-4
;; originally copied from font-lock-comment-face
82 (org-compatible-face 'outline-4
83 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Firebrick"))
84 (((class color
) (min-colors 88) (background dark
)) (:foreground
"chocolate1"))
85 (((class color
) (min-colors 16) (background light
)) (:foreground
"red"))
86 (((class color
) (min-colors 16) (background dark
)) (:foreground
"red1"))
87 (((class color
) (min-colors 8) (background light
)) (:foreground
"red" :bold t
))
88 (((class color
) (min-colors 8) (background dark
)) (:foreground
"red" :bold t
))
90 "Face used for level 4 headlines."
93 (defface org-level-5
;; originally copied from font-lock-type-face
94 (org-compatible-face 'outline-5
95 '((((class color
) (min-colors 16) (background light
)) (:foreground
"ForestGreen"))
96 (((class color
) (min-colors 16) (background dark
)) (:foreground
"PaleGreen"))
97 (((class color
) (min-colors 8)) (:foreground
"green"))))
98 "Face used for level 5 headlines."
101 (defface org-level-6
;; originally copied from font-lock-constant-face
102 (org-compatible-face 'outline-6
103 '((((class color
) (min-colors 16) (background light
)) (:foreground
"CadetBlue"))
104 (((class color
) (min-colors 16) (background dark
)) (:foreground
"Aquamarine"))
105 (((class color
) (min-colors 8)) (:foreground
"magenta"))))
106 "Face used for level 6 headlines."
109 (defface org-level-7
;; originally copied from font-lock-builtin-face
110 (org-compatible-face 'outline-7
111 '((((class color
) (min-colors 16) (background light
)) (:foreground
"Orchid"))
112 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightSteelBlue"))
113 (((class color
) (min-colors 8)) (:foreground
"blue"))))
114 "Face used for level 7 headlines."
117 (defface org-level-8
;; originally copied from font-lock-string-face
118 (org-compatible-face 'outline-8
119 '((((class color
) (min-colors 16) (background light
)) (:foreground
"RosyBrown"))
120 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightSalmon"))
121 (((class color
) (min-colors 8)) (:foreground
"green"))))
122 "Face used for level 8 headlines."
125 (defface org-special-keyword
;; originally copied from font-lock-string-face
126 (org-compatible-face nil
127 '((((class color
) (min-colors 16) (background light
)) (:foreground
"RosyBrown"))
128 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightSalmon"))
130 "Face used for special keywords."
133 (defface org-drawer
;; originally copied from font-lock-function-name-face
134 (org-compatible-face nil
135 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Blue1"))
136 (((class color
) (min-colors 88) (background dark
)) (:foreground
"LightSkyBlue"))
137 (((class color
) (min-colors 16) (background light
)) (:foreground
"Blue"))
138 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightSkyBlue"))
139 (((class color
) (min-colors 8)) (:foreground
"blue" :bold t
))
141 "Face used for drawers."
144 (defface org-property-value nil
145 "Face used for the value of a property."
149 (org-compatible-face nil
150 '((((class color
) (min-colors 16) (background light
))
151 (:background
"grey90"))
152 (((class color
) (min-colors 16) (background dark
))
153 (:background
"grey30"))
154 (((class color
) (min-colors 8))
155 (:background
"cyan" :foreground
"black"))
156 (t (:inverse-video t
))))
157 "Face for column display of entry properties."
160 (defface org-column-title
161 (org-compatible-face nil
162 '((((class color
) (min-colors 16) (background light
))
163 (:background
"grey90" :underline t
:weight bold
))
164 (((class color
) (min-colors 16) (background dark
))
165 (:background
"grey30" :underline t
:weight bold
))
166 (((class color
) (min-colors 8))
167 (:background
"cyan" :foreground
"black" :underline t
:weight bold
))
168 (t (:inverse-video t
))))
169 "Face for column display of entry properties."
172 (when (fboundp 'set-face-attribute
)
173 ;; Make sure that a fixed-width face is used when we have a column table.
174 (set-face-attribute 'org-column nil
175 :height
(face-attribute 'default
:height
)
176 :family
(face-attribute 'default
:family
)))
179 (org-compatible-face 'font-lock-warning-face
180 '((((class color
) (min-colors 16) (background light
)) (:foreground
"Red1" :bold t
))
181 (((class color
) (min-colors 16) (background dark
)) (:foreground
"Pink" :bold t
))
182 (((class color
) (min-colors 8) (background light
)) (:foreground
"red" :bold t
))
183 (((class color
) (min-colors 8) (background dark
)) (:foreground
"red" :bold t
))
185 "Face for deadlines and TODO keywords."
188 (defface org-archived
; similar to shadow
189 (org-compatible-face 'shadow
190 '((((class color grayscale
) (min-colors 88) (background light
))
191 (:foreground
"grey50"))
192 (((class color grayscale
) (min-colors 88) (background dark
))
193 (:foreground
"grey70"))
194 (((class color
) (min-colors 8) (background light
))
195 (:foreground
"green"))
196 (((class color
) (min-colors 8) (background dark
))
197 (:foreground
"yellow"))))
198 "Face for headline with the ARCHIVE tag."
202 '((((class color
) (background light
)) (:foreground
"Purple" :underline t
))
203 (((class color
) (background dark
)) (:foreground
"Cyan" :underline t
))
208 (defface org-ellipsis
209 '((((class color
) (background light
)) (:foreground
"DarkGoldenrod" :underline t
))
210 (((class color
) (background dark
)) (:foreground
"LightGoldenrod" :underline t
))
211 (t (:strike-through t
)))
212 "Face for the ellipsis in folded text."
216 '((((class color
) (background light
)) (:underline t
))
217 (((class color
) (background dark
)) (:underline t
))
223 '((((class color
) (background light
)) (:foreground
"Purple" :underline t
))
224 (((class color
) (background dark
)) (:foreground
"Cyan" :underline t
))
229 (defface org-sexp-date
230 '((((class color
) (background light
)) (:foreground
"Purple"))
231 (((class color
) (background dark
)) (:foreground
"Cyan"))
241 (defface org-todo
; font-lock-warning-face
242 (org-compatible-face nil
243 '((((class color
) (min-colors 16) (background light
)) (:foreground
"Red1" :bold t
))
244 (((class color
) (min-colors 16) (background dark
)) (:foreground
"Pink" :bold t
))
245 (((class color
) (min-colors 8) (background light
)) (:foreground
"red" :bold t
))
246 (((class color
) (min-colors 8) (background dark
)) (:foreground
"red" :bold t
))
247 (t (:inverse-video t
:bold t
))))
248 "Face for TODO keywords."
251 (defface org-done
;; originally copied from font-lock-type-face
252 (org-compatible-face nil
253 '((((class color
) (min-colors 16) (background light
)) (:foreground
"ForestGreen" :bold t
))
254 (((class color
) (min-colors 16) (background dark
)) (:foreground
"PaleGreen" :bold t
))
255 (((class color
) (min-colors 8)) (:foreground
"green"))
257 "Face used for todo keywords that indicate DONE items."
260 (defface org-headline-done
;; originally copied from font-lock-string-face
261 (org-compatible-face nil
262 '((((class color
) (min-colors 16) (background light
)) (:foreground
"RosyBrown"))
263 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightSalmon"))
264 (((class color
) (min-colors 8) (background light
)) (:bold nil
))))
265 "Face used to indicate that a headline is DONE.
266 This face is only used if `org-fontify-done-headline' is set. If applies
267 to the part of the headline after the DONE keyword."
270 (defcustom org-todo-keyword-faces nil
271 "Faces for specific TODO keywords.
272 This is a list of cons cells, with TODO keywords in the car
273 and faces in the cdr. The face can be a symbol, or a property
274 list of attributes, like (:foreground \"blue\" :weight bold :underline t)."
279 (string :tag
"keyword")
280 (sexp :tag
"face"))))
282 (defface org-table
;; originally copied from font-lock-function-name-face
283 (org-compatible-face nil
284 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Blue1"))
285 (((class color
) (min-colors 88) (background dark
)) (:foreground
"LightSkyBlue"))
286 (((class color
) (min-colors 16) (background light
)) (:foreground
"Blue"))
287 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightSkyBlue"))
288 (((class color
) (min-colors 8) (background light
)) (:foreground
"blue"))
289 (((class color
) (min-colors 8) (background dark
)))))
290 "Face used for tables."
294 (org-compatible-face nil
295 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Firebrick"))
296 (((class color
) (min-colors 88) (background dark
)) (:foreground
"chocolate1"))
297 (((class color
) (min-colors 8) (background light
)) (:foreground
"red"))
298 (((class color
) (min-colors 8) (background dark
)) (:foreground
"red"))
299 (t (:bold t
:italic t
))))
304 (org-compatible-face nil
305 '((((class color grayscale
) (min-colors 88) (background light
))
306 (:foreground
"grey50"))
307 (((class color grayscale
) (min-colors 88) (background dark
))
308 (:foreground
"grey70"))
309 (((class color
) (min-colors 8) (background light
))
310 (:foreground
"green"))
311 (((class color
) (min-colors 8) (background dark
))
312 (:foreground
"yellow"))))
313 "Face for fixed-with text like code snippets."
317 (defface org-verbatim
318 (org-compatible-face nil
319 '((((class color grayscale
) (min-colors 88) (background light
))
320 (:foreground
"grey50" :underline t
))
321 (((class color grayscale
) (min-colors 88) (background dark
))
322 (:foreground
"grey70" :underline t
))
323 (((class color
) (min-colors 8) (background light
))
324 (:foreground
"green" :underline t
))
325 (((class color
) (min-colors 8) (background dark
))
326 (:foreground
"yellow" :underline t
))))
327 "Face for fixed-with text like code snippets."
331 (defface org-agenda-structure
;; originally copied from font-lock-function-name-face
332 (org-compatible-face nil
333 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Blue1"))
334 (((class color
) (min-colors 88) (background dark
)) (:foreground
"LightSkyBlue"))
335 (((class color
) (min-colors 16) (background light
)) (:foreground
"Blue"))
336 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightSkyBlue"))
337 (((class color
) (min-colors 8)) (:foreground
"blue" :bold t
))
339 "Face used in agenda for captions and dates."
342 (unless (facep 'org-agenda-date
)
343 (copy-face 'org-agenda-structure
'org-agenda-date
)
344 (set-face-doc-string 'org-agenda-date
345 "Face used in agenda for normal days."))
347 (unless (facep 'org-agenda-date-weekend
)
348 (copy-face 'org-agenda-date
'org-agenda-date-weekend
)
349 (set-face-doc-string 'org-agenda-date-weekend
350 "Face used in agenda for weekend days.
351 See the variable `org-agenda-weekend-days' for a definition of which days
352 belong to the weekend.")
353 (when (fboundp 'set-face-attribute
)
354 (set-face-attribute 'org-agenda-date-weekend nil
:weight
'bold
)))
356 (defface org-scheduled-today
357 (org-compatible-face nil
358 '((((class color
) (min-colors 88) (background light
)) (:foreground
"DarkGreen"))
359 (((class color
) (min-colors 88) (background dark
)) (:foreground
"PaleGreen"))
360 (((class color
) (min-colors 8)) (:foreground
"green"))
361 (t (:bold t
:italic t
))))
362 "Face for items scheduled for a certain day."
365 (defface org-scheduled-previously
366 (org-compatible-face nil
367 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Firebrick"))
368 (((class color
) (min-colors 88) (background dark
)) (:foreground
"chocolate1"))
369 (((class color
) (min-colors 8) (background light
)) (:foreground
"red"))
370 (((class color
) (min-colors 8) (background dark
)) (:foreground
"red" :bold t
))
372 "Face for items scheduled previously, and not yet done."
375 (defface org-upcoming-deadline
376 (org-compatible-face nil
377 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Firebrick"))
378 (((class color
) (min-colors 88) (background dark
)) (:foreground
"chocolate1"))
379 (((class color
) (min-colors 8) (background light
)) (:foreground
"red"))
380 (((class color
) (min-colors 8) (background dark
)) (:foreground
"red" :bold t
))
382 "Face for items scheduled previously, and not yet done."
385 (defcustom org-agenda-deadline-faces
386 '((1.0 . org-warning
)
387 (0.5 . org-upcoming-deadline
)
389 "Faces for showing deadlines in the agenda.
390 This is a list of cons cells. The cdr of each cell is a face to be used,
391 and it can also just be like '(:foreground \"yellow\").
392 Each car is a fraction of the head-warning time that must have passed for
393 this the face in the cdr to be used for display. The numbers must be
394 given in descending order. The head-warning time is normally taken
395 from `org-deadline-warning-days', but can also be specified in the deadline
396 timestamp itself, like this:
398 DEADLINE: <2007-08-13 Mon -8d>
400 You may use d for days, w for weeks, m for months and y for years. Months
401 and years will only be treated in an approximate fashion (30.4 days for a
402 month and 365.24 days for a year)."
404 :group
'org-agenda-daily
/weekly
407 (number :tag
"Fraction of head-warning time passed")
408 (sexp :tag
"Face"))))
410 (defface org-agenda-restriction-lock
411 (org-compatible-face nil
412 '((((class color
) (min-colors 88) (background light
)) (:background
"yellow1"))
413 (((class color
) (min-colors 88) (background dark
)) (:background
"skyblue4"))
414 (((class color
) (min-colors 16) (background light
)) (:background
"yellow1"))
415 (((class color
) (min-colors 16) (background dark
)) (:background
"skyblue4"))
416 (((class color
) (min-colors 8)) (:background
"cyan" :foreground
"black"))
417 (t (:inverse-video t
))))
418 "Face for showing the agenda restriction lock."
421 (defface org-time-grid
;; originally copied from font-lock-variable-name-face
422 (org-compatible-face nil
423 '((((class color
) (min-colors 16) (background light
)) (:foreground
"DarkGoldenrod"))
424 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightGoldenrod"))
425 (((class color
) (min-colors 8)) (:foreground
"yellow" :weight light
))))
426 "Face used for time grids."
429 (defconst org-level-faces
430 '(org-level-1 org-level-2 org-level-3 org-level-4
431 org-level-5 org-level-6 org-level-7 org-level-8
434 (defcustom org-n-level-faces
(length org-level-faces
)
435 "The number of different faces to be used for headlines.
436 Org-mode defines 8 different headline faces, so this can be at most 8.
437 If it is less than 8, the level-1 face gets re-used for level N+1 etc."
441 (defface org-latex-and-export-specials
442 (let ((font (cond ((assq :inherit custom-face-attributes
)
443 '(:inherit underline
))
444 (t '(:underline t
)))))
445 `((((class grayscale
) (background light
))
446 (:foreground
"DimGray" ,@font
))
447 (((class grayscale
) (background dark
))
448 (:foreground
"LightGray" ,@font
))
449 (((class color
) (background light
))
450 (:foreground
"SaddleBrown"))
451 (((class color
) (background dark
))
452 (:foreground
"burlywood"))
454 "Face used to highlight math latex and other special exporter stuff."
459 ;; arch-tag: 9dab5f91-c4b9-4d6f-bac3-1f6211ad0a04
460 ;;; org-faces.el ends here