org-faces.el 26 KB

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