org-faces.el 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. ;;; org-faces.el --- Face definitions for Org-mode.
  2. ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
  3. ;; Free Software Foundation, Inc.
  4. ;; Author: Carsten Dominik <carsten at orgmode dot org>
  5. ;; Keywords: outlines, hypermedia, calendar, wp
  6. ;; Homepage: http://orgmode.org
  7. ;; Version: 6.33trans
  8. ;;
  9. ;; This file is part of GNU Emacs.
  10. ;;
  11. ;; GNU Emacs is free software: you can redistribute it and/or modify
  12. ;; it under the terms of the GNU General Public License as published by
  13. ;; the Free Software Foundation, either version 3 of the License, or
  14. ;; (at your option) any later version.
  15. ;; GNU Emacs is distributed in the hope that it will be useful,
  16. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. ;; GNU General Public License for more details.
  19. ;; You should have received a copy of the GNU General Public License
  20. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  21. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  22. ;;
  23. ;;; Commentary:
  24. ;; This file contains the face definitions for Org.
  25. ;;; Code:
  26. (require 'org-macs)
  27. (require 'org-compat)
  28. (defun org-copy-face (old-face new-face docstring &rest attributes)
  29. (unless (facep new-face)
  30. (if (fboundp 'set-face-attribute)
  31. (progn
  32. (make-face new-face)
  33. (set-face-attribute new-face nil :inherit old-face)
  34. (apply 'set-face-attribute new-face nil attributes)
  35. (set-face-doc-string new-face docstring))
  36. (copy-face old-face new-face)
  37. (if (fboundp 'set-face-doc-string)
  38. (set-face-doc-string new-face docstring)))))
  39. (defgroup org-faces nil
  40. "Faces in Org-mode."
  41. :tag "Org Faces"
  42. :group 'org-font-lock)
  43. (defface org-hide
  44. '((((background light)) (:foreground "white"))
  45. (((background dark)) (:foreground "black")))
  46. "Face used to hide leading stars in headlines.
  47. The foreground color of this face should be equal to the background
  48. color of the frame."
  49. :group 'org-faces)
  50. (defface org-level-1 ;; originally copied from font-lock-function-name-face
  51. (org-compatible-face 'outline-1
  52. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  53. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  54. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  55. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  56. (((class color) (min-colors 8)) (:foreground "blue" :bold t))
  57. (t (:bold t))))
  58. "Face used for level 1 headlines."
  59. :group 'org-faces)
  60. (defface org-level-2 ;; originally copied from font-lock-variable-name-face
  61. (org-compatible-face 'outline-2
  62. '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
  63. (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
  64. (((class color) (min-colors 8) (background light)) (:foreground "yellow"))
  65. (((class color) (min-colors 8) (background dark)) (:foreground "yellow" :bold t))
  66. (t (:bold t))))
  67. "Face used for level 2 headlines."
  68. :group 'org-faces)
  69. (defface org-level-3 ;; originally copied from font-lock-keyword-face
  70. (org-compatible-face 'outline-3
  71. '((((class color) (min-colors 88) (background light)) (:foreground "Purple"))
  72. (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1"))
  73. (((class color) (min-colors 16) (background light)) (:foreground "Purple"))
  74. (((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
  75. (((class color) (min-colors 8) (background light)) (:foreground "purple" :bold t))
  76. (((class color) (min-colors 8) (background dark)) (:foreground "cyan" :bold t))
  77. (t (:bold t))))
  78. "Face used for level 3 headlines."
  79. :group 'org-faces)
  80. (defface org-level-4 ;; originally copied from font-lock-comment-face
  81. (org-compatible-face 'outline-4
  82. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  83. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  84. (((class color) (min-colors 16) (background light)) (:foreground "red"))
  85. (((class color) (min-colors 16) (background dark)) (:foreground "red1"))
  86. (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
  87. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  88. (t (:bold t))))
  89. "Face used for level 4 headlines."
  90. :group 'org-faces)
  91. (defface org-level-5 ;; originally copied from font-lock-type-face
  92. (org-compatible-face 'outline-5
  93. '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
  94. (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
  95. (((class color) (min-colors 8)) (:foreground "green"))))
  96. "Face used for level 5 headlines."
  97. :group 'org-faces)
  98. (defface org-level-6 ;; originally copied from font-lock-constant-face
  99. (org-compatible-face 'outline-6
  100. '((((class color) (min-colors 16) (background light)) (:foreground "CadetBlue"))
  101. (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
  102. (((class color) (min-colors 8)) (:foreground "magenta"))))
  103. "Face used for level 6 headlines."
  104. :group 'org-faces)
  105. (defface org-level-7 ;; originally copied from font-lock-builtin-face
  106. (org-compatible-face 'outline-7
  107. '((((class color) (min-colors 16) (background light)) (:foreground "Orchid"))
  108. (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue"))
  109. (((class color) (min-colors 8)) (:foreground "blue"))))
  110. "Face used for level 7 headlines."
  111. :group 'org-faces)
  112. (defface org-level-8 ;; originally copied from font-lock-string-face
  113. (org-compatible-face 'outline-8
  114. '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
  115. (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
  116. (((class color) (min-colors 8)) (:foreground "green"))))
  117. "Face used for level 8 headlines."
  118. :group 'org-faces)
  119. (defface org-special-keyword ;; originally copied from font-lock-string-face
  120. (org-compatible-face nil
  121. '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
  122. (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
  123. (t (:italic t))))
  124. "Face used for special keywords."
  125. :group 'org-faces)
  126. (defface org-drawer ;; originally copied from font-lock-function-name-face
  127. (org-compatible-face nil
  128. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  129. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  130. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  131. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  132. (((class color) (min-colors 8)) (:foreground "blue" :bold t))
  133. (t (:bold t))))
  134. "Face used for drawers."
  135. :group 'org-faces)
  136. (defface org-property-value nil
  137. "Face used for the value of a property."
  138. :group 'org-faces)
  139. (defface org-column
  140. (org-compatible-face nil
  141. '((((class color) (min-colors 16) (background light))
  142. (:background "grey90" :weight normal :slant normal :strike-through nil
  143. :underline nil))
  144. (((class color) (min-colors 16) (background dark))
  145. (:background "grey30" :weight normal :slant normal :strike-through nil
  146. :underline nil))
  147. (((class color) (min-colors 8))
  148. (:background "cyan" :foreground "black"
  149. :weight normal :slant normal :strike-through nil
  150. :underline nil))
  151. (t (:inverse-video t))))
  152. "Face for column display of entry properties.
  153. This is actually only part of the face definition for the text in column view.
  154. The following faces apply, with this priority.
  155. 1. The color of the reference face. This is normally the level fact that
  156. is used in the outline. In agenda-mode, it will be the face of the
  157. first character in the line. The color is explicitly retained to
  158. make sure that the column line still looks a bit like the structure
  159. line it is masking.
  160. 2. The `org-column' face.
  161. 3. The remaining properties of the reference face.
  162. Since column view works by putting overlays with a display property
  163. over individual characters in the buffer, the face of the underlining
  164. character (this might for example be the a TODO keyword) might still
  165. shine through in some properties. So when your column view looks
  166. funny, with \"random\" colors, weight, strike-through, try to explicitly
  167. set the properties in the `org-column' face. For example, set
  168. :underline to nil, or the :slant to `normal'.
  169. Under XEmacs, the rules are simpler, because the XEmacs version of
  170. column view defines special faces for each outline level. See the file
  171. `org-colview-xemacs.el' for details."
  172. :group 'org-faces)
  173. (defface org-column-title
  174. (org-compatible-face nil
  175. '((((class color) (min-colors 16) (background light))
  176. (:background "grey90" :underline t :weight bold))
  177. (((class color) (min-colors 16) (background dark))
  178. (:background "grey30" :underline t :weight bold))
  179. (((class color) (min-colors 8))
  180. (:background "cyan" :foreground "black" :underline t :weight bold))
  181. (t (:inverse-video t))))
  182. "Face for column display of entry properties."
  183. :group 'org-faces)
  184. (when (fboundp 'set-face-attribute)
  185. ;; Make sure that a fixed-width face is used when we have a column table.
  186. (set-face-attribute 'org-column nil
  187. :height (face-attribute 'default :height)
  188. :family (face-attribute 'default :family)))
  189. (defface org-agenda-column-dateline
  190. (org-compatible-face 'org-column
  191. '((t nil)))
  192. "Face used in agenda column view for datelines with summaries."
  193. :group 'org-faces)
  194. (defface org-warning
  195. (org-compatible-face 'font-lock-warning-face
  196. '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
  197. (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
  198. (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
  199. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  200. (t (:bold t))))
  201. "Face for deadlines and TODO keywords."
  202. :group 'org-faces)
  203. (defface org-archived ; similar to shadow
  204. (org-compatible-face 'shadow
  205. '((((class color grayscale) (min-colors 88) (background light))
  206. (:foreground "grey50"))
  207. (((class color grayscale) (min-colors 88) (background dark))
  208. (:foreground "grey70"))
  209. (((class color) (min-colors 8) (background light))
  210. (:foreground "green"))
  211. (((class color) (min-colors 8) (background dark))
  212. (:foreground "yellow"))))
  213. "Face for headline with the ARCHIVE tag."
  214. :group 'org-faces)
  215. (defface org-link
  216. '((((class color) (background light)) (:foreground "Purple" :underline t))
  217. (((class color) (background dark)) (:foreground "Cyan" :underline t))
  218. (t (:underline t)))
  219. "Face for links."
  220. :group 'org-faces)
  221. (defface org-footnote
  222. '((((class color) (background light)) (:foreground "Purple" :underline t))
  223. (((class color) (background dark)) (:foreground "Cyan" :underline t))
  224. (t (:underline t)))
  225. "Face for links."
  226. :group 'org-faces)
  227. (defface org-ellipsis
  228. '((((class color) (background light)) (:foreground "DarkGoldenrod" :underline t))
  229. (((class color) (background dark)) (:foreground "LightGoldenrod" :underline t))
  230. (t (:strike-through t)))
  231. "Face for the ellipsis in folded text."
  232. :group 'org-faces)
  233. (defface org-target
  234. '((((class color) (background light)) (:underline t))
  235. (((class color) (background dark)) (:underline t))
  236. (t (:underline t)))
  237. "Face for link targets."
  238. :group 'org-faces)
  239. (defface org-date
  240. '((((class color) (background light)) (:foreground "Purple" :underline t))
  241. (((class color) (background dark)) (:foreground "Cyan" :underline t))
  242. (t (:underline t)))
  243. "Face for date/time stamps."
  244. :group 'org-faces)
  245. (defface org-sexp-date
  246. '((((class color) (background light)) (:foreground "Purple"))
  247. (((class color) (background dark)) (:foreground "Cyan"))
  248. (t (:underline t)))
  249. "Face for diary-like sexp date specifications."
  250. :group 'org-faces)
  251. (defface org-tag
  252. '((t (:bold t)))
  253. "Default face for tags.
  254. Note that the variable `org-tag-faces' can be used to overrule this face for
  255. specific tags."
  256. :group 'org-faces)
  257. (defface org-todo ; font-lock-warning-face
  258. (org-compatible-face nil
  259. '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold t))
  260. (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold t))
  261. (((class color) (min-colors 8) (background light)) (:foreground "red" :bold t))
  262. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  263. (t (:inverse-video t :bold t))))
  264. "Face for TODO keywords."
  265. :group 'org-faces)
  266. (defface org-done ;; originally copied from font-lock-type-face
  267. (org-compatible-face nil
  268. '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen" :bold t))
  269. (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen" :bold t))
  270. (((class color) (min-colors 8)) (:foreground "green"))
  271. (t (:bold t))))
  272. "Face used for todo keywords that indicate DONE items."
  273. :group 'org-faces)
  274. (defface org-agenda-done ;; originally copied from font-lock-type-face
  275. (org-compatible-face nil
  276. '((((class color) (min-colors 16) (background light)) (:foreground "ForestGreen"))
  277. (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen"))
  278. (((class color) (min-colors 8)) (:foreground "green"))
  279. (t (:bold nil))))
  280. "Face used in agenda, to indicate lines switched to DONE.
  281. This face is used to de-emphasize items that where brightly colord in the
  282. agenda because they were things to do, or overdue. The DONE state itself
  283. is of course immediately visible, but for example a passed deadline is
  284. \(by default) very bright read. This face could be simply the default face
  285. of the frame, for example."
  286. :group 'org-faces)
  287. (defface org-headline-done ;; originally copied from font-lock-string-face
  288. (org-compatible-face nil
  289. '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
  290. (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
  291. (((class color) (min-colors 8) (background light)) (:bold nil))))
  292. "Face used to indicate that a headline is DONE.
  293. This face is only used if `org-fontify-done-headline' is set. If applies
  294. to the part of the headline after the DONE keyword."
  295. :group 'org-faces)
  296. (defcustom org-todo-keyword-faces nil
  297. "Faces for specific TODO keywords.
  298. This is a list of cons cells, with TODO keywords in the car
  299. and faces in the cdr. The face can be a symbol, or a property
  300. list of attributes, like (:foreground \"blue\" :weight bold :underline t)."
  301. :group 'org-faces
  302. :group 'org-todo
  303. :type '(repeat
  304. (cons
  305. (string :tag "keyword")
  306. (sexp :tag "face"))))
  307. (defcustom org-priority-faces nil
  308. "Faces for specific Priorities.
  309. This is a list of cons cells, with priority character in the car
  310. and faces in the cdr. The face can be a symbol, or a property
  311. list of attributes, like (:foreground \"blue\" :weight bold :underline t)."
  312. :group 'org-faces
  313. :group 'org-todo
  314. :type '(repeat
  315. (cons
  316. (character :tag "Priority")
  317. (sexp :tag "face"))))
  318. (defvar org-tags-special-faces-re nil)
  319. (defun org-set-tag-faces (var value)
  320. (set var value)
  321. (if (not value)
  322. (setq org-tags-special-faces-re nil)
  323. (setq org-tags-special-faces-re
  324. (concat ":\\(" (mapconcat 'car value "\\|") "\\):"))))
  325. (defface org-checkbox
  326. (org-compatible-face 'bold
  327. '((t (:bold t))))
  328. "Face for checkboxes"
  329. :group 'org-faces)
  330. (org-copy-face 'org-todo 'org-checkbox-statistics-todo
  331. "Face used for unfinished checkbox statistics.")
  332. (org-copy-face 'org-done 'org-checkbox-statistics-done
  333. "Face used for finished checkbox statistics.")
  334. (defcustom org-tag-faces nil
  335. "Faces for specific tags.
  336. This is a list of cons cells, with tags in the car and faces in the cdr.
  337. The face can be a symbol, or a property list of attributes,
  338. like (:foreground \"blue\" :weight bold :underline t).
  339. If you set this variable through customize, it will immediately be effective
  340. in new buffers and in modified lines.
  341. If you set it with Lisp, a restart of Emacs is required to activate the
  342. changes."
  343. :group 'org-faces
  344. :group 'org-tags
  345. :set 'org-set-tag-faces
  346. :type '(repeat
  347. (cons
  348. (string :tag "Tag")
  349. (sexp :tag "Face"))))
  350. (defface org-table ;; originally copied from font-lock-function-name-face
  351. (org-compatible-face nil
  352. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  353. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  354. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  355. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  356. (((class color) (min-colors 8) (background light)) (:foreground "blue"))
  357. (((class color) (min-colors 8) (background dark)))))
  358. "Face used for tables."
  359. :group 'org-faces)
  360. (defface org-formula
  361. (org-compatible-face nil
  362. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  363. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  364. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  365. (((class color) (min-colors 8) (background dark)) (:foreground "red"))
  366. (t (:bold t :italic t))))
  367. "Face for formulas."
  368. :group 'org-faces)
  369. (defface org-code
  370. (org-compatible-face 'shadow
  371. '((((class color grayscale) (min-colors 88) (background light))
  372. (:foreground "grey50"))
  373. (((class color grayscale) (min-colors 88) (background dark))
  374. (:foreground "grey70"))
  375. (((class color) (min-colors 8) (background light))
  376. (:foreground "green"))
  377. (((class color) (min-colors 8) (background dark))
  378. (:foreground "yellow"))))
  379. "Face for fixed-with text like code snippets."
  380. :group 'org-faces
  381. :version "22.1")
  382. (defface org-meta-line
  383. (org-compatible-face 'font-lock-comment-face nil)
  384. "Face for meta lines startin with \"#+\"."
  385. :group 'org-faces
  386. :version "22.1")
  387. (defface org-block
  388. (org-compatible-face 'shadow
  389. '((((class color grayscale) (min-colors 88) (background light))
  390. (:foreground "grey50"))
  391. (((class color grayscale) (min-colors 88) (background dark))
  392. (:foreground "grey70"))
  393. (((class color) (min-colors 8) (background light))
  394. (:foreground "green"))
  395. (((class color) (min-colors 8) (background dark))
  396. (:foreground "yellow"))))
  397. "Face text in #+begin ... #+end blocks."
  398. :group 'org-faces
  399. :version "22.1")
  400. (defface org-verbatim
  401. (org-compatible-face 'shadow
  402. '((((class color grayscale) (min-colors 88) (background light))
  403. (:foreground "grey50" :underline t))
  404. (((class color grayscale) (min-colors 88) (background dark))
  405. (:foreground "grey70" :underline t))
  406. (((class color) (min-colors 8) (background light))
  407. (:foreground "green" :underline t))
  408. (((class color) (min-colors 8) (background dark))
  409. (:foreground "yellow" :underline t))))
  410. "Face for fixed-with text like code snippets."
  411. :group 'org-faces
  412. :version "22.1")
  413. (defface org-clock-overlay ;; copied from secondary-selection
  414. (org-compatible-face nil
  415. '((((class color) (min-colors 88) (background light))
  416. (:background "yellow1"))
  417. (((class color) (min-colors 88) (background dark))
  418. (:background "SkyBlue4"))
  419. (((class color) (min-colors 16) (background light))
  420. (:background "yellow"))
  421. (((class color) (min-colors 16) (background dark))
  422. (:background "SkyBlue4"))
  423. (((class color) (min-colors 8))
  424. (:background "cyan" :foreground "black"))
  425. (t (:inverse-video t))))
  426. "Basic face for displaying the secondary selection."
  427. :group 'org-faces)
  428. (defface org-agenda-structure ;; originally copied from font-lock-function-name-face
  429. (org-compatible-face nil
  430. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  431. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  432. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  433. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  434. (((class color) (min-colors 8)) (:foreground "blue" :bold t))
  435. (t (:bold t))))
  436. "Face used in agenda for captions and dates."
  437. :group 'org-faces)
  438. (org-copy-face 'org-agenda-structure 'org-agenda-date
  439. "Face used in agenda for normal days.")
  440. (org-copy-face 'org-agenda-date 'org-agenda-date-today
  441. "Face used in agenda for today."
  442. :weight 'bold :italic 't)
  443. (org-copy-face 'secondary-selection 'org-agenda-clocking
  444. "Face marking the current clock item in the agenda.")
  445. (org-copy-face 'org-agenda-date 'org-agenda-date-weekend
  446. "Face used in agenda for weekend days.
  447. See the variable `org-agenda-weekend-days' for a definition of which days
  448. belong to the weekend."
  449. :weight 'bold)
  450. (defface org-scheduled
  451. (org-compatible-face nil
  452. '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
  453. (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
  454. (((class color) (min-colors 8)) (:foreground "green"))
  455. (t (:bold t :italic t))))
  456. "Face for items scheduled for a certain day."
  457. :group 'org-faces)
  458. (defface org-scheduled-today
  459. (org-compatible-face nil
  460. '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
  461. (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
  462. (((class color) (min-colors 8)) (:foreground "green"))
  463. (t (:bold t :italic t))))
  464. "Face for items scheduled for a certain day."
  465. :group 'org-faces)
  466. (defface org-agenda-dimmed-todo-face
  467. '((((background light)) (:foreground "grey50"))
  468. (((background dark)) (:foreground "grey50")))
  469. "Face used to dimm blocked tasks in the agenda."
  470. :group 'org-faces)
  471. (defface org-scheduled-previously
  472. (org-compatible-face nil
  473. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  474. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  475. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  476. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  477. (t (:bold t))))
  478. "Face for items scheduled previously, and not yet done."
  479. :group 'org-faces)
  480. (defface org-upcoming-deadline
  481. (org-compatible-face nil
  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. (defcustom org-agenda-deadline-faces
  490. '((1.0 . org-warning)
  491. (0.5 . org-upcoming-deadline)
  492. (0.0 . default))
  493. "Faces for showing deadlines in the agenda.
  494. This is a list of cons cells. The cdr of each cell is a face to be used,
  495. and it can also just be like '(:foreground \"yellow\").
  496. Each car is a fraction of the head-warning time that must have passed for
  497. this the face in the cdr to be used for display. The numbers must be
  498. given in descending order. The head-warning time is normally taken
  499. from `org-deadline-warning-days', but can also be specified in the deadline
  500. timestamp itself, like this:
  501. DEADLINE: <2007-08-13 Mon -8d>
  502. You may use d for days, w for weeks, m for months and y for years. Months
  503. and years will only be treated in an approximate fashion (30.4 days for a
  504. month and 365.24 days for a year)."
  505. :group 'org-faces
  506. :group 'org-agenda-daily/weekly
  507. :type '(repeat
  508. (cons
  509. (number :tag "Fraction of head-warning time passed")
  510. (sexp :tag "Face"))))
  511. (defface org-agenda-restriction-lock
  512. (org-compatible-face nil
  513. '((((class color) (min-colors 88) (background light)) (:background "yellow1"))
  514. (((class color) (min-colors 88) (background dark)) (:background "skyblue4"))
  515. (((class color) (min-colors 16) (background light)) (:background "yellow1"))
  516. (((class color) (min-colors 16) (background dark)) (:background "skyblue4"))
  517. (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
  518. (t (:inverse-video t))))
  519. "Face for showing the agenda restriction lock."
  520. :group 'org-faces)
  521. (defface org-time-grid ;; originally copied from font-lock-variable-name-face
  522. (org-compatible-face nil
  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. (defconst org-level-faces
  529. '(org-level-1 org-level-2 org-level-3 org-level-4
  530. org-level-5 org-level-6 org-level-7 org-level-8
  531. ))
  532. (defcustom org-n-level-faces (length org-level-faces)
  533. "The number of different faces to be used for headlines.
  534. Org-mode defines 8 different headline faces, so this can be at most 8.
  535. If it is less than 8, the level-1 face gets re-used for level N+1 etc."
  536. :type 'integer
  537. :group 'org-faces)
  538. (defface org-latex-and-export-specials
  539. (let ((font (cond ((assq :inherit custom-face-attributes)
  540. '(:inherit underline))
  541. (t '(:underline t)))))
  542. `((((class grayscale) (background light))
  543. (:foreground "DimGray" ,@font))
  544. (((class grayscale) (background dark))
  545. (:foreground "LightGray" ,@font))
  546. (((class color) (background light))
  547. (:foreground "SaddleBrown"))
  548. (((class color) (background dark))
  549. (:foreground "burlywood"))
  550. (t (,@font))))
  551. "Face used to highlight math latex and other special exporter stuff."
  552. :group 'org-faces)
  553. (org-copy-face 'modeline 'org-mode-line-clock
  554. "Face used for clock display in mode line.")
  555. (provide 'org-faces)
  556. ;; arch-tag: 9dab5f91-c4b9-4d6f-bac3-1f6211ad0a04
  557. ;;; org-faces.el ends here