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" :weight normal
:strike-through nil
:underline nil
))
152 (((class color
) (min-colors 16) (background dark
))
153 (:background
"grey30" :weight normal
:strike-through nil
:underline nil
))
154 (((class color
) (min-colors 8))
155 (:background
"cyan" :foreground
"black"
156 :weight normal
:strike-through nil
:underline nil
))
157 (t (:inverse-video t
))))
158 "Face for column display of entry properties."
161 (defface org-column-title
162 (org-compatible-face nil
163 '((((class color
) (min-colors 16) (background light
))
164 (:background
"grey90" :underline t
:weight bold
))
165 (((class color
) (min-colors 16) (background dark
))
166 (:background
"grey30" :underline t
:weight bold
))
167 (((class color
) (min-colors 8))
168 (:background
"cyan" :foreground
"black" :underline t
:weight bold
))
169 (t (:inverse-video t
))))
170 "Face for column display of entry properties."
173 (when (fboundp 'set-face-attribute
)
174 ;; Make sure that a fixed-width face is used when we have a column table.
175 (set-face-attribute 'org-column nil
176 :height
(face-attribute 'default
:height
)
177 :family
(face-attribute 'default
:family
)))
180 (org-compatible-face 'font-lock-warning-face
181 '((((class color
) (min-colors 16) (background light
)) (:foreground
"Red1" :bold t
))
182 (((class color
) (min-colors 16) (background dark
)) (:foreground
"Pink" :bold t
))
183 (((class color
) (min-colors 8) (background light
)) (:foreground
"red" :bold t
))
184 (((class color
) (min-colors 8) (background dark
)) (:foreground
"red" :bold t
))
186 "Face for deadlines and TODO keywords."
189 (defface org-archived
; similar to shadow
190 (org-compatible-face 'shadow
191 '((((class color grayscale
) (min-colors 88) (background light
))
192 (:foreground
"grey50"))
193 (((class color grayscale
) (min-colors 88) (background dark
))
194 (:foreground
"grey70"))
195 (((class color
) (min-colors 8) (background light
))
196 (:foreground
"green"))
197 (((class color
) (min-colors 8) (background dark
))
198 (:foreground
"yellow"))))
199 "Face for headline with the ARCHIVE tag."
203 '((((class color
) (background light
)) (:foreground
"Purple" :underline t
))
204 (((class color
) (background dark
)) (:foreground
"Cyan" :underline t
))
209 (defface org-ellipsis
210 '((((class color
) (background light
)) (:foreground
"DarkGoldenrod" :underline t
))
211 (((class color
) (background dark
)) (:foreground
"LightGoldenrod" :underline t
))
212 (t (:strike-through t
)))
213 "Face for the ellipsis in folded text."
217 '((((class color
) (background light
)) (:underline t
))
218 (((class color
) (background dark
)) (:underline t
))
224 '((((class color
) (background light
)) (:foreground
"Purple" :underline t
))
225 (((class color
) (background dark
)) (:foreground
"Cyan" :underline t
))
230 (defface org-sexp-date
231 '((((class color
) (background light
)) (:foreground
"Purple"))
232 (((class color
) (background dark
)) (:foreground
"Cyan"))
242 (defface org-todo
; font-lock-warning-face
243 (org-compatible-face nil
244 '((((class color
) (min-colors 16) (background light
)) (:foreground
"Red1" :bold t
))
245 (((class color
) (min-colors 16) (background dark
)) (:foreground
"Pink" :bold t
))
246 (((class color
) (min-colors 8) (background light
)) (:foreground
"red" :bold t
))
247 (((class color
) (min-colors 8) (background dark
)) (:foreground
"red" :bold t
))
248 (t (:inverse-video t
:bold t
))))
249 "Face for TODO keywords."
252 (defface org-done
;; originally copied from font-lock-type-face
253 (org-compatible-face nil
254 '((((class color
) (min-colors 16) (background light
)) (:foreground
"ForestGreen" :bold t
))
255 (((class color
) (min-colors 16) (background dark
)) (:foreground
"PaleGreen" :bold t
))
256 (((class color
) (min-colors 8)) (:foreground
"green"))
258 "Face used for todo keywords that indicate DONE items."
261 (defface org-headline-done
;; originally copied from font-lock-string-face
262 (org-compatible-face nil
263 '((((class color
) (min-colors 16) (background light
)) (:foreground
"RosyBrown"))
264 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightSalmon"))
265 (((class color
) (min-colors 8) (background light
)) (:bold nil
))))
266 "Face used to indicate that a headline is DONE.
267 This face is only used if `org-fontify-done-headline' is set. If applies
268 to the part of the headline after the DONE keyword."
271 (defcustom org-todo-keyword-faces nil
272 "Faces for specific TODO keywords.
273 This is a list of cons cells, with TODO keywords in the car
274 and faces in the cdr. The face can be a symbol, or a property
275 list of attributes, like (:foreground \"blue\" :weight bold :underline t)."
280 (string :tag
"keyword")
281 (sexp :tag
"face"))))
283 (defface org-table
;; originally copied from font-lock-function-name-face
284 (org-compatible-face nil
285 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Blue1"))
286 (((class color
) (min-colors 88) (background dark
)) (:foreground
"LightSkyBlue"))
287 (((class color
) (min-colors 16) (background light
)) (:foreground
"Blue"))
288 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightSkyBlue"))
289 (((class color
) (min-colors 8) (background light
)) (:foreground
"blue"))
290 (((class color
) (min-colors 8) (background dark
)))))
291 "Face used for tables."
295 (org-compatible-face nil
296 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Firebrick"))
297 (((class color
) (min-colors 88) (background dark
)) (:foreground
"chocolate1"))
298 (((class color
) (min-colors 8) (background light
)) (:foreground
"red"))
299 (((class color
) (min-colors 8) (background dark
)) (:foreground
"red"))
300 (t (:bold t
:italic t
))))
305 (org-compatible-face nil
306 '((((class color grayscale
) (min-colors 88) (background light
))
307 (:foreground
"grey50"))
308 (((class color grayscale
) (min-colors 88) (background dark
))
309 (:foreground
"grey70"))
310 (((class color
) (min-colors 8) (background light
))
311 (:foreground
"green"))
312 (((class color
) (min-colors 8) (background dark
))
313 (:foreground
"yellow"))))
314 "Face for fixed-with text like code snippets."
318 (defface org-verbatim
319 (org-compatible-face nil
320 '((((class color grayscale
) (min-colors 88) (background light
))
321 (:foreground
"grey50" :underline t
))
322 (((class color grayscale
) (min-colors 88) (background dark
))
323 (:foreground
"grey70" :underline t
))
324 (((class color
) (min-colors 8) (background light
))
325 (:foreground
"green" :underline t
))
326 (((class color
) (min-colors 8) (background dark
))
327 (:foreground
"yellow" :underline t
))))
328 "Face for fixed-with text like code snippets."
332 (defface org-agenda-structure
;; originally copied from font-lock-function-name-face
333 (org-compatible-face nil
334 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Blue1"))
335 (((class color
) (min-colors 88) (background dark
)) (:foreground
"LightSkyBlue"))
336 (((class color
) (min-colors 16) (background light
)) (:foreground
"Blue"))
337 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightSkyBlue"))
338 (((class color
) (min-colors 8)) (:foreground
"blue" :bold t
))
340 "Face used in agenda for captions and dates."
343 (unless (facep 'org-agenda-date
)
344 (copy-face 'org-agenda-structure
'org-agenda-date
)
345 (set-face-doc-string 'org-agenda-date
346 "Face used in agenda for normal days."))
348 (unless (facep 'org-agenda-date-weekend
)
349 (copy-face 'org-agenda-date
'org-agenda-date-weekend
)
350 (set-face-doc-string 'org-agenda-date-weekend
351 "Face used in agenda for weekend days.
352 See the variable `org-agenda-weekend-days' for a definition of which days
353 belong to the weekend.")
354 (when (fboundp 'set-face-attribute
)
355 (set-face-attribute 'org-agenda-date-weekend nil
:weight
'bold
)))
357 (defface org-scheduled-today
358 (org-compatible-face nil
359 '((((class color
) (min-colors 88) (background light
)) (:foreground
"DarkGreen"))
360 (((class color
) (min-colors 88) (background dark
)) (:foreground
"PaleGreen"))
361 (((class color
) (min-colors 8)) (:foreground
"green"))
362 (t (:bold t
:italic t
))))
363 "Face for items scheduled for a certain day."
366 (defface org-scheduled-previously
367 (org-compatible-face nil
368 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Firebrick"))
369 (((class color
) (min-colors 88) (background dark
)) (:foreground
"chocolate1"))
370 (((class color
) (min-colors 8) (background light
)) (:foreground
"red"))
371 (((class color
) (min-colors 8) (background dark
)) (:foreground
"red" :bold t
))
373 "Face for items scheduled previously, and not yet done."
376 (defface org-upcoming-deadline
377 (org-compatible-face nil
378 '((((class color
) (min-colors 88) (background light
)) (:foreground
"Firebrick"))
379 (((class color
) (min-colors 88) (background dark
)) (:foreground
"chocolate1"))
380 (((class color
) (min-colors 8) (background light
)) (:foreground
"red"))
381 (((class color
) (min-colors 8) (background dark
)) (:foreground
"red" :bold t
))
383 "Face for items scheduled previously, and not yet done."
386 (defcustom org-agenda-deadline-faces
387 '((1.0 . org-warning
)
388 (0.5 . org-upcoming-deadline
)
390 "Faces for showing deadlines in the agenda.
391 This is a list of cons cells. The cdr of each cell is a face to be used,
392 and it can also just be like '(:foreground \"yellow\").
393 Each car is a fraction of the head-warning time that must have passed for
394 this the face in the cdr to be used for display. The numbers must be
395 given in descending order. The head-warning time is normally taken
396 from `org-deadline-warning-days', but can also be specified in the deadline
397 timestamp itself, like this:
399 DEADLINE: <2007-08-13 Mon -8d>
401 You may use d for days, w for weeks, m for months and y for years. Months
402 and years will only be treated in an approximate fashion (30.4 days for a
403 month and 365.24 days for a year)."
405 :group
'org-agenda-daily
/weekly
408 (number :tag
"Fraction of head-warning time passed")
409 (sexp :tag
"Face"))))
411 (defface org-agenda-restriction-lock
412 (org-compatible-face nil
413 '((((class color
) (min-colors 88) (background light
)) (:background
"yellow1"))
414 (((class color
) (min-colors 88) (background dark
)) (:background
"skyblue4"))
415 (((class color
) (min-colors 16) (background light
)) (:background
"yellow1"))
416 (((class color
) (min-colors 16) (background dark
)) (:background
"skyblue4"))
417 (((class color
) (min-colors 8)) (:background
"cyan" :foreground
"black"))
418 (t (:inverse-video t
))))
419 "Face for showing the agenda restriction lock."
422 (defface org-time-grid
;; originally copied from font-lock-variable-name-face
423 (org-compatible-face nil
424 '((((class color
) (min-colors 16) (background light
)) (:foreground
"DarkGoldenrod"))
425 (((class color
) (min-colors 16) (background dark
)) (:foreground
"LightGoldenrod"))
426 (((class color
) (min-colors 8)) (:foreground
"yellow" :weight light
))))
427 "Face used for time grids."
430 (defconst org-level-faces
431 '(org-level-1 org-level-2 org-level-3 org-level-4
432 org-level-5 org-level-6 org-level-7 org-level-8
435 (defcustom org-n-level-faces
(length org-level-faces
)
436 "The number of different faces to be used for headlines.
437 Org-mode defines 8 different headline faces, so this can be at most 8.
438 If it is less than 8, the level-1 face gets re-used for level N+1 etc."
442 (defface org-latex-and-export-specials
443 (let ((font (cond ((assq :inherit custom-face-attributes
)
444 '(:inherit underline
))
445 (t '(:underline t
)))))
446 `((((class grayscale
) (background light
))
447 (:foreground
"DimGray" ,@font
))
448 (((class grayscale
) (background dark
))
449 (:foreground
"LightGray" ,@font
))
450 (((class color
) (background light
))
451 (:foreground
"SaddleBrown"))
452 (((class color
) (background dark
))
453 (:foreground
"burlywood"))
455 "Face used to highlight math latex and other special exporter stuff."
460 ;; arch-tag: 9dab5f91-c4b9-4d6f-bac3-1f6211ad0a04
462 ;;; org-faces.el ends here