org-faces.el 26 KB

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