7

Emacs blue (on dark background) is too dark. classA is readable with difficulty in the example below:

enter image description here

How to fix the dark blue colour?

  • 4
    Are you using the terminal and a theme that's aware of dark/light backgrounds? In this case it could be that Emacs doesn't detect your terminal's background color correctly (as it's just guessing) and customizing frame-background-mode will fix it and other faces. – wasamasa Oct 6 '17 at 16:37
  • @wasamasa's comment is applicable to my situation. It should be made into an answer IMO. – Henry Oct 9 '17 at 18:22
11

Put the cursor on the blue word, and say C-u C-x =. Find the face entry and click on its value. Then click on customize this face and change the foreground value to e.g. Cyan1.

If you are in a console or are doing emacs -nw in a terminal, instead of clicking, put the cursor on the appropriate element and press RET.

  • How can I move the cursor in emacs -nw mode to the right pane? <kbd> RET </kbd> the same as <kbd> ENTER </kbd>? – Viesturs Oct 6 '17 at 8:49
  • 1
    C-x o will cycle through the windows. And yes, RET is the commonly used emacs name for the key that is usually labeled Enter. – NickD Oct 6 '17 at 8:53
  • I managed to do it. – Viesturs Oct 6 '17 at 9:03
  • Congratulations! – NickD Oct 6 '17 at 9:10
  • If the problem is to change one face (or a few), then my answer stands. But if the problem is as @wasamasa describes in the comment to the question and the answer below, then that is the better answer: customize frame-background-mode. – NickD Oct 13 '17 at 17:53
6

Faces in Emacs can have different values, depending on display attributes such as the number of colors supported or whether they're displayed on a light/dark background. Emacs can guess the latter without any issues in graphical mode, for textual frames however the guessing isn't nearly as good. If it turns out to be wrong, you'll get dark blue on black (because it mistakenly assums a light background on which there would be enough contrast to the dark blue), like in the screenshot above.

To check whether that's the case for you, inspect the value of frame-background-mode and customize it if needed.

  • That's much better than changing it a face at a time. Thanks! – NickD Oct 13 '17 at 15:43
  • How can one inspect the frame-background-mode? – Viesturs Dec 12 '17 at 9:16
  • Same like any variable, with F1 v followed by its name. – wasamasa Dec 12 '17 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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