11

I have configured Org mode with a face attribute for priorities with these lines in my init.el:

(set-face-attribute 'org-priority nil
                    :foreground "aquamarine1"
                    :background "black"
                    :inherit font-lock-keyword-face
                    :inverse-video t
                    :box '(:line-width 2
                           :color "orange"
                           :style released-button))

But I'm wondering if there is a way to set different colors for priorities #A, #B & #C.

2 Answers 2

14

You can customize org-priority-faces to give specific attributes for each priority.


From C-h v org-priority-faces,

Documentation:
Faces for specific Priorities.
This is a list of cons cells, with priority character in the car and faces in the cdr. The face can be a symbol, a color as as a string, or a property list of attributes, like
(:foreground "blue" :weight bold :underline t).
If it is a color string, the variable org-faces-easy-properties determines if it is a foreground or a background color.

Edit:

For example, this is my current setup:

'((65 :foreground "red" :background "yellow")
  (66 :foreground "black" :background "yellow")
  (67 . "blue"))

The numbers 65, etc. correspond to the priority letters (ASCII 65 for A, etc.).

This is most easily configured using the customize-variable interface.

1
  • 1
    Any chance you could provide some example code, please?
    – Dan
    Oct 14, 2015 at 22:55
7

Here a example of customization

(setq org-priority-faces '((?A . (:foreground "red" :weight 'bold))
                           (?B . (:foreground "yellow"))
                           (?C . (:foreground "green"))))
2
  • 1
    bold should not be quoted.
    – SabreWolfy
    Apr 12, 2016 at 10:56
  • 1
    I was wondering what is the variable name to change the text itself of the priority entry, not the A, B or C. Any ideas? Thanks! Jan 23, 2019 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.