1

If I eg define the following in an .org file:

#+TODO: TODO(t) ACTIVE(v) NEXT(x) WAITING(w) PROCESS(p) CONSIDER(c) USE(u) GOOD(g) ISSUE(i) CURRENT(4) ONHOLD(h) LATER(l) SOMEDAY(8) | DONE(d) ABANDONED(a) OLD(o) REFERENCE(f)

Then org mode, by default, colors all TODO types above (the ones on the left of the "|" ) as pink , and org mode colors all DONE types (the ones on the right of the "|" ) as green.

I would like to change the color of ALL DONE types.

I did find out how to color specific TODO keywords, eg:

(setq org-todo-keyword-faces '(("WAITING" . "magenta") ("CANCELED" . "red") ("DONE" . "green")) )

But this is not a great solution for me since I often change the names of TODO and DONE type keywords, and have different ones for different files.

I have searched to try to find a way to set the color of ALL DONE types but have not found anything.

Since org mode has a default color for all DONE types, I am hoping I can change this default color.

Is there a way to set the color of ALL DONE types?

2
  • See the variable org-todo-keywords-1 and the variable org-done-keywords, both of which are lists of strings and the fall-back/default faces are org-todo and org-done. Org-mode would need to know which words represent done and todo, so it can colorize them. Faces can be customized with M-x customize-face as well as by being set directly in the user init file.
    – lawlist
    Dec 9, 2022 at 20:56
  • lawlist thanks very much for taking the time to respond :)
    – ironfish
    Dec 9, 2022 at 23:41

1 Answer 1

2

Questions like this can be answered using describe-char (which you can also execute with C-u C-x =) while your cursor is on the relevant character (any of the characters in the keyword will do). If you do that on different DONE keywords on a headline (i.e. do C-c C-t repeatedly on a headline in order to cycle through all the possible TODO keywords, then do C-u C-x = on some character of each of the DONE keywords in the cycle), you will see that each one of them has an org-done face.

Now do M-x describe-face RET org-done to see the properties of the face. In my case, I get PaleGreen as the foreground color. To change it you say:

(set-face-foreground 'org-done "Red")

Check that the color has changed.

To change it permanently, you have to do that but you have to make sure that the face is defined already. The org-done face is defined in the file org-faces.el (describe-face gives you that information too). So add this to your init file:

(eval-after-load 'org-faces
    (set-face-foreground 'org-done "Red"))

to change it permanently. This will execute the set-face-foreground command only after the org-faces file is loaded, so that the org-done face will have been defined and you will be able to modify it.

Also make sure that you spell the color correctly, otherwise you might get some default color. Do M-x list-color-display to see the list of available colors and how to spell them.

1
  • NickD thanks again for your once again great help :) - it works like a charm!
    – ironfish
    Dec 9, 2022 at 23:40

Your Answer

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

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