How can I change (insert,delete,rename,…) the list of named colors?
I tried to edit /usr/share/emacs/25.3/lisp/term/tty-colors.el.gz
and byte-compile after change, but it had no effect.
Note: I do not want to have another color picker, but change the builtin picker wich shows on list-colors-display
or in Customization-context. I could live with an other color picker though, if it'd be very simmilar and also would replace the builtin color picker in every case…
Also I tried to get help on the variable
Edit: Ok, this is bec. it's a function – but defined-colors
with C-h v defined-colors RET
, but got no match - does that mean, there is just no help on this variable?C-h f defined-colors RET
also doesn't contain info on where the defined colors are stored and how they might be adjusted.
EDIT1 (after comment by jue): Tried to insert ("testcolor" 35980 65535 0)
to tty-colors.el.gz
and added "testcolor" at the end of the list x-colors
in common-win.el.gz
, byte-compiled both and restarted emacs - but still no "Testcolor" entry in *Colors*.
EDIT2 (after 2nd comment by jue): Only file named rgb.txt
on my (arch linux) system is /usr/share/emacs/25.3/etc/rgb.txt
I inserted 140 255 0 testcolor
there (+ EDIT1) - still no entry.
EDIT3 …well maybe my desire to use the builtin color picker isn't very smart – I'll rather look for a color picker, that presents colors in a similar way and isn't bound to some X11 system file. I'll update, when I find something sufficient.
Still feel free to answer this exact question (as I'd love to gather insight to emacs), or suggest a color picker, that presents just a user defined list of colored color value entries.
common-win.el
, there is a list and the functionxw-defined-colors
which is called bydefined-colors
. – jue Feb 11 '18 at 22:31/usr/share/X11/rgb.txt
.correct path might be slightly different on distributions. – jue Feb 12 '18 at 7:32rgb.txt
on my system, is a link and points to/etc/X11/rgb.txt
. Emacslist-colors-display
shows less colors than listed in this file. Maybe have another look atcomon-win.el
orfaces.el
? Did you restart your X11 server after changes of edit 1 and 2? (I'm also just guessing, though) – jue Feb 12 '18 at 15:42M-: (xw-color-values "white")
for white color. If you see your color RGB values then try to manipulate thex-colors
value. (I did not test this, nor do I know how to define colors within GTK, though). Also have a look atM-: (list-colors-display '("black" "DimGrey" "DimGray") nil nil)
. – jue Feb 12 '18 at 21:49