org-faces.el 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. ;;; org-faces.el --- Face definitions -*- lexical-binding: t; -*-
  2. ;; Copyright (C) 2004-2022 Free Software Foundation, Inc.
  3. ;; Author: Carsten Dominik <carsten.dominik@gmail.com>
  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-cite '((t :inherit link))
  140. "Face for citations."
  141. :group 'org-faces)
  142. (defface org-cite-key '((t :inherit link))
  143. "Face for citation keys."
  144. :group 'org-faces)
  145. (defface org-link '((t :inherit link))
  146. "Face for links."
  147. :group 'org-faces)
  148. (defface org-footnote
  149. '((((class color) (background light)) (:foreground "Purple" :underline t))
  150. (((class color) (background dark)) (:foreground "Cyan" :underline t))
  151. (t (:underline t)))
  152. "Face for footnotes."
  153. :group 'org-faces)
  154. (defface org-ellipsis
  155. '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
  156. (((class color) (background dark)) (:foreground "LightGoldenrod" :underline t))
  157. (t (:strike-through t)))
  158. "Face for the ellipsis in folded text."
  159. :group 'org-faces)
  160. (defface org-target
  161. '((((class color) (background light)) (:underline t))
  162. (((class color) (background dark)) (:underline t))
  163. (t (:underline t)))
  164. "Face for link targets."
  165. :group 'org-faces)
  166. (defface org-date
  167. '((((class color) (background light)) (:foreground "Purple" :underline t))
  168. (((class color) (background dark)) (:foreground "Cyan" :underline t))
  169. (t (:underline t)))
  170. "Face for date/time stamps."
  171. :group 'org-faces)
  172. (defface org-date-selected
  173. '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :inverse-video t))
  174. (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :inverse-video t))
  175. (((class color) (min-colors 8) (background light)) (:foreground "red" :inverse-video t))
  176. (((class color) (min-colors 8) (background dark)) (:foreground "red" :inverse-video t))
  177. (t (:inverse-video t)))
  178. "Face for highlighting the calendar day when using `org-read-date'.
  179. Using a bold face here might cause discrepancies while displaying the
  180. calendar."
  181. :group 'org-faces)
  182. (defface org-sexp-date
  183. '((((class color) (background light)) (:foreground "Purple"))
  184. (((class color) (background dark)) (:foreground "Cyan"))
  185. (t (:underline t)))
  186. "Face for diary-like sexp date specifications."
  187. :group 'org-faces)
  188. (defface org-tag '((t (:bold t)))
  189. "Default face for tags.
  190. Note that the variable `org-tag-faces' can be used to overrule this face for
  191. specific tags."
  192. :group 'org-faces)
  193. (defface org-list-dt '((t (:bold t)))
  194. "Default face for definition terms in lists."
  195. :group 'org-faces)
  196. (defface org-todo ;Copied from `font-lock-warning-face'
  197. '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
  198. (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
  199. (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
  200. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  201. (t (:inverse-video t :bold t)))
  202. "Face for TODO keywords."
  203. :group 'org-faces)
  204. (defface org-done ;Copied from `font-lock-type-face'
  205. '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
  206. (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
  207. (((class color) (min-colors 8)) (:foreground "green"))
  208. (t (:bold t)))
  209. "Face used for todo keywords that indicate DONE items."
  210. :group 'org-faces)
  211. (defface org-agenda-done ;Copied from `font-lock-type-face'
  212. '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
  213. (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
  214. (((class color) (min-colors 8)) (:foreground "green"))
  215. (t (:bold nil)))
  216. "Face used in agenda, to indicate lines switched to DONE.
  217. This face is used to de-emphasize items that where brightly colored in the
  218. agenda because they were things to do, or overdue. The DONE state itself
  219. is of course immediately visible, but for example a passed deadline is
  220. \(by default) very bright read. This face could be simply the default face
  221. of the frame, for example."
  222. :group 'org-faces)
  223. (defface org-headline-todo ;Copied from `font-lock-string-face'
  224. '((((class color) (min-colors 16) (background light)) (:foreground "Red4"))
  225. (((class color) (min-colors 16) (background dark)) (:foreground "Pink2"))
  226. (((class color) (min-colors 8) (background light)) (:bold t)))
  227. "Face used to indicate that a headline is marked as TODO.
  228. This face is only used if `org-fontify-todo-headline' is set. If applies
  229. to the part of the headline after the TODO keyword."
  230. :group 'org-faces)
  231. (defface org-headline-done ;Copied from `font-lock-string-face'
  232. '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
  233. (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
  234. (((class color) (min-colors 8) (background light)) (:bold nil)))
  235. "Face used to indicate that a headline is DONE.
  236. This face is only used if `org-fontify-done-headline' is set. If applies
  237. to the part of the headline after the DONE keyword."
  238. :group 'org-faces)
  239. (defcustom org-faces-easy-properties
  240. '((todo . :foreground) (tag . :foreground) (priority . :foreground))
  241. "The property changes by easy faces.
  242. This is an alist, the keys show the area of application, the values
  243. can be `:foreground' or `:background'. A color string for special
  244. keywords will then be interpreted as either foreground or background
  245. color."
  246. :group 'org-faces
  247. :group 'org-todo
  248. :version "24.1"
  249. :type '(repeat
  250. (cons (choice (const todo) (const tag) (const priority))
  251. (choice (const :foreground) (const :background)))))
  252. (defcustom org-todo-keyword-faces nil
  253. "Faces for specific TODO keywords.
  254. This is a list of cons cells, with TODO keywords in the car
  255. and faces in the cdr. The face can be a symbol, a color
  256. as a string (in which case the rest is inherited from the `org-todo' face),
  257. or a property list of attributes, like
  258. (:foreground \"blue\" :weight bold :underline t).
  259. If it is a color string, the variable `org-faces-easy-properties'
  260. determines if it is a foreground or a background color."
  261. :group 'org-faces
  262. :group 'org-todo
  263. :type '(repeat
  264. (cons
  265. (string :tag "Keyword")
  266. (choice :tag "Face "
  267. (string :tag "Color")
  268. (sexp :tag "Face")))))
  269. (defface org-priority '((t :inherit font-lock-keyword-face))
  270. "Face used for priority cookies."
  271. :group 'org-faces)
  272. (defcustom org-priority-faces nil
  273. "Faces for specific Priorities.
  274. This is a list of cons cells, with priority character in the car
  275. and faces in the cdr. The face can be a symbol, a color
  276. as a string, or a property list of attributes, like
  277. (:foreground \"blue\" :weight bold :underline t).
  278. If it is a color string, the variable `org-faces-easy-properties'
  279. determines if it is a foreground or a background color."
  280. :group 'org-faces
  281. :group 'org-todo
  282. :type '(repeat
  283. (cons
  284. (character :tag "Priority")
  285. (choice :tag "Face "
  286. (string :tag "Color")
  287. (sexp :tag "Face")))))
  288. (defvar org-tags-special-faces-re nil)
  289. (defun org-set-tag-faces (var value)
  290. (set var value)
  291. (if (not value)
  292. (setq org-tags-special-faces-re nil)
  293. (setq org-tags-special-faces-re
  294. (concat ":" (regexp-opt (mapcar #'car value) t) ":"))))
  295. (defface org-checkbox '((t :inherit bold))
  296. "Face for checkboxes."
  297. :group 'org-faces)
  298. (defface org-checkbox-statistics-todo '((t (:inherit org-todo)))
  299. "Face used for unfinished checkbox statistics."
  300. :group 'org-faces)
  301. (defface org-checkbox-statistics-done '((t (:inherit org-done)))
  302. "Face used for finished checkbox statistics."
  303. :group 'org-faces)
  304. (defcustom org-tag-faces nil
  305. "Faces for specific tags.
  306. This is a list of cons cells, with tags in the car and faces in the cdr.
  307. The face can be a symbol, a foreground color (in which case the rest is
  308. inherited from the `org-tag' face) or a property list of attributes,
  309. like (:foreground \"blue\" :weight bold :underline t).
  310. If you set this variable through customize, it will immediately be effective
  311. in new buffers and in modified lines.
  312. If you set it with Lisp, a restart of Emacs is required to activate the
  313. changes."
  314. :group 'org-faces
  315. :group 'org-tags
  316. :set 'org-set-tag-faces
  317. :type '(repeat
  318. (cons
  319. (string :tag "Tag ")
  320. (choice :tag "Face"
  321. (string :tag "Foreground color")
  322. (sexp :tag "Face")))))
  323. (defface org-table ;Copied from `font-lock-function-name-face'
  324. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  325. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  326. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  327. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  328. (((class color) (min-colors 8) (background light)) (:foreground "blue"))
  329. (((class color) (min-colors 8) (background dark))))
  330. "Face used for tables."
  331. :group 'org-faces)
  332. (defface org-table-header '((t :inherit org-table
  333. :background "LightGray"
  334. :foreground "Black"))
  335. "Face for table header."
  336. :group 'org-faces)
  337. (defface org-formula
  338. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  339. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  340. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  341. (((class color) (min-colors 8) (background dark)) (:foreground "red"))
  342. (t (:bold t :italic t)))
  343. "Face for formulas."
  344. :group 'org-faces)
  345. (defface org-code '((t :inherit shadow))
  346. "Face for fixed-width text like code snippets."
  347. :group 'org-faces
  348. :version "22.1")
  349. (defface org-meta-line '((t :inherit font-lock-comment-face))
  350. "Face for meta lines starting with \"#+\"."
  351. :group 'org-faces
  352. :version "22.1")
  353. (defface org-document-title
  354. '((((class color) (background light)) (:foreground "midnight blue" :weight bold))
  355. (((class color) (background dark)) (:foreground "pale turquoise" :weight bold))
  356. (t (:weight bold)))
  357. "Face for document title, i.e. that which follows the #+TITLE: keyword."
  358. :group 'org-faces)
  359. (defface org-document-info
  360. '((((class color) (background light)) (:foreground "midnight blue"))
  361. (((class color) (background dark)) (:foreground "pale turquoise"))
  362. (t nil))
  363. "Face for document information such as the author and date.
  364. This applies to the text that follows a #+SUBTITLE:, #+DATE:,
  365. #+AUTHOR: or #+EMAIL: keyword."
  366. :group 'org-faces)
  367. (defface org-document-info-keyword '((t :inherit shadow))
  368. "Face for document information keywords.
  369. This face applies to the #+TITLE:, #+SUBTITLE:, #+AUTHOR:,
  370. #+EMAIL: and #+DATE: keywords."
  371. :group 'org-faces)
  372. (defface org-block `((t :inherit shadow
  373. ,@(and (>= emacs-major-version 27) '(:extend t))))
  374. "Face used for text inside various blocks.
  375. It is always used for source blocks. You can refine what face
  376. should be used depending on the source block language by setting,
  377. `org-src-block-faces', which takes precedence.
  378. When `org-fontify-quote-and-verse-blocks' is not nil, text inside
  379. verse and quote blocks are fontified using the `org-verse' and
  380. `org-quote' faces, which inherit from `org-block'."
  381. :group 'org-faces
  382. :version "26.1")
  383. (defface org-block-begin-line '((t (:inherit org-meta-line)))
  384. "Face used for the line delimiting the begin of source blocks."
  385. :group 'org-faces)
  386. (defface org-block-end-line '((t (:inherit org-block-begin-line)))
  387. "Face used for the line delimiting the end of source blocks."
  388. :group 'org-faces)
  389. (defface org-verbatim '((t (:inherit shadow)))
  390. "Face for fixed-with text like code snippets."
  391. :group 'org-faces
  392. :version "22.1")
  393. (defface org-quote '((t (:inherit org-block)))
  394. "Face for #+BEGIN_QUOTE ... #+END_QUOTE blocks.
  395. Active when `org-fontify-quote-and-verse-blocks' is set."
  396. :group 'org-faces)
  397. (defface org-verse '((t (:inherit org-block)))
  398. "Face for #+BEGIN_VERSE ... #+END_VERSE blocks.
  399. Active when `org-fontify-quote-and-verse-blocks' is set."
  400. :group 'org-faces)
  401. (defcustom org-fontify-quote-and-verse-blocks nil
  402. "Non-nil means, add a special face to #+begin_quote and #+begin_verse block.
  403. When nil, format these as normal Org. This is the default, because the
  404. content of these blocks will still be treated as Org syntax."
  405. :group 'org-faces
  406. :version "24.1"
  407. :type 'boolean)
  408. (defface org-clock-overlay ;Copied from `secondary-selection'
  409. '((((class color) (min-colors 88) (background light))
  410. (:background "LightGray" :foreground "black"))
  411. (((class color) (min-colors 88) (background dark))
  412. (:background "SkyBlue4" :foreground "white"))
  413. (((class color) (min-colors 16) (background light))
  414. (:background "gray" :foreground "black"))
  415. (((class color) (min-colors 16) (background dark))
  416. (:background "SkyBlue4" :foreground "white"))
  417. (((class color) (min-colors 8))
  418. (:background "cyan" :foreground "black"))
  419. (t (:inverse-video t)))
  420. "Basic face for displaying the secondary selection."
  421. :group 'org-faces)
  422. (defface org-agenda-structure ;Copied from `font-lock-function-name-face'
  423. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  424. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  425. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  426. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  427. (((class color) (min-colors 8)) (:foreground "blue" :bold t))
  428. (t (:bold t)))
  429. "Face used in agenda for captions and dates."
  430. :group 'org-faces)
  431. (defface org-agenda-structure-secondary '((t (:inherit org-agenda-structure)))
  432. "Face used for secondary information in agenda block headers."
  433. :group 'org-faces)
  434. (defface org-agenda-structure-filter '((t (:inherit (org-warning org-agenda-structure))))
  435. "Face used for the current type of task filter in the agenda.
  436. It inherits from `org-agenda-structure' so it can adapt to
  437. it (e.g. if that is assigned a diffent font height or family)."
  438. :group 'org-faces)
  439. (defface org-agenda-date '((t (:inherit org-agenda-structure)))
  440. "Face used in agenda for normal days."
  441. :group 'org-faces)
  442. (defface org-agenda-date-today
  443. '((t (:inherit org-agenda-date :weight bold :italic t)))
  444. "Face used in agenda for today."
  445. :group 'org-faces)
  446. (defface org-agenda-date-weekend-today '((t (:inherit org-agenda-date-today)))
  447. "Face used in agenda for today during weekends."
  448. :group 'org-faces)
  449. (defface org-agenda-clocking '((t (:inherit secondary-selection)))
  450. "Face marking the current clock item in the agenda."
  451. :group 'org-faces)
  452. (defface org-agenda-date-weekend '((t (:inherit org-agenda-date :weight bold)))
  453. "Face used in agenda for weekend days.
  454. See the variable `org-agenda-weekend-days' for a definition of
  455. which days belong to the weekend."
  456. :group 'org-faces)
  457. (defface org-scheduled
  458. '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
  459. (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
  460. (((class color) (min-colors 8)) (:foreground "green"))
  461. (t (:bold t :italic t)))
  462. "Face for items scheduled for a certain day."
  463. :group 'org-faces)
  464. (defface org-scheduled-today
  465. '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
  466. (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
  467. (((class color) (min-colors 8)) (:foreground "green"))
  468. (t (:bold t :italic t)))
  469. "Face for items scheduled for a certain day."
  470. :group 'org-faces)
  471. (defface org-agenda-dimmed-todo-face
  472. '((((background light)) (:foreground "grey50"))
  473. (((background dark)) (:foreground "grey50")))
  474. "Face used to dim blocked tasks in the agenda."
  475. :group 'org-faces)
  476. (defface org-scheduled-previously
  477. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  478. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  479. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  480. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  481. (t (:bold t)))
  482. "Face for items scheduled previously, and not yet done."
  483. :group 'org-faces)
  484. (defface org-imminent-deadline '((t :inherit org-warning))
  485. "Face for current deadlines in the agenda.
  486. See also `org-agenda-deadline-faces'."
  487. :group 'org-faces)
  488. (defface org-upcoming-deadline
  489. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  490. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  491. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  492. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  493. (t (:bold t)))
  494. "Face for items scheduled previously, and not yet done.
  495. See also `org-agenda-deadline-faces'."
  496. :group 'org-faces)
  497. (defface org-upcoming-distant-deadline '((t :inherit org-default))
  498. "Face for items scheduled previously, not done, and have a distant deadline.
  499. See also `org-agenda-deadline-faces'.")
  500. (defcustom org-agenda-deadline-faces
  501. '((1.0 . org-imminent-deadline)
  502. (0.5 . org-upcoming-deadline)
  503. (0.0 . org-upcoming-distant-deadline))
  504. "Faces for showing deadlines in the agenda.
  505. This is a list of cons cells. The cdr of each cell is a face to be used,
  506. and it can also just be like \\='(:foreground \"yellow\").
  507. Each car is a fraction of the head-warning time that must have passed for
  508. this the face in the cdr to be used for display. The numbers must be
  509. given in descending order. The head-warning time is normally taken
  510. from `org-deadline-warning-days', but can also be specified in the deadline
  511. timestamp itself, like this:
  512. DEADLINE: <2007-08-13 Mon -8d>
  513. You may use d for days, w for weeks, m for months and y for years. Months
  514. and years will only be treated in an approximate fashion (30.4 days for a
  515. month and 365.24 days for a year)."
  516. :group 'org-faces
  517. :group 'org-agenda-daily/weekly
  518. :type '(repeat
  519. (cons
  520. (number :tag "Fraction of head-warning time passed")
  521. (sexp :tag "Face"))))
  522. (defface org-agenda-restriction-lock
  523. '((((class color) (min-colors 88) (background light)) (:background "#eeeeee"))
  524. (((class color) (min-colors 88) (background dark)) (:background "#1C1C1C"))
  525. (((class color) (min-colors 16) (background light)) (:background "#eeeeee"))
  526. (((class color) (min-colors 16) (background dark)) (:background "#1C1C1C"))
  527. (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
  528. (t (:inverse-video t)))
  529. "Face for showing the agenda restriction lock."
  530. :group 'org-faces)
  531. (defface org-agenda-filter-tags '((t :inherit mode-line))
  532. "Face for tag(s) in the mode-line when filtering the agenda."
  533. :group 'org-faces)
  534. (defface org-agenda-filter-category '((t :inherit mode-line))
  535. "Face for categories in the mode-line when filtering the agenda."
  536. :group 'org-faces)
  537. (defface org-agenda-filter-effort '((t :inherit mode-line))
  538. "Face for effort in the mode-line when filtering the agenda."
  539. :group 'org-faces)
  540. (defface org-agenda-filter-regexp '((t :inherit mode-line))
  541. "Face for regexp(s) in the mode-line when filtering the agenda."
  542. :group 'org-faces)
  543. (defface org-time-grid ;Copied from `font-lock-variable-name-face'
  544. '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
  545. (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
  546. (((class color) (min-colors 8)) (:foreground "yellow" :weight light)))
  547. "Face used for time grids."
  548. :group 'org-faces)
  549. (defface org-agenda-current-time '((t (:inherit org-time-grid)))
  550. "Face used to show the current time in the time grid."
  551. :group 'org-faces)
  552. (defface org-agenda-diary '((t :inherit default))
  553. "Face used for agenda entries that come from the Emacs diary."
  554. :group 'org-faces)
  555. (defface org-agenda-calendar-event '((t :inherit default))
  556. "Face used to show events and appointments in the agenda."
  557. :group 'org-faces)
  558. (defface org-agenda-calendar-sexp '((t :inherit default))
  559. "Face used to show events computed from a S-expression."
  560. :group 'org-faces)
  561. (defconst org-level-faces
  562. '(org-level-1 org-level-2 org-level-3 org-level-4
  563. org-level-5 org-level-6 org-level-7 org-level-8))
  564. (defcustom org-n-level-faces (length org-level-faces)
  565. "The number of different faces to be used for headlines.
  566. Org mode defines 8 different headline faces, so this can be at most 8.
  567. If it is less than 8, the level-1 face gets re-used for level N+1 etc."
  568. :type 'integer
  569. :group 'org-faces)
  570. (defcustom org-cycle-level-faces t
  571. "Non-nil means level styles cycle after level `org-n-level-faces'.
  572. Then so level org-n-level-faces+1 is styled like level 1.
  573. If nil, then all levels >= org-n-level-faces are styled like
  574. level org-n-level-faces."
  575. :group 'org-appearance
  576. :group 'org-faces
  577. :version "24.1"
  578. :type 'boolean)
  579. (defface org-latex-and-related
  580. (let ((font (cond ((assq :inherit custom-face-attributes)
  581. '(:inherit underline))
  582. (t '(:underline t)))))
  583. `((((class grayscale) (background light))
  584. (:foreground "DimGray" ,@font))
  585. (((class grayscale) (background dark))
  586. (:foreground "LightGray" ,@font))
  587. (((class color) (background light))
  588. (:foreground "SaddleBrown"))
  589. (((class color) (background dark))
  590. (:foreground "burlywood"))
  591. (t (,@font))))
  592. "Face used to highlight LaTeX data, entities and sub/superscript."
  593. :group 'org-faces
  594. :version "24.4"
  595. :package-version '(Org . "8.0"))
  596. (defface org-macro '((t :inherit org-latex-and-related))
  597. "Face for macros."
  598. :group 'org-faces
  599. :version "24.4"
  600. :package-version '(Org . "8.0"))
  601. (defface org-tag-group '((t :inherit org-tag))
  602. "Face for group tags."
  603. :group 'org-faces
  604. :version "24.4"
  605. :package-version '(Org . "8.0"))
  606. (defface org-mode-line-clock '((t (:inherit mode-line)))
  607. "Face used for clock display in mode line."
  608. :group 'org-faces)
  609. (defface org-mode-line-clock-overrun
  610. '((t (:inherit mode-line :background "red")))
  611. "Face used for clock display for overrun tasks in mode line."
  612. :group 'org-faces)
  613. (provide 'org-faces)
  614. ;;; org-faces.el ends here