sellout / emacs-color-theme-solarized

Emacs highlighting using Ethan Schoonover’s Solarized color scheme
http://ethanschoonover.com/solarized
MIT License
1.15k stars 201 forks source link

How to use color variables in other configuration #113

Open yangchenyun opened 10 years ago

yangchenyun commented 10 years ago

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.

dhaley commented 10 years ago

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.

sellout commented 10 years ago

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.

mattduck commented 9 years ago

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.

sellout commented 9 years ago

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