Hot answers tagged

20 votes

Are there color pickers for Emacs?

Have a look at helm-colors. It presents the colors exactly as in your screenshot and seems to be using a similar or even the same palette. To insert a color name into the current buffer, press C-c n ...
  • 2,480
18 votes
Accepted

How to define a good highlight face

This is really a matter of opinion, but I have always found that that making the hl-line have a slightly darker background than the default is best. I would like to maintain syntax highlighting, ...
18 votes

Emacs Blue color too dark

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 ...
  • 21.2k
17 votes
Accepted

Emacs Blue color too dark

Add (setq frame-background-mode 'dark) to ~/.emacs.d/init.el
  • 705
15 votes

Are there color pickers for Emacs?

Library Palette (palette.el) gives you a general WYSIWYG color editor/picker, which lets you explore and modify colors using RGB and HSV values, including incrementally. It looks like what you show in ...
  • 71k
13 votes
Accepted

How do I set the fringe colors to whatever is the background color?

The official way would be customizing the theme in question to make the fringe face look the same as the background face. A face spec along the lines of (fringe :inherit default) should do the trick. ...
  • 21.3k
13 votes
Accepted

How to change the mouse pointer colour?

Just found this, did not tried it: (set-mouse-color "red")
  • 6,111
11 votes
Accepted

#000000 and true black in terminal Emacs colors

Turns out this was a problem with gnome-terminal. I fixed it by opening the profile preferences from the gnome-terminal menu bar, selecting colours, and changing the built-in scheme to Linux console.
  • 20.7k
10 votes
Accepted

How to change helm's highlight color

The name of the face helm uses to highlight the selected item is helm-selection. You can change just the background color of any face with set-background-color: (set-background-color 'helm-selection "...
  • 12.3k
10 votes
Accepted

Color-code a new generic character combination

You can use font-lock-add-keywords to add custom highlights. In the below example, I am highlighting any string that begins with _ preceded by a white-space character or beginning of the line ...
  • 24.5k
9 votes

Emacs Blue color too dark

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 ...
  • 21.3k
8 votes

How do I set the fringe colors to whatever is the background color?

You can set the fringe color to nil, in which case you don't need to worry about any theme changes. I've got the following in my config: (set-face-attribute 'fringe nil :background nil) And the ...
  • 235
8 votes

How to use zenburn with a darker background?

You can modify zenburn's face definitions in your .emacs. I use this to avoid mucking up the background of other themes. (with-eval-after-load "zenburn-theme" (zenburn-with-color-variables (...
7 votes

Are there color pickers for Emacs?

How about: (defun my-insert-color-hex (&optional arg) "Select a color and insert its 24-bit hexadecimal RGB format. With prefix argument \\[universal-argument] insert the 48-bit value." (...
  • 44.3k
7 votes
Accepted

/bin/ls --color=always fails to produce colorized output in shell-mode

My Emacs (GNU Emacs 24.5.1) sets TERM=dumb in startup.el and my ls from GNU coreutils 8.24 checks TERM even with --color=always. dumb is not a terminal type recognized by dircolors (the utility used ...
  • 9,002
7 votes

Combine highlight-symbol-mode and hl-line-mode

highlight-symbol-mode uses text properties, not an overlay. hl-line-mode uses an overlay, not text properties. Overlays always take precedence over text properties, no matter how low the overlay ...
  • 71k
7 votes
Accepted

Error on list-colors-display

I think the error comes from list-colors-print, which seems to have a nil at the end, and that gives you the error you see. This doesn't seem to happen in earlier versions of emacs and is probably a ...
  • 11.1k
7 votes
Accepted

how to change org-ellipsis foreground color?

Assuming that the org- libraries have already been loaded ... Type: M-x customize-face RET org-ellipsis RET To see a list of all faces for the org- library, type: M-x customize-group RET org-faces ...
  • 18k
6 votes
Accepted

Define colors for single use in minibuffer

Just use a string with faces. (message (propertize "foo bar" 'face 'highlight)) Or use a different face, which has a red foreground. Or use a face property list: (message (propertize "foo bar" '...
  • 71k
6 votes
Accepted

Conditional True color (24 bit color) support for iTerm2 and Terminal.app in OSX with Fish shell

I believe that the @ symbols in your terminfo example are part of the Texinfo markup, rather than part of the terminfo code. Your terminfo entry should look like: # Use colon separators. xterm-24bit|...
6 votes
Accepted

There's a way to use emacs like MS Word, to make text permanently colored, stylized, etc...?

If you want to get a well formatted text document, you can use emacs and others packages like LaTeX, ConTeXt, org-mode, or markdown (and pandoc) to get a beautiful and well structured pdf/html/ePub ...
5 votes
Accepted

Colored git output in eshell

Eshell and shell-mode both use ansi-color.el to turn ansi color codes into faces. ansi-color.el supports the following faces: Parameter Description Face used by default 0 default ...
  • 5,236
5 votes
Accepted

Emacs cursor color is different in daemon and non-daemon modes

try to add this code in init.el and restart the daemon: (require 'frame) (defun set-cursor-hook (frame) (modify-frame-parameters frame (list (cons 'cursor-color "DeepSkyBlue")))) (add-hook 'after-...
  • 166
5 votes
Accepted

Colors illegible after upgrading OS

In general, a terminal application like emacs -nw has only very limited information about what colors are available. The shell will have an environment variable called TERM which contains the name of ...
  • 12.6k
5 votes
Accepted

Python mode - custom syntax highlighting

If you have a look into the python library (M-x find-library RET python RET) you see that the python-font-lock-keywords are constructed by the rx macro: (defvar python-font-lock-keywords ;; ...
  • 30.8k
5 votes
Accepted

How do I change the font color of mode-line?

What you call the bottom bar is the "mode line". I recommend reading the first fews sections of the manual, especially this one to know the names of the various screen elements (this is not difficult ...
  • 7,043
4 votes
Accepted

Show colors in mode-line for minor modes

You are using the wrong property. ,----[ (info "(elisp) Special Properties") ] | `face' | This property controls the appearance of the text (*note Faces::). `---- Example: (propertize "...
  • 3,286
4 votes
Accepted

Ways to unobtrusively vary text rendering?

Another possibility would be to display line numbers and say the line number before the word, or, since looking over to get the exact line number would be bothersome, you could have the algorithm ...
4 votes
Accepted

Change the background color of specific block?

You can use library Highlight to highlight a region using an overlay or text properties -- in particular, property face. To highlight the background, use a face that uses attribute background but not ...
  • 71k
4 votes

Emacs colors being set differently when TERM is 'screen-256color' and 'xterm-256color'

The problem is that I have no idea how the colors are set to begin with, and more importantly, why they are set differently. Perhaps this discussion on StackOverflow is relevant - some detailed ...

Only top scored, non community-wiki answers of a minimum length are eligible