org-faces.el 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  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.19b
  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 links."
  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 links."
  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 links."
  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-headline-done ;; originally copied from font-lock-string-face
  264. (org-compatible-face nil
  265. '((((class color) (min-colors 16) (background light)) (:foreground "RosyBrown"))
  266. (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon"))
  267. (((class color) (min-colors 8) (background light)) (:bold nil))))
  268. "Face used to indicate that a headline is DONE.
  269. This face is only used if `org-fontify-done-headline' is set. If applies
  270. to the part of the headline after the DONE keyword."
  271. :group 'org-faces)
  272. (defcustom org-todo-keyword-faces nil
  273. "Faces for specific TODO keywords.
  274. This is a list of cons cells, with TODO keywords in the car
  275. and faces in the cdr. The face can be a symbol, or a property
  276. list of attributes, like (:foreground \"blue\" :weight bold :underline t)."
  277. :group 'org-faces
  278. :group 'org-todo
  279. :type '(repeat
  280. (cons
  281. (string :tag "keyword")
  282. (sexp :tag "face"))))
  283. (defvar org-tags-special-faces-re nil)
  284. (defun org-set-tag-faces (var value)
  285. (set var value)
  286. (if (not value)
  287. (setq org-tags-special-faces-re nil)
  288. (setq org-tags-special-faces-re
  289. (concat ":\\(" (mapconcat 'car value "\\|") "\\):"))))
  290. (defcustom org-tag-faces nil
  291. "Faces for specific tags.
  292. This is a list of cons cells, with tags in the car and faces in the cdr.
  293. The face can be a symbol, or a property list of attributes,
  294. like (:foreground \"blue\" :weight bold :underline t).
  295. If you set this variable through customize, it will immediately be effective
  296. in new buffers and in modified lines.
  297. If you set it with Lisp, a restart of Emacs is required to activate the
  298. changes."
  299. :group 'org-faces
  300. :group 'org-tags
  301. :set 'org-set-tag-faces
  302. :type '(repeat
  303. (cons
  304. (string :tag "Tag")
  305. (sexp :tag "Face"))))
  306. (defface org-table ;; originally copied from font-lock-function-name-face
  307. (org-compatible-face nil
  308. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  309. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  310. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  311. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  312. (((class color) (min-colors 8) (background light)) (:foreground "blue"))
  313. (((class color) (min-colors 8) (background dark)))))
  314. "Face used for tables."
  315. :group 'org-faces)
  316. (defface org-formula
  317. (org-compatible-face nil
  318. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  319. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  320. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  321. (((class color) (min-colors 8) (background dark)) (:foreground "red"))
  322. (t (:bold t :italic t))))
  323. "Face for formulas."
  324. :group 'org-faces)
  325. (defface org-code
  326. (org-compatible-face nil
  327. '((((class color grayscale) (min-colors 88) (background light))
  328. (:foreground "grey50"))
  329. (((class color grayscale) (min-colors 88) (background dark))
  330. (:foreground "grey70"))
  331. (((class color) (min-colors 8) (background light))
  332. (:foreground "green"))
  333. (((class color) (min-colors 8) (background dark))
  334. (:foreground "yellow"))))
  335. "Face for fixed-with text like code snippets."
  336. :group 'org-faces
  337. :version "22.1")
  338. (defface org-verbatim
  339. (org-compatible-face nil
  340. '((((class color grayscale) (min-colors 88) (background light))
  341. (:foreground "grey50" :underline t))
  342. (((class color grayscale) (min-colors 88) (background dark))
  343. (:foreground "grey70" :underline t))
  344. (((class color) (min-colors 8) (background light))
  345. (:foreground "green" :underline t))
  346. (((class color) (min-colors 8) (background dark))
  347. (:foreground "yellow" :underline t))))
  348. "Face for fixed-with text like code snippets."
  349. :group 'org-faces
  350. :version "22.1")
  351. (defface org-clock-overlay ;; copied from secondary-selection
  352. (org-compatible-face nil
  353. '((((class color) (min-colors 88) (background light))
  354. :background "yellow1")
  355. (((class color) (min-colors 88) (background dark))
  356. :background "SkyBlue4")
  357. (((class color) (min-colors 16) (background light))
  358. :background "yellow")
  359. (((class color) (min-colors 16) (background dark))
  360. :background "SkyBlue4")
  361. (((class color) (min-colors 8))
  362. :background "cyan" :foreground "black")
  363. (t (:inverse-video t))))
  364. "Basic face for displaying the secondary selection."
  365. :group 'org-faces)
  366. (defface org-agenda-structure ;; originally copied from font-lock-function-name-face
  367. (org-compatible-face nil
  368. '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
  369. (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
  370. (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
  371. (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
  372. (((class color) (min-colors 8)) (:foreground "blue" :bold t))
  373. (t (:bold t))))
  374. "Face used in agenda for captions and dates."
  375. :group 'org-faces)
  376. (unless (facep 'org-agenda-date)
  377. (copy-face 'org-agenda-structure 'org-agenda-date)
  378. (set-face-doc-string 'org-agenda-date
  379. "Face used in agenda for normal days."))
  380. (unless (facep 'org-agenda-date-weekend)
  381. (copy-face 'org-agenda-date 'org-agenda-date-weekend)
  382. (set-face-doc-string 'org-agenda-date-weekend
  383. "Face used in agenda for weekend days.
  384. See the variable `org-agenda-weekend-days' for a definition of which days
  385. belong to the weekend.")
  386. (when (fboundp 'set-face-attribute)
  387. (set-face-attribute 'org-agenda-date-weekend nil :weight 'bold)))
  388. (defface org-scheduled
  389. (org-compatible-face nil
  390. '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
  391. (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
  392. (((class color) (min-colors 8)) (:foreground "green"))
  393. (t (:bold t :italic t))))
  394. "Face for items scheduled for a certain day."
  395. :group 'org-faces)
  396. (defface org-scheduled-today
  397. (org-compatible-face nil
  398. '((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen"))
  399. (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen"))
  400. (((class color) (min-colors 8)) (:foreground "green"))
  401. (t (:bold t :italic t))))
  402. "Face for items scheduled for a certain day."
  403. :group 'org-faces)
  404. (defface org-scheduled-previously
  405. (org-compatible-face nil
  406. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  407. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  408. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  409. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  410. (t (:bold t))))
  411. "Face for items scheduled previously, and not yet done."
  412. :group 'org-faces)
  413. (defface org-upcoming-deadline
  414. (org-compatible-face nil
  415. '((((class color) (min-colors 88) (background light)) (:foreground "Firebrick"))
  416. (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1"))
  417. (((class color) (min-colors 8) (background light)) (:foreground "red"))
  418. (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold t))
  419. (t (:bold t))))
  420. "Face for items scheduled previously, and not yet done."
  421. :group 'org-faces)
  422. (defcustom org-agenda-deadline-faces
  423. '((1.0 . org-warning)
  424. (0.5 . org-upcoming-deadline)
  425. (0.0 . default))
  426. "Faces for showing deadlines in the agenda.
  427. This is a list of cons cells. The cdr of each cell is a face to be used,
  428. and it can also just be like '(:foreground \"yellow\").
  429. Each car is a fraction of the head-warning time that must have passed for
  430. this the face in the cdr to be used for display. The numbers must be
  431. given in descending order. The head-warning time is normally taken
  432. from `org-deadline-warning-days', but can also be specified in the deadline
  433. timestamp itself, like this:
  434. DEADLINE: <2007-08-13 Mon -8d>
  435. You may use d for days, w for weeks, m for months and y for years. Months
  436. and years will only be treated in an approximate fashion (30.4 days for a
  437. month and 365.24 days for a year)."
  438. :group 'org-faces
  439. :group 'org-agenda-daily/weekly
  440. :type '(repeat
  441. (cons
  442. (number :tag "Fraction of head-warning time passed")
  443. (sexp :tag "Face"))))
  444. (defface org-agenda-restriction-lock
  445. (org-compatible-face nil
  446. '((((class color) (min-colors 88) (background light)) (:background "yellow1"))
  447. (((class color) (min-colors 88) (background dark)) (:background "skyblue4"))
  448. (((class color) (min-colors 16) (background light)) (:background "yellow1"))
  449. (((class color) (min-colors 16) (background dark)) (:background "skyblue4"))
  450. (((class color) (min-colors 8)) (:background "cyan" :foreground "black"))
  451. (t (:inverse-video t))))
  452. "Face for showing the agenda restriction lock."
  453. :group 'org-faces)
  454. (defface org-time-grid ;; originally copied from font-lock-variable-name-face
  455. (org-compatible-face nil
  456. '((((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
  457. (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
  458. (((class color) (min-colors 8)) (:foreground "yellow" :weight light))))
  459. "Face used for time grids."
  460. :group 'org-faces)
  461. (defconst org-level-faces
  462. '(org-level-1 org-level-2 org-level-3 org-level-4
  463. org-level-5 org-level-6 org-level-7 org-level-8
  464. ))
  465. (defcustom org-n-level-faces (length org-level-faces)
  466. "The number of different faces to be used for headlines.
  467. Org-mode defines 8 different headline faces, so this can be at most 8.
  468. If it is less than 8, the level-1 face gets re-used for level N+1 etc."
  469. :type 'number
  470. :group 'org-faces)
  471. (defface org-latex-and-export-specials
  472. (let ((font (cond ((assq :inherit custom-face-attributes)
  473. '(:inherit underline))
  474. (t '(:underline t)))))
  475. `((((class grayscale) (background light))
  476. (:foreground "DimGray" ,@font))
  477. (((class grayscale) (background dark))
  478. (:foreground "LightGray" ,@font))
  479. (((class color) (background light))
  480. (:foreground "SaddleBrown"))
  481. (((class color) (background dark))
  482. (:foreground "burlywood"))
  483. (t (,@font))))
  484. "Face used to highlight math latex and other special exporter stuff."
  485. :group 'org-faces)
  486. (provide 'org-faces)
  487. ;; arch-tag: 9dab5f91-c4b9-4d6f-bac3-1f6211ad0a04
  488. ;;; org-faces.el ends here