emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Theme generator


From: Arthur Miller
Subject: Re: Theme generator
Date: Tue, 15 Sep 2020 18:26:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Henrik tried to do it with emacs-doom-themes
>> ( https://github.com/hlissner/emacs-doom-themes ) but apparently the theme
>> generation part is not really good and he has been trying to find time to
>> rewrite that part. But using that API to define a theme seems really easy :
>> https://github.com/hlissner/emacs-doom-themes/blob/master/themes/doom-one-theme.el
>>
>> I think this is the kind of helpers that would warrant upstream integration :
>
> Indeed, it seems that if we extended the `defface` machinery to allow
> evaluation of Elisp code, we could make this "standard".
>
>
>         Stefan

Part of  my suggestion was to turn Solarized into more general
framework. One reason beeing that it offers "conceptual framework" of
thinking about basic colors, and accented colors of which accented
colors are probably those of interest for most 3rd party package
writers. Other reason being because of author invested a great deal of
work to style existing 3rd party packages, to extent I personally have
not seen in any other theme. It makes for much more coherent experience,
then most other themes, something I would like to see with whichever
color scheme is used.

Individual colors should not be the main focus; one can use any colors
once there is a framework to easily change scemes.

I would like to see something as simple like this:



(require 'color-scheme)

(deftheme solarized-light
  "The light variant of the Solarized color theme.")

(color-scheme-create-theme 'light 'solarized-light)

(defvar solarized-base-colors nil
  "Color in use for monobase colors.")

(defvar solarized-accented-colors nil
  "Current color in use for accented colors.")


(setq solarized-base-colors ["#002b36"
                             "#073642"
                             "#586e75"
                             "#657b83"
                             "#839496"
                             "#93a1a1"
                             "#eee8d5"
                             "#fdf6e3"])

(setq solarized-accented-colors ["#b58900" ;yellow
                                 "#cb4b16" ;orange
                                 "#dc322f" ;red
                                 "#d33682" ;magenta
                                 "#6c71c4" ;violet
                                 "#268bd2" ;blue
                                 "#2aa198" ;cyan
                                 "#859900" ;green
                                 ])

(color-scheme-set-colors
     solarized-base-colors
     solarized-accented-colors)

(provide-theme 'solarized-light)

Yes, that is what theme-generators do. What I would like to see extra in
Emacs is a manual entry docs on how to use color scheme in theme
creation as well as in 3rd party pacakges that output data into gui
elements, so that themes don't have to individually look in
3rd party code and set faces afterword to make them visually consistent
with rest of Emacs world (as done in Bozhidar's Solarized or base16 and
other themes and generators).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]