emacs-color-theme-solarized icon indicating copy to clipboard operation
emacs-color-theme-solarized copied to clipboard

How to use color variables in other configuration

Open yangchenyun opened this issue 11 years ago • 4 comments

Saying if I want my color scheme such as org-mode, fly-checker etc. to use colors defined by the theme, how could I refer to the definition instead of hard code #002b36 there.

yangchenyun avatar May 14 '14 13:05 yangchenyun

I would love to see this ability too.

Right now I'm doing stuff like this to borrow solarized colors:

(copy-face 'fringe 'auto-dim-other-buffers-face)

But it would be nice to set something like the background of auto-dim-other-buffers-face to "base02". Then it would switch to "base2" if I load solarized light.

I'm guessing it would be a major refactor of solarized to add this feature.

dhaley avatar May 16 '14 15:05 dhaley

Rather than copy-face, I would customize auto-dim-other-buffers-face with inherit set to fringe, but that still doesn’t let you use colors directly instead of faces.

I don’t know how to add additional color names to Emacs, but if there’s a way, I would love to add it. The other option I can think of is that I could define faces like solarized-base2-base01 that could be inherited, but that would be ~300 new faces. Far from ideal.

sellout avatar Jun 05 '14 16:06 sellout

PR #133 is my solution to this - make the color values accessible as variables and run a hook when you switch themes. It's not ideal, but seems to work for me.

mattduck avatar Nov 14 '14 16:11 mattduck

PR #133 (which is now closed) has some discussion on this issue.

sellout avatar May 11 '15 16:05 sellout