org-faces.el 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. ;;; org-faces.el --- Face definitions -*- lexical-binding: t; -*-
  2. ;; Copyright (C) 2004-2021 Free Software Foundation, Inc.
  3. ;; Author: Carsten Dominik <carsten at orgmode dot org>
  4. ;; Keywords: outlines, hypermedia, calendar, wp
  5. ;; Homepage: https://orgmode.org
  6. ;;
  7. ;; This file is part of GNU Emacs.
  8. ;;
  9. ;; GNU Emacs is free software: you can redistribute it and/or modify
  10. ;; it under the terms of the GNU General Public License as published by
  11. ;; the Free Software Foundation, either version 3 of the License, or
  12. ;; (at your option) any later version.
  13. ;; GNU Emacs is distributed in the hope that it will be useful,
  14. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;; GNU General Public License for more details.
  17. ;; You should have received a copy of the GNU General Public License
  18. ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
  19. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  20. ;;
  21. ;;; Commentary:
  22. ;; This file contains the face definitions for Org.
  23. ;;; Code:
  24. (defgroup org-faces nil
  25. "Faces in Org mode."
  26. :tag "Org Faces"
  27. :group 'org-appearance)
  28. (defface org-default '((t :inherit default))
  29. "Face used for default text."
  30. :group 'org-faces)
  31. (defface org-hide
  32. '((((background light)) (:foreground "white"))
  33. (((background dark)) (:foreground "black")))
  34. "Face used to hide leading stars in headlines.
  35. The foreground color of this face should be equal to the background
  36. color of the frame."
  37. :group 'org-faces)
  38. (defface org-dispatcher-highlight
  39. '((default :weight bold)
  40. (((class color) (min-colors 88) (background dark))
  41. :background "gray20" :foreground "gold1")
  42. (((class color) (min-colors 88) (background light))
  43. :background "SlateGray1" :foreground "DarkBlue")
  44. (((class color) (min-colors 16) (background dark))
  45. :foreground "yellow")
  46. (((class color) (min-colors 16) (background light))
  47. :foreground "blue")
  48. (t :inverse-video t))
  49. "Face for highlighted keys in the dispatcher."
  50. :group 'org-faces)
  51. (defface org-level-1 '((t :inherit outline-1))
  52. "Face used for level 1 headlines."
  53. :group 'org-faces)
  54. (defface org-level-2 '((t :inherit outline-2))
  55. "Face used for level 2 headlines."
  56. :group 'org-faces)
  57. (defface org-level-3 '((t :inherit outline-3))
  58. "Face used for level 3 headlines."
  59. :group 'org-faces)
  60. (defface org-level-4 '((t :inherit outline-4))
  61. "Face used for level 4 headlines."
  62. :group 'org-faces)
  63. (defface org-level-5 '((t :inherit outline-5))
  64. "Face used for level 5 headlines."
  65. :group 'org-faces)
  66. (defface org-level-6 '((t :inherit outline-6))
  67. "Face used for level 6 headlines."
  68. :group 'org-faces)
  69. (defface org-level-7 '((t :inherit outline-7))
  70. "Face used for level 7 headlines."
  71. :group 'org-faces)
  72. (defface org-level-8 '((t :inherit outline-8))
  73. "Face used for level 8 headlines."
  74. :group 'org-faces)
  75. (defface org-special-keyword '((t :inherit font-lock-keyword-face))
  76. "Face used for special keywords."
  77. :group 'org-faces)
  78. (defface org-drawer ;Copied from `font-lock-function-name-face'
  79. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  80. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  81. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  82. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  83. (((class color) (min-colors 8)) (:foreground "blue" :bold t))
  84. (t (:bold t)))
  85. "Face used for drawers."
  86. :group 'org-faces)
  87. (defface org-property-value nil
  88. "Face used for the value of a property."
  89. :group 'org-faces)
  90. (defface org-column
  91. '((((class color) (min-colors 16) (background light))
  92. (:background "grey90" :weight normal :slant normal :strike-through nil
  93. :underline nil))
  94. (((class color) (min-colors 16) (background dark))
  95. (:background "grey30" :weight normal :slant normal :strike-through nil
  96. :underline nil))
  97. (((class color) (min-colors 8))
  98. (:background "cyan" :foreground "black"
  99. :weight normal :slant normal :strike-through nil
  100. :underline nil))
  101. (t (:inverse-video t)))
  102. "Face for column display of entry properties.
  103. This is actually only part of the face definition for the text in column view.
  104. The following faces apply, with this priority.
  105. 1. The color of the reference face. This is normally the level fact that
  106. is used in the outline. In agenda-mode, it will be the face of the
  107. first character in the line. The color is explicitly retained to
  108. make sure that the column line still looks a bit like the structure
  109. line it is masking.
  110. 2. The `org-column' face.
  111. 3. The remaining properties of the reference face.
  112. Since column view works by putting overlays with a display property
  113. over individual characters in the buffer, the face of the underlining
  114. character (this might for example be the a TODO keyword) might still
  115. shine through in some properties. So when your column view looks
  116. funny, with \"random\" colors, weight, strike-through, try to explicitly
  117. set the properties in the `org-column' face. For example, set
  118. :underline to nil, or the :slant to `normal'."
  119. :group 'org-faces)
  120. (defface org-column-title
  121. '((((class color) (min-colors 16) (background light))
  122. (:background "grey90" :underline t :weight bold))
  123. (((class color) (min-colors 16) (background dark))
  124. (:background "grey30" :underline t :weight bold))
  125. (((class color) (min-colors 8))
  126. (:background "cyan" :foreground "black" :underline t :weight bold))
  127. (t (:inverse-video t)))
  128. "Face for column display of entry properties."
  129. :group 'org-faces)
  130. (defface org-agenda-column-dateline '((t :inherit org-column))
  131. "Face used in agenda column view for datelines with summaries."
  132. :group 'org-faces)
  133. (defface org-warning '((t :inherit font-lock-warning-face))
  134. "Face for deadlines and TODO keywords."
  135. :group 'org-faces)
  136. (defface org-archived '((t :inherit shadow))
  137. "Face for headline with the ARCHIVE tag."
  138. :group 'org-faces)
  139. (defface org-link '((t :inherit link))
  140. "Face for links."
  141. :group 'org-faces)
  142. (defface org-footnote
  143. '((((class color) (background light)) (:foreground "Purple" :underline t))
  144. (((class color) (background dark)) (:foreground "Cyan" :underline t))
  145. (t (:underline t)))
  146. "Face for footnotes."
  147. :group 'org-faces)
  148. (defface org-ellipsis
  149. '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
  150. (((class color) (background dark)) (:foreground "LightGoldenrod" :underline t))
  151. (t (:strike-through t)))
  152. "Face for the ellipsis in folded text."
  153. :group 'org-faces)
  154. (defface org-target
  155. '((((class color) (background light)) (:underline t))
  156. (((class color) (background dark)) (:underline t))
  157. (t (:underline t)))
  158. "Face for link targets."
  159. :group 'org-faces)
  160. (defface org-date
  161. '((((class color) (background light)) (:foreground "Purple" :underline t))
  162. (((class color) (background dark)) (:foreground "Cyan" :underline t))
  163. (t (:underline t)))
  164. "Face for date/time stamps."
  165. :group 'org-faces)
  166. (defface org-date-selected
  167. '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :inverse-video t))
  168. (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :inverse-video t))
  169. (((class color) (min-colors 8) (background light)) (:foreground "red" :inverse-video t))
  170. (((class color) (min-colors 8) (background dark)) (:foreground "red" :inverse-video t))
  171. (t (:inverse-video t)))
  172. "Face for highlighting the calendar day when using `org-read-date'.
  173. Using a bold face here might cause discrepancies while displaying the
  174. calendar."
  175. :group 'org-faces)
  176. (defface org-sexp-date
  177. '((((class color) (background light)) (:foreground "Purple"))
  178. (((class color) (background dark)) (:foreground "Cyan"))
  179. (t (:underline t)))
  180. "Face for diary-like sexp date specifications."
  181. :group 'org-faces)
  182. (defface org-tag '((t (:bold t)))
  183. "Default face for tags.
  184. Note that the variable `org-tag-faces' can be used to overrule this face for
  185. specific tags."
  186. :group 'org-faces)
  187. (defface org-list-dt '((t (:bold t)))
  188. "Default face for definition terms in lists."
  189. :group 'org-faces)
  190. (defface org-todo ;Copied from `font-lock-warning-face'
  191. '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
  192. (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
  193. (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
  194. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  195. (t (:inverse-video t :bold t)))
  196. "Face for TODO keywords."
  197. :group 'org-faces)
  198. (defface org-done ;Copied from `font-lock-type-face'
  199. '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
  200. (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
  201. (((class color) (min-colors 8)) (:foreground "green"))
  202. (t (:bold t)))
  203. "Face used for todo keywords that indicate DONE items."
  204. :group 'org-faces)
  205. (defface org-agenda-done ;Copied from `font-lock-type-face'
  206. '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
  207. (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
  208. (((class color) (min-colors 8)) (:foreground "green"))
  209. (t (:bold nil)))
  210. "Face used in agenda, to indicate lines switched to DONE.
  211. This face is used to de-emphasize items that where brightly colored in the
  212. agenda because they were things to do, or overdue. The DONE state itself
  213. is of course immediately visible, but for example a passed deadline is
  214. \(by default) very bright read. This face could be simply the default face
  215. of the frame, for example."
  216. :group 'org-faces)
  217. (defface org-headline-todo ;Copied from `font-lock-string-face'
  218. '((((class color) (min-colors 16) (background light)) (:foreground "Red4"))
  219. (((class color) (min-colors 16) (background dark)) (:foreground "Pink2"))
  220. (((class color) (min-colors 8) (background light)) (:bold t)))
  221. "Face used to indicate that a headline is marked as TODO.
  222. This face is only used if `org-fontify-todo-headline' is set. If applies
  223. to the part of the headline after the TODO keyword."
  224. :group 'org-faces)
  225. (defface org-headline-done ;Copied from `font-lock-string-face'
  226. '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
  227. (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
  228. (((class color) (min-colors 8) (background light)) (:bold nil)))
  229. "Face used to indicate that a headline is DONE.
  230. This face is only used if `org-fontify-done-headline' is set. If applies
  231. to the part of the headline after the DONE keyword."
  232. :group 'org-faces)
  233. (defcustom org-faces-easy-properties
  234. '((todo . :foreground) (tag . :foreground) (priority . :foreground))
  235. "The property changes by easy faces.
  236. This is an alist, the keys show the area of application, the values
  237. can be `:foreground' or `:background'. A color string for special
  238. keywords will then be interpreted as either foreground or background
  239. color."
  240. :group 'org-faces
  241. :group 'org-todo
  242. :version "24.1"
  243. :type '(repeat
  244. (cons (choice (const todo) (const tag) (const priority))
  245. (choice (const :foreground) (const :background)))))
  246. (defcustom org-todo-keyword-faces nil
  247. "Faces for specific TODO keywords.
  248. This is a list of cons cells, with TODO keywords in the car
  249. and faces in the cdr. The face can be a symbol, a color
  250. as a string (in which case the rest is inherited from the `org-todo' face),
  251. or a property list of attributes, like
  252. (:foreground \"blue\" :weight bold :underline t).
  253. If it is a color string, the variable `org-faces-easy-properties'
  254. determines if it is a foreground or a background color."
  255. :group 'org-faces
  256. :group 'org-todo
  257. :type '(repeat
  258. (cons
  259. (string :tag "Keyword")
  260. (choice :tag "Face "
  261. (string :tag "Color")
  262. (sexp :tag "Face")))))
  263. (defface org-priority '((t :inherit font-lock-keyword-face))
  264. "Face used for priority cookies."
  265. :group 'org-faces)
  266. (defcustom org-priority-faces nil
  267. "Faces for specific Priorities.
  268. This is a list of cons cells, with priority character in the car
  269. and faces in the cdr. The face can be a symbol, a color
  270. as a string, or a property list of attributes, like
  271. (:foreground \"blue\" :weight bold :underline t).
  272. If it is a color string, the variable `org-faces-easy-properties'
  273. determines if it is a foreground or a background color."
  274. :group 'org-faces
  275. :group 'org-todo
  276. :type '(repeat
  277. (cons
  278. (character :tag "Priority")
  279. (choice :tag "Face "
  280. (string :tag "Color")
  281. (sexp :tag "Face")))))
  282. (defvar org-tags-special-faces-re nil)
  283. (defun org-set-tag-faces (var value)
  284. (set var value)
  285. (if (not value)
  286. (setq org-tags-special-faces-re nil)
  287. (setq org-tags-special-faces-re
  288. (concat ":" (regexp-opt (mapcar #'car value) t) ":"))))
  289. (defface org-checkbox '((t :inherit bold))
  290. "Face for checkboxes."
  291. :group 'org-faces)
  292. (defface org-checkbox-statistics-todo '((t (:inherit org-todo)))
  293. "Face used for unfinished checkbox statistics."
  294. :group 'org-faces)
  295. (defface org-checkbox-statistics-done '((t (:inherit org-done)))
  296. "Face used for finished checkbox statistics."
  297. :group 'org-faces)
  298. (defcustom org-tag-faces nil
  299. "Faces for specific tags.
  300. This is a list of cons cells, with tags in the car and faces in the cdr.
  301. The face can be a symbol, a foreground color (in which case the rest is
  302. inherited from the `org-tag' face) or a property list of attributes,
  303. like (:foreground \"blue\" :weight bold :underline t).
  304. If you set this variable through customize, it will immediately be effective
  305. in new buffers and in modified lines.
  306. If you set it with Lisp, a restart of Emacs is required to activate the
  307. changes."
  308. :group 'org-faces
  309. :group 'org-tags
  310. :set 'org-set-tag-faces
  311. :type '(repeat
  312. (cons
  313. (string :tag "Tag ")
  314. (choice :tag "Face"
  315. (string :tag "Foreground color")
  316. (sexp :tag "Face")))))
  317. (defface org-table ;Copied from `font-lock-function-name-face'
  318. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  319. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  320. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  321. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  322. (((class color) (min-colors 8) (background light)) (:foreground "blue"))
  323. (((class color) (min-colors 8) (background dark))))
  324. "Face used for tables."
  325. :group 'org-faces)
  326. (defface org-table-header '((t :inherit org-table
  327. :background "LightGray"
  328. :foreground "Black"))
  329. "Face for table header."
  330. :group 'org-faces)
  331. (defface org-formula
  332. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  333. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  334. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  335. (((class color) (min-colors 8) (background dark)) (:foreground "red"))
  336. (t (:bold t :italic t)))
  337. "Face for formulas."
  338. :group 'org-faces)
  339. (defface org-code '((t :inherit shadow))
  340. "Face for fixed-width text like code snippets."
  341. :group 'org-faces
  342. :version "22.1")
  343. (defface org-meta-line '((t :inherit font-lock-comment-face))
  344. "Face for meta lines starting with \"#+\"."
  345. :group 'org-faces
  346. :version "22.1")
  347. (defface org-document-title
  348. '((((class color) (background light)) (:foreground "midnight blue" :weight bold))
  349. (((class color) (background dark)) (:foreground "pale turquoise" :weight bold))
  350. (t (:weight bold)))
  351. "Face for document title, i.e. that which follows the #+TITLE: keyword."
  352. :group 'org-faces)
  353. (defface org-document-info
  354. '((((class color) (background light)) (:foreground "midnight blue"))
  355. (((class color) (background dark)) (:foreground "pale turquoise"))
  356. (t nil))
  357. "Face for document information such as the author and date.
  358. This applies to the text that follows a #+SUBTITLE:, #+DATE:,
  359. #+AUTHOR: or #+EMAIL: keyword."
  360. :group 'org-faces)
  361. (defface org-document-info-keyword '((t :inherit shadow))
  362. "Face for document information keywords.
  363. This face applies to the #+TITLE:, #+SUBTITLE:, #+AUTHOR:,
  364. #+EMAIL: and #+DATE: keywords."
  365. :group 'org-faces)
  366. (defface org-block `((t :inherit shadow
  367. ,@(and (>= emacs-major-version 27) '(:extend t))))
  368. "Face used for text inside various blocks.
  369. It is always used for source blocks. You can refine what face
  370. should be used depending on the source block language by setting,
  371. `org-src-block-faces', which takes precedence.
  372. When `org-fontify-quote-and-verse-blocks' is not nil, text inside
  373. verse and quote blocks are fontified using the `org-verse' and
  374. `org-quote' faces, which inherit from `org-block'."
  375. :group 'org-faces
  376. :version "26.1")
  377. (defface org-block-begin-line '((t (:inherit org-meta-line)))
  378. "Face used for the line delimiting the begin of source blocks."
  379. :group 'org-faces)
  380. (defface org-block-end-line '((t (:inherit org-block-begin-line)))
  381. "Face used for the line delimiting the end of source blocks."
  382. :group 'org-faces)
  383. (defface org-verbatim '((t (:inherit shadow)))
  384. "Face for fixed-with text like code snippets."
  385. :group 'org-faces
  386. :version "22.1")
  387. (defface org-quote '((t (:inherit org-block)))
  388. "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks.
  389. Active when `org-fontify-quote-and-verse-blocks' is set."
  390. :group 'org-faces)
  391. (defface org-verse '((t (:inherit org-block)))
  392. "Face for #+BEGIN_VERSE ... #+END_VERSE blocks.
  393. Active when `org-fontify-quote-and-verse-blocks' is set."
  394. :group 'org-faces)
  395. (defcustom org-fontify-quote-and-verse-blocks nil
  396. "Non-nil means, add a special face to #+begin_quote and #+begin_verse block.
  397. When nil, format these as normal Org. This is the default, because the
  398. content of these blocks will still be treated as Org syntax."
  399. :group 'org-faces
  400. :version "24.1"
  401. :type 'boolean)
  402. (defface org-clock-overlay ;Copied from `secondary-selection'
  403. '((((class color) (min-colors 88) (background light))
  404. (:background "LightGray" :foreground "black"))
  405. (((class color) (min-colors 88) (background dark))
  406. (:background "SkyBlue4" :foreground "white"))
  407. (((class color) (min-colors 16) (background light))
  408. (:background "gray" :foreground "black"))
  409. (((class color) (min-colors 16) (background dark))
  410. (:background "SkyBlue4" :foreground "white"))
  411. (((class color) (min-colors 8))
  412. (:background "cyan" :foreground "black"))
  413. (t (:inverse-video t)))
  414. "Basic face for displaying the secondary selection."
  415. :group 'org-faces)
  416. (defface org-agenda-structure ;Copied from `font-lock-function-name-face'
  417. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  418. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  419. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  420. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  421. (((class color) (min-colors 8)) (:foreground "blue" :bold t))
  422. (t (:bold t)))
  423. "Face used in agenda for captions and dates."
  424. :group 'org-faces)
  425. (defface org-agenda-date '((t (:inherit org-agenda-structure)))
  426. "Face used in agenda for normal days."
  427. :group 'org-faces)
  428. (defface org-agenda-date-today
  429. '((t (:inherit org-agenda-date :weight bold :italic t)))
  430. "Face used in agenda for today."
  431. :group 'org-faces)
  432. (defface org-agenda-clocking '((t (:inherit secondary-selection)))
  433. "Face marking the current clock item in the agenda."
  434. :group 'org-faces)
  435. (defface org-agenda-date-weekend '((t (:inherit org-agenda-date :weight bold)))
  436. "Face used in agenda for weekend days.
  437. See the variable `org-agenda-weekend-days' for a definition of
  438. which days belong to the weekend."
  439. :group 'org-faces)
  440. (defface org-scheduled
  441. '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
  442. (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
  443. (((class color) (min-colors 8)) (:foreground "green"))
  444. (t (:bold t :italic t)))
  445. "Face for items scheduled for a certain day."
  446. :group 'org-faces)
  447. (defface org-scheduled-today
  448. '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
  449. (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
  450. (((class color) (min-colors 8)) (:foreground "green"))
  451. (t (:bold t :italic t)))
  452. "Face for items scheduled for a certain day."
  453. :group 'org-faces)
  454. (defface org-agenda-dimmed-todo-face
  455. '((((background light)) (:foreground "grey50"))
  456. (((background dark)) (:foreground "grey50")))
  457. "Face used to dim blocked tasks in the agenda."
  458. :group 'org-faces)
  459. (defface org-scheduled-previously
  460. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  461. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  462. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  463. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  464. (t (:bold t)))
  465. "Face for items scheduled previously, and not yet done."
  466. :group 'org-faces)
  467. (defface org-upcoming-deadline
  468. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  469. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  470. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  471. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  472. (t (:bold t)))
  473. "Face for items scheduled previously, and not yet done.
  474. See also `org-agenda-deadline-faces'."
  475. :group 'org-faces)
  476. (defface org-upcoming-distant-deadline '((t :inherit org-default))
  477. "Face for items scheduled previously, not done, and have a distant deadline.
  478. See also `org-agenda-deadline-faces'.")
  479. (defcustom org-agenda-deadline-faces
  480. '((1.0 . org-warning)
  481. (0.5 . org-upcoming-deadline)
  482. (0.0 . org-upcoming-distant-deadline))
  483. "Faces for showing deadlines in the agenda.
  484. This is a list of cons cells. The cdr of each cell is a face to be used,
  485. and it can also just be like \\='(:foreground \"yellow\").
  486. Each car is a fraction of the head-warning time that must have passed for
  487. this the face in the cdr to be used for display. The numbers must be
  488. given in descending order. The head-warning time is normally taken
  489. from `org-deadline-warning-days', but can also be specified in the deadline
  490. timestamp itself, like this:
  491. DEADLINE: <2007-08-13 Mon -8d>
  492. You may use d for days, w for weeks, m for months and y for years. Months
  493. and years will only be treated in an approximate fashion (30.4 days for a
  494. month and 365.24 days for a year)."
  495. :group 'org-faces
  496. :group 'org-agenda-daily/weekly
  497. :type '(repeat
  498. (cons
  499. (number :tag "Fraction of head-warning time passed")
  500. (sexp :tag "Face"))))
  501. (defface org-agenda-restriction-lock
  502. '((((class color) (min-colors 88) (background light)) (:background "#eeeeee"))
  503. (((class color) (min-colors 88) (background dark)) (:background "#1C1C1C"))
  504. (((class color) (min-colors 16) (background light)) (:background "#eeeeee"))
  505. (((class color) (min-colors 16) (background dark)) (:background "#1C1C1C"))
  506. (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
  507. (t (:inverse-video t)))
  508. "Face for showing the agenda restriction lock."
  509. :group 'org-faces)
  510. (defface org-agenda-filter-tags '((t :inherit mode-line))
  511. "Face for tag(s) in the mode-line when filtering the agenda."
  512. :group 'org-faces)
  513. (defface org-agenda-filter-category '((t :inherit mode-line))
  514. "Face for categories in the mode-line when filtering the agenda."
  515. :group 'org-faces)
  516. (defface org-agenda-filter-effort '((t :inherit mode-line))
  517. "Face for effort in the mode-line when filtering the agenda."
  518. :group 'org-faces)
  519. (defface org-agenda-filter-regexp '((t :inherit mode-line))
  520. "Face for regexp(s) in the mode-line when filtering the agenda."
  521. :group 'org-faces)
  522. (defface org-time-grid ;Copied from `font-lock-variable-name-face'
  523. '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
  524. (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
  525. (((class color) (min-colors 8)) (:foreground "yellow" :weight light)))
  526. "Face used for time grids."
  527. :group 'org-faces)
  528. (defface org-agenda-current-time '((t (:inherit org-time-grid)))
  529. "Face used to show the current time in the time grid."
  530. :group 'org-faces)
  531. (defface org-agenda-diary '((t :inherit default))
  532. "Face used for agenda entries that come from the Emacs diary."
  533. :group 'org-faces)
  534. (defface org-agenda-calendar-event '((t :inherit default))
  535. "Face used to show events and appointments in the agenda."
  536. :group 'org-faces)
  537. (defface org-agenda-calendar-sexp '((t :inherit default))
  538. "Face used to show events computed from a S-expression."
  539. :group 'org-faces)
  540. (defconst org-level-faces
  541. '(org-level-1 org-level-2 org-level-3 org-level-4
  542. org-level-5 org-level-6 org-level-7 org-level-8))
  543. (defcustom org-n-level-faces (length org-level-faces)
  544. "The number of different faces to be used for headlines.
  545. Org mode defines 8 different headline faces, so this can be at most 8.
  546. If it is less than 8, the level-1 face gets re-used for level N+1 etc."
  547. :type 'integer
  548. :group 'org-faces)
  549. (defcustom org-cycle-level-faces t
  550. "Non-nil means level styles cycle after level `org-n-level-faces'.
  551. Then so level org-n-level-faces+1 is styled like level 1.
  552. If nil, then all levels >= org-n-level-faces are styled like
  553. level org-n-level-faces."
  554. :group 'org-appearance
  555. :group 'org-faces
  556. :version "24.1"
  557. :type 'boolean)
  558. (defface org-latex-and-related
  559. (let ((font (cond ((assq :inherit custom-face-attributes)
  560. '(:inherit underline))
  561. (t '(:underline t)))))
  562. `((((class grayscale) (background light))
  563. (:foreground "DimGray" ,@font))
  564. (((class grayscale) (background dark))
  565. (:foreground "LightGray" ,@font))
  566. (((class color) (background light))
  567. (:foreground "SaddleBrown"))
  568. (((class color) (background dark))
  569. (:foreground "burlywood"))
  570. (t (,@font))))
  571. "Face used to highlight LaTeX data, entities and sub/superscript."
  572. :group 'org-faces
  573. :version "24.4"
  574. :package-version '(Org . "8.0"))
  575. (defface org-macro '((t :inherit org-latex-and-related))
  576. "Face for macros."
  577. :group 'org-faces
  578. :version "24.4"
  579. :package-version '(Org . "8.0"))
  580. (defface org-tag-group '((t :inherit org-tag))
  581. "Face for group tags."
  582. :group 'org-faces
  583. :version "24.4"
  584. :package-version '(Org . "8.0"))
  585. (defface org-mode-line-clock '((t (:inherit mode-line)))
  586. "Face used for clock display in mode line."
  587. :group 'org-faces)
  588. (defface org-mode-line-clock-overrun
  589. '((t (:inherit mode-line :background "red")))
  590. "Face used for clock display for overrun tasks in mode line."
  591. :group 'org-faces)
  592. (provide 'org-faces)
  593. ;;; org-faces.el ends here