Questions tagged [colors]

for font colors, menu colors, screen colors, and other presentation elements of Emacs interface. For questions about colors related to exports, printing, and external programs, include additional tags. Also add tags for running Emacs on handheld or newer portable devices.

Filter by
Sorted by
Tagged with
22 votes
4 answers
6k views

Are there color pickers for Emacs?

I use the excellent rainbow-mode to highlight colors in CSS files. However, this assumes I know what color I want. Are there any color pickers that I can use for CSS editing inside Emacs? Ideally, I'...
21 votes
5 answers
4k views

Emacs Blue color too dark

Emacs blue (on dark background) is too dark. classA is readable with difficulty in the example below: How to fix the dark blue colour?
  • 715
16 votes
1 answer
2k views

Getting more than 8 colors in a terminal emulator inside Emacs

My understanding is that ansi-term only supports 8 colors (a good discussion of this in reddit here). Meanwhile, an increasing number of terminal emulators (e.g. tmux or iTerm2 in OS X) support True ...
14 votes
3 answers
6k views

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

I am using a distraction-free mode that uses giant fringes to center the buffer called bzg-big-fringe-mode. Problem is, these fringes often have a different color than the background which give an ...
12 votes
5 answers
573 views

Ways to unobtrusively vary text rendering?

I'm writing an emacs extension for use with speech recognition, and I'm looking for help with a particular feature. Some words the speech recognizer (Dragon) recognizes consistently poorly -- it doesn'...
11 votes
2 answers
3k views

How to change the mouse pointer colour?

I am using the ample theme and I quite like it, but I can't see the mouser pointer when moving over emacs and emacs is activated; as the emacs background and the mouse pointer are black, I would like ...
  • 897
11 votes
1 answer
1k views

Color declared variables

I'm looking for a simple way to make emacs remember of declared variable in a single function in C/C++. By "simple", I mean without any external package, just with some elisp lines in configuration ...
  • 173
10 votes
1 answer
3k views

How to define a good highlight face

I would like to use global-hl-line-mode, but some of my themes lack a good highlight face. Is there a general way to define one (that's not inverse-color)? I would like to maintain syntax highlighting,...
  • 103
10 votes
1 answer
2k views

Colored git output in eshell

I'm using emacs inside a mintty (configured to say it's xterm-256color) terminal on cygwin. list-colors-display works fine. and colors are displayed in dired listings etc. Now I set the color for git ...
user avatar
9 votes
2 answers
2k views

#000000 and true black in terminal Emacs colors

I just ran into a weird issue while tweaking my colour theme for terminal Emacs. The background wasn't appearing as black as expected, but grey, even though the background was set to #000000. So I ...
  • 21.1k
9 votes
1 answer
4k views

How to change helm's highlight color

I'm using Monokai theme. When I start helm, the current selected line are highlighted in gray. It's not easy to spot,especially with the title information in blue. How can I change this gray ...
  • 4,303
9 votes
1 answer
903 views

Coloring mu4e headers based on title content

I'd like to color the messages in my *mu4e-headers* view, depending on which mailing list they come from. I'm rather new to emacs face alterations, and I didn't see anything that looked relevant for ...
8 votes
4 answers
2k views

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

There's some weird stuff I encounter when running Emacs under KDE. Here's how it looks when I run it normally, via the emacs command: If I run it as a daemon, here's what I see: And if I run ...
7 votes
1 answer
1k views

Change the background color of specific block?

I would like to start a different background color beginning from a function to the end. Like this: I'm aware you can define background colors from some faces like function and function names like ...
  • 3,805
7 votes
1 answer
347 views

Theme background with opacity? Or theme callback?

Two related questions Is it possible to use opacity while theming in emacs? I mean defining theme which - for example - would add 25% of blue to the background color of elements it is applied to. Or ...
  • 1,017
6 votes
1 answer
1k views

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

I want to highlight the current symbol under the cursor as well as the current line, but with different background colors. Combining highlight-symbol-mode and hl-line-mode only highlights the entire ...
6 votes
1 answer
588 views

how to change org-ellipsis foreground color?

Currently my org-ellipsis is " [+]" (setq org-ellipsis " [+]") I want it to be slightly grey so that it will be less prominent but I don't want to change the foreground color of my headings. I ...
  • 169
6 votes
2 answers
2k views

What is the correct way to unset :foreground color?

For better experience color-identifiers-mode recommends turning off colors for everything. The example in README does it by setting :foreground of faces to nil, which kinda works. However doing it ...
  • 503
5 votes
2 answers
783 views

Color-code a new generic character combination

I'm new to Emacs and Org-mode, this is a very basic question. Unfortunately the keywords are too common for me to find the answer. I would like to create a custom pattern to colour my writing input. ...
  • 243
5 votes
3 answers
2k views

How to use zenburn with a darker background?

I have Emacs 24.5.1, installed zenburn-theme off of melpa-stable and loaded the theme in my .emacs with (load-theme 'zenburn). I like all the colours except the background. It's a bit too bright. How ...
  • 183
5 votes
3 answers
999 views

Change fill-column-indicator rule color immediately

How can I change the color of the fill-column-indicator and have the changes visible immediately? (defun my:change-fci-color (color) (setq fci-rule-color color) (fci-redraw-frame)) The previous ...
  • 1,302
5 votes
2 answers
432 views

Error on list-colors-display

When running this function: M-x list-colors-display I always get the following error: Wrong number of arguments: #<subr max>, 0 If I try to use edebug in the function I get: edebug-signal: ...
  • 729
5 votes
1 answer
6k views

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

I'd like to try and get to a similar setup that I have with N/Vim in OSX, whereby Truecolor support is enabled in iTerm2 (which supports 24bit colors) but disabled in the native Terminal app (which ...
5 votes
1 answer
198 views

Define colors for single use in minibuffer

I couldn't find anything on this, so I'm asking it here. I can display a message in minibuffer with (message "foo bar") I would like to give only the message "foo bar" a red color in the minibuffer....
  • 3,805
5 votes
1 answer
336 views

Can you describe a face color in terms of an inherited face color?

Specifically, I want tags in org mode to be a variant of the color of the corresponding heading (e.g. less saturated or lighter). Each org mode heading level is a different color, so I can't just ...
  • 1,533
5 votes
1 answer
767 views

How to detect the term color support inside of a emacsclient session?

I run a emacs daemon on boot as a OpenRC service without info about terminals. When I plug a different terminal on emacsclient so, I don't have env variables instead that was generated inside of emacs ...
5 votes
1 answer
3k views

Getting the full list of colors available in Emacs

When I run list-colors-display I get the following: which I think is a very small subset of colors that my Emacs supports, isn't it? For example, I know Emacs supports other colors (gray20, blue15, ...
5 votes
1 answer
126 views

Unable to load color "#FFFFFF" (mouse-face)

Using Emacs 27.1 (mac port, BigSur), I get a strange behavior when I set the mouse face color using an hexadecimal description. Running emacs -Q -l show-bug.el, with show-bug.el being: (font-lock-mode ...
4 votes
1 answer
1k views

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

I have run M-x ansi-color-for-comint-mode-on. Also, when I use /bin/ls --color=always (or /bin/ls --color=auto) in a regular terminal, I do see colors in the output. It's only within Emacs' shell-...
  • 3,063
4 votes
2 answers
1k views

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

I'm totally new to the wonderful world of Emacs. I started to use it some weeks ago and i'm find myself to use it more and more... I would like to use it not only as a code editor, but also as a word ...
  • 123
4 votes
3 answers
5k views

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

I'm using Emacs in a terminal and am finding that when the TERM environment variable is changed between screen-256color and xterm-256color, the default colors within Emacs are set differently. Just ...
  • 211
4 votes
2 answers
244 views

Shifting Emacs Theme from one Computer to Another

I am a little new to emacs and have managed to get the color theme to my liking. However, I want to be able to use the same theme on a different machine and have been struggling to get it to work. I ...
  • 41
4 votes
4 answers
2k views

Background color of LaTeX fragments in Org mode

How can I control the background color of my LaTex fragments in Org-mode? I am using the badwolf-theme package, and this is what I get: I would like the background color of my formulas to match the ...
4 votes
1 answer
2k views

Change Background Color of Code Block for org-mode LaTeX export

I'm inserting code fragments in an org-mode document like this: #+CAPTION: My Caption #+NAME: fig:figure_name #+BEGIN_SRC a_language My code ... #+END_SRC In PDF LaTeX export, the code blocks are ...
  • 197
4 votes
3 answers
581 views

How to override background to black after load-theme?

I am using the monokai theme from https://github.com/oneKelvinSmith/monokai-emacs, and I would like to override the background to be black. Following the override instructions, I tried: (setq monokai-...
  • 165
4 votes
1 answer
385 views

Color when visualizing latex table in orgmode

I am using Emacs + orgmode to write text and latex equations. The preview within orgmode (with C-c C-x C-l) works well for latex equations. However, I noticed that if I display a latex table within ...
4 votes
0 answers
574 views

How to display and format leading spaces (spaces at the beginning of a line) with whitespace-mode? [closed]

I want to see all spaces at the beginning of a line as dots. Also tabs and line breaks. So I've set my init.el file as the following: (setq-default indent-tabs-mode nil) (setq whitespace-style '(...
  • 151
4 votes
0 answers
162 views

Use colors with artist-mode

Is there a good robust method to draw with colors in artist-mode or a similar mode? By this I mean setting the foreground and background faces to colors such as red, green, blue, etc. for individual "...
  • 7,089
3 votes
1 answer
2k views

Python mode - custom syntax highlighting

I am an Emacs newbie and trying to work out how to implement custom colors. Currently I have a conditional statement and a while statement which both use the same face (font-lock-keyword-face). Is ...
3 votes
1 answer
3k views

How do you set colors for term?

I want to run tmux in emacs. I checked that it works in term, but default colors are awfully hard to read: How can they be changed to a sensible setting from .emacs file?
3 votes
2 answers
2k views

How to change the background/foreground color of some characters/words?

I know by M-x set-background-color or M-x set-foreground-color one can change the background/foreground of the the entire buffer. Of course this color change only persists in the current session. In ...
  • 7,544
3 votes
1 answer
786 views

Show colors in mode-line for minor modes

Can't get colors to show up in the mode-line. (eval-after-load "projectile" '(setq projectile-mode-line '(:eval (concat " Pj[" (propertize (projectile-project-...
  • 335
3 votes
2 answers
621 views

How to make tooltip background transparent?

I want to make the tooltip background somewhat transparent, say, change it alpha value to 0.5. I find these code in tooltip.el.gz (defface tooltip '((((class color)) :background "lightyellow" ...
  • 755
3 votes
1 answer
1k views

How can I specify the background color for matching search results?

When I incrementally search for a phrase with C-S, emacs usually highlights all matching results visible in the buffer by giving them a different background color. However, my current theme apparently ...
  • 567
3 votes
1 answer
1k views

how to color column in Dired?

How can I manage with Emacs dired-mode colors? For example, if I want to make column with file's last modified time and date to be red-colored.
  • 565
3 votes
1 answer
739 views

how to define color for part of a comment?

How to make colored some part of comment? Let comment be ;; This is James Bond diary. And I want to make "James Bond" in green. There will be only a few such strings and no places where it will be ...
  • 565
3 votes
3 answers
1k views

How do I duplicate the 'effective' theme colors resulting from using terminal Emacs with a transparent background?

I'm running GNU Emacs 24.5.4 on Mac OS X 10.10.5 in Terminal.app. In this (stock) setup, Emacs has a transparent background. With a transparent background, the colors that Emacs uses to display text ...
  • 203
3 votes
1 answer
278 views

A different color for each client

Today I started using desktop-mode. It's nice to be able to save a desktop using the desktop-save command, and load one using the desktop-change-dir command. Sometimes I do M-x cd to change the ...
3 votes
1 answer
3k views

Changing the background of line number column (linum) to the same color of line highlighting background color

Is there a way to set the background color of the line numbering to the same color of the line highlighting background color? So far I have to put the line numbering background color manually and of ...
  • 233
3 votes
0 answers
426 views

Avoiding screen flickering when one theme is disabled and another enabled (inhibit redraw???)

Is it possible to temporarily disable buffer (and frame) redraws? I particuarly mean situation, when I disable some theme and enable another one, and would like to avoid a moment when emacs flashes ...
  • 1,017