org-faces.el 28 KB

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