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
0 votes
0 answers
17 views

How can I color flags after `-` or `--` in sh-mode-hook

In a bash file ending with .sh, nano colors all the flags. After a single word, flags start with - or --. If it is starting with - nano is able to color the single character after it like -f. If it is ...
user avatar
  • 1,066
0 votes
1 answer
22 views

How to change the background color when running in the GNOME Terminal?

I have added (set-background-color "blue") to my ~/.emacs (just for test purposes). When I run Emacs in windowed mode this makes the background color blue (as expected), but when I run Emacs ...
user avatar
1 vote
1 answer
25 views

Emacs palette.el paste hex color value

Can someone tell me how to copy/paste the hex color value showed by palette (M-x palette) into the current buffer. When I hit Enter key it displays another frame From this I'd liked to copy then ...
user avatar
0 votes
1 answer
57 views

Printing coloured text in emacs mini-buffer and *Messages* buffer

I want to print coloured text in the minibuffer and in the Messages. Can this be done and how?
user avatar
  • 159
0 votes
1 answer
78 views

How to change the color, or remove, the vertical line next to the scroll bar?

When I try some themes like the doom-nord-light theme, I get some weird line on the side of the scroll bar (here in yellow, but sometimes it is black): How can I could remove them or change their ...
user avatar
0 votes
0 answers
27 views

How can I change color of comments if they are next to a table in org-mode?

In org-mode comments next to a table is same color as the table itself. Would it be possible to change the comments' color if they are next to a table? For | Timestamp | Money | |--------------+----...
user avatar
  • 1,066
0 votes
0 answers
20 views

How can I change code-sample's font color if its inside a quote

In markdown I can do following: code-sample inside a quote. Example: > `code_sample` output, which has white font color: How can I do similar behavior in org-mode, where keeping the code-sample's ...
user avatar
  • 1,066
0 votes
1 answer
49 views

How to define a face that blends between two existing faces colors?

When defining a new face, how to blend/interpolate between two existing faces colors? For example - mix the colors foreground of default and the background of the error face with a factor 0.0 being ...
user avatar
  • 7,179
2 votes
1 answer
102 views

company-mode popups and magit current region are dark while current theme is light

I've been successfully using lsp-mode and magit for a while with a light theme (leuven). Today I was messing with something seemingly unrelated (company-mode and auto-complete settings in my ~/.emacs ...
user avatar
1 vote
0 answers
29 views

Conditional Formatting foreground and background when highlighting selected text

This is a follow-up question to: Interchange Foreground and Background Colors when highlighting selected text. How can I do some conditional formatting? For example I do not want inverse-video if the ...
user avatar
1 vote
1 answer
37 views

Interchange Foreground and Background Colors when highlighting selected text

I use something like this to control the background color of my selected text: (region ((t (:background ,green)) (t :inverse-video t))) However some foreground colors don't go well with ...
user avatar
1 vote
1 answer
89 views

Would it be possible apply different font/background color for `<code_sample>` in org mode?

In markdownmode, or while asking questions in stackoverflow, when we do, `<code>` or ```<code>``` The background become changes into gray. Would it be possible to apply same in orgmode, ...
user avatar
  • 1,066
2 votes
1 answer
220 views

How to change visual appearance of ANSI colors for *shell* buffers running on "GUI Emacs"?

OS: Linux 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux Emacs: GNU Emacs 28.0.50, with a solarized theme from here Terminal emulator: terminator 1.91, with a solarized (dark) ...
user avatar
  • 2,909
2 votes
1 answer
52 views

How to disable `flycheck` while merging Git conflicts

I am using following solution for merge Git conflicts in Emacs, which is based on smerge. During merging smerge-mode creates <<<<<<< HEAD , ||||||||| parent lines for conflict ...
user avatar
  • 1,066
0 votes
1 answer
78 views

frame-background-mode leads `Args out of range: #<buffer doo.py>, 0, 1` error

I am using following answer to search and replace a word in the entire buffer: (defun query-replace-region-or-from-top () "If marked, query-replace for the region, else for the whole buffer (...
user avatar
  • 1,066
0 votes
0 answers
27 views

Why does ^g reset my cursor color?

I'm using Emacs 27.2 on macOS 10.13.16 from the railwaycat build. I set my cursor color to a red color using (set-cursor-color "red") As soon as I type controlg, the cursor color reverts to ...
user avatar
  • 143
0 votes
1 answer
203 views

Changing font color with Key bindings?

I've been using Emacs org-mode to primarily take lecture notes for university, and I find that it is remarkably useful and I can usually type everything up fairly quickly. Recently, I've been wanting ...
user avatar
1 vote
1 answer
332 views

How do I change the highlighted background color inside the parenthesis?

I am using pretty much the default theme color however, I do want to change the highlighted background color inside the parenthesis. Is there any specific Face Attributes setting for this specific ...
user avatar
  • 113
0 votes
2 answers
634 views

How do I change the color of the menu bar in terminal Emacs?

I am using Emacs in a terminal. This is what the menu bar looks like: The menu bar has a white foreground and a black background. I want a green background with a pink foreground instead. Is there a ...
user avatar
  • 553
2 votes
1 answer
70 views

Getting consistent colors for terminal and GUI emacs

I've noticed that color definitions on the terminal and the GUI are not consistent. For example on the GUI, there is a color DarkOrchid2 defined, however this is not there for the terminal. Instead, ...
user avatar
  • 567
1 vote
1 answer
66 views

Do not colour "word" colours in rainbow-mode

In rainbow-mode, is it possible to toggle colouring only "words" or only "hexadicimals"? I don't see a variable I could set.
user avatar
5 votes
1 answer
114 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 ...
user avatar
0 votes
0 answers
43 views

Marking up colored text in Org

I want to generate an Excel spreadsheet programmatically from an Org document. Any tips on how to markup colored text? I understand that Org does not natively support color markup, wondering if there'...
user avatar
0 votes
0 answers
18 views

Emacs python-mode language formatting does not reapply on buffer on newly typed text

When I open a .py file for the first time the formatting is perfect, colors match special words as expected in Python But when I type new text in the buffer, it inherits the color of the same ...
user avatar
0 votes
1 answer
58 views

Make mark color overlap highlight symbol at point

I use auto-highlight-symbol-mode package to auto highlight symbol on point. I found it annoying when I mark a text because the symbol highlight overlaps on my marked text, so I don't see if I marked ...
user avatar
  • 612
1 vote
1 answer
272 views

Strange Color Issues

I've been playing around with Emacs for the first time this week, and I've been having some issues with the color scheme. This post was prompted by getting some weird when using helm. I've also ...
user avatar
1 vote
1 answer
115 views

Quick temporary colour change

I'm using a dark theme to write Clojure, with rainbow parentheses etc. I like this theme and its syntax colouring, and I don't want to change it or mess it up. BUT ... I'm currently sitting outside in ...
user avatar
  • 131
0 votes
0 answers
45 views

Fontify parts of the mode-line

How do I most conveniently fontify/colorize parts of my mode-line. Specifically I want the vc branch named to have one color for master and another for other branches.
user avatar
  • 415
1 vote
2 answers
248 views

Colored string in mode line

I have: (setq mode-line-end-spaces "string") That displays string in the mode-line. How can I get string in red there?
user avatar
1 vote
0 answers
25 views

Is it possible to have different color values for a font-lock face in a string?

My font-lock-warning-face has a red color. Which works well in almost all circumstances, it is very pronounced. The problem is, my font-lock-string-face has orange color. So warnings inside strings ...
user avatar
  • 127
2 votes
1 answer
242 views

In a Python code is it possible to give a color to called functions?

As a theme I am using Dracula. For example I have this example code piece coloring: When cursor is on terminate() and I typed M-x customize-face it is linked to (default ‘all faces’). I am not sure ...
user avatar
  • 1,066
0 votes
0 answers
52 views

How to change color of the found character string on `projectile-find-file`? [duplicate]

I am using projectile-find-file to open files. The color of the found part of the string ex: (bash) in the mini-buffer is unreadable on my terminal. Is it possible to change its color? Example ...
user avatar
  • 1,066
1 vote
1 answer
72 views

Syntax coloring: Unable to color special syntax

I am writing a mode to color a few common syntax in a symbolic language called FORM. I am a new user of emacs and I took the help of this website to write down the following code. I modified the ...
user avatar
  • 11
1 vote
2 answers
1k views

Use the terminal background color for the emacs -nw

I am looking for a way to force "emacs -nw" to use the same background color that the terminal uses. (just like vim does). By default, every emacs theme has its own default background color. ...
user avatar
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 ...
user avatar
  • 197
0 votes
1 answer
165 views

How to make emacs show correct hex color on background?

The way I run emacs: TERM=xterm-256color emacs -nw <my_file> I am trying to have background on dracula-theme (https://github.com/dracula/dracula-theme). I have added following line into ....
user avatar
  • 1,066
0 votes
0 answers
201 views

Emacs font style and colorisation

I am used to Emacs under Windows 10 and trying to switch to Ubuntu. My Windows 10 Emacs font is M-x describe-font: name (opened by): -outline-Courier New-normal-normal-normal-mono-13-*-*-*-c-*-...
user avatar
1 vote
1 answer
542 views

Required color-theme file missing in Emacs 26

After upgrading my OS (Ubuntu, from 18.04 to 19.04), my favorite text editor was automatically upgraded from Emacs 25 to Emacs 26. I then encountered a familiar error message at start-up: File is ...
user avatar
3 votes
3 answers
507 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-...
user avatar
  • 155
0 votes
0 answers
33 views

How to make e2ansi-cat work with emacs 26

I'm trying to to cat the file named foo using e2ansi-cat: AdministorsMBP2:~ administrator$ e2ansi-cat --color-class=color --background-mode=light foo Cannot open load file: No such file or directory, ...
user avatar
0 votes
1 answer
128 views

How to show colours and clear when running React development server in eshell?

Here is how the usual Ubuntu terminal looks when you run the React development serving using npm start and make changes to your source: Say the server was already running and you tried to do npm ...
user avatar
  • 755
0 votes
0 answers
16 views

Change default colors in f90-mode [duplicate]

Could you let me know where the default colors in f90-mode are defined and how to change them?
user avatar
  • 1
1 vote
1 answer
48 views

Coloured active mode line only when many windows

I am reluctantly using a coloured active mode line to distinguish it from inactive mode lines, but it occurred to me that it might be possible to reserve its colouring for times when there are more ...
user avatar
  • 2,924
0 votes
1 answer
157 views

How to change color of Python "None" and Booleans for digital-ofs1 color theme

I'm trying to change the color of Python None and Boolean variables in the digital-ofs1 color scheme, but can't find which variable to change. I've Googled around to no avail and can't seem to solve ...
user avatar
1 vote
1 answer
1k views

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

How do I change the font color of the mode-line to make it more visible?
user avatar
0 votes
0 answers
53 views

Retouching syntax highlight of major mode

I am writing a minor mode to complement haskell-mode, and I am trying to color subwords in camelCased identifiers with slightly different shades of the same color. Perhaps this can be done by "...
user avatar
  • 199
2 votes
0 answers
145 views

Change color of preview expressions in Auctex

In the customize group "Preview Appearance", I click on "Preview Face" and set "Foreground" to "red". To the right, I see the word "sample" displayed in red. Then I select "Save for Future Sessions." ...
user avatar
  • 105
0 votes
1 answer
67 views

Should I be worried about the inability to undo a Custom Theme?

I am relatively new to emacs and am liking it... so much so that I'd like to customize the look and feel. I'm aware the Custom Theme is the new way and is different from Color Theme. The one thing ...
user avatar
  • 154
1 vote
1 answer
155 views

how to tell a Custom Theme vs Color Theme?

I am considering changing the look of my emacs (just default state right now). I've read that Color Theme is an older approach but has its own advantages compared to Custom Theme (newer approach). One ...
user avatar
  • 154
0 votes
2 answers
311 views

Looking for hex values of the default colorscheme

I don't know if it's the default colorscheme in every version, but the version I'm using, Emacs-26.3 downloaded from GNU ftp mirror, has this colorscheme by default. I don't know how to get the values ...
user avatar
  • 155