all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: chad <yandros@gmail.com>
Cc: Gerry Agbobada <emacs-devel@gagbo.net>,
	Tim Cross <theophilusx@gmail.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	"Gregory Heytings via Emacs development discussions."
	<emacs-devel@gnu.org>
Subject: Re: Theme generator
Date: Thu, 17 Sep 2020 16:25:53 +0200	[thread overview]
Message-ID: <VI1PR06MB4526B8C754C1B31A7E4A2C4B963E0@VI1PR06MB4526.eurprd06.prod.outlook.com> (raw)
In-Reply-To: <CAO2hHWbzWmKfy9_0d0C9+WQeUsWHYYw_PAUEW_qHNSbPkH6A5g@mail.gmail.com> (chad's message of "Wed, 16 Sep 2020 17:25:15 -0700")

chad <yandros@gmail.com> writes:

> On Tue, Sep 15, 2020 at 6:49 PM Tim Cross <theophilusx@gmail.com> wrote:
>
>  At present, while you have all the power to customize faces, it isn't necessary easy to get things consistent. [...]
>
>  The spacemacs setup also has a pretty straight-forward way to tweak existing themes with their theming-modifications list,
>  which makes it easy to tweak specific settings for specific themes (and ensures they are applied when themes change or are
>  re-loaded etc).
>
> I recently tried to do a very similar task in a way that didn't feel hacky. I set myself a pretty short timeout, and didn't make it, so
> this idea sounds interesting. Digging in, I found this example (link to github):
> https://github.com/syl20bnr/spacemacs/tree/develop/layers/%2Bthemes/theming#example
>
> (defun dotspacemacs/user-init ()
>   (setq theming-modifications
>         '((monokai
>            ;; Font locking
>            (font-lock-comment-face :slant italic)
>            (web-mode-html-attr-name-face :inherit font-lock-variable-name-face
>                                          :foreground nil)
>            ;; Modeline
>            (powerline-active1 :box (:color "#999999"
>                                     :line-width 1
>                                     :style released-button)
>                               :background "#5a5a5a")))))
>

Here is visible what is a problem with current theme engine: 

>            (powerline-active1 :box (:color "#999999"
>                                     :line-width 1
>                                     :style released-button)
>                               :background "#5a5a5a")))))


In order to syle an element 3rd party package will specify raw rgb
values for an element. If theme-engine offered parametrized names like
say, :color color-scheme-foreground instead of #999999, then when user
sets a color for the color-scheme-foreground the element would pick it
up from the theme and there would be no need for 4th party developer,
theme modders, like base16 or Solarized devs, to look at the code, and
re-style it in their own code to bring that package into their theme.
See for example:

;;;; powerline
     `(powerline-active1 ((,class ,(if solarized-high-contrast-mode-line
                                       `(:background ,base00 :foreground ,base03)
                                     `(:background ,base03 :foreground ,base00)))))
     `(powerline-active2 ((,class ,(if solarized-high-contrast-mode-line
                                       `(:background ,base01 :foreground ,base03)
                                     `(:background ,base02 :foreground ,base00)))))
     `(powerline-inactive1 ((,class ,(if solarized-high-contrast-mode-line
                                         `(:background ,base03 :foreground ,base1)
                                       `(:background ,base02 :foreground ,base01)))))
     `(powerline-inactive2 ((,class ,(if solarized-high-contrast-mode-line
                                         `(:background ,base02 :foreground ,base1)
                                       `(:background ,base03 :foreground
     ,base01)))))

as found in Solarized:

https://github.com/bbatsov/solarized-emacs/blob/master/solarized-faces.el

Thomas "linuxteam" suggested to use faces instead of colors, which
probably is even better then using just colors, albeit it might be that
color framework is needed at lower level to customize faces. I am not
really sure, since I am not so acquainted with face-machinery and how it
really works (yet).



  reply	other threads:[~2020-09-17 14:25 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14  3:48 solarized Richard Stallman
2020-09-15  8:29 ` solarized Protesilaos Stavrou
2020-09-15  9:14   ` solarized Yuri Khan
2020-09-15 10:16     ` solarized Protesilaos Stavrou
2020-09-15 13:39       ` solarized Theodor Thornhill
2020-09-15 14:05         ` solarized Gerry Agbobada
2020-09-15 14:40           ` Theme generator (was: solarized) Stefan Monnier
2020-09-15 16:26             ` Theme generator Arthur Miller
2020-09-15 20:14               ` Stefan Monnier
2020-09-15 20:35                 ` Stefan Monnier
2020-09-15 20:44                   ` Arthur Miller
2020-09-16  1:49             ` Theme generator (was: solarized) Tim Cross
2020-09-17  0:25               ` chad
2020-09-17 14:25                 ` Arthur Miller [this message]
2020-09-16  5:03             ` Richard Stallman
2020-09-15 20:28         ` solarized Protesilaos Stavrou
2020-09-15 20:50           ` solarized Praharsh Suryadevara
2020-09-16  5:05       ` solarized Richard Stallman
2020-09-16  8:27         ` solarized Protesilaos Stavrou
2020-09-16 13:38           ` solarized Arthur Miller
2020-09-17  3:57           ` solarized Richard Stallman
2020-09-17  7:53             ` solarized Gian Uberto Lauri
2020-09-17 15:56               ` solarized Drew Adams
2020-09-18  4:08               ` solarized Richard Stallman
2020-09-18  4:08               ` solarized Richard Stallman
2020-09-18 16:44                 ` solarized Drew Adams
2020-09-17 14:11             ` solarized Arthur Miller
2020-09-17 23:39               ` solarized Tim Cross
2020-09-18  4:13                 ` solarized Richard Stallman
2020-09-18  5:49                   ` solarized Tim Cross
2020-09-18  6:43                   ` solarized Arthur Miller
2020-09-16 13:06         ` solarized Arthur Miller
2020-09-17  3:53           ` solarized Richard Stallman
2020-09-15 11:26   ` solarized Göktuğ Kayaalp
2020-09-15 12:15     ` solarized Elias Mårtenson
2020-09-15 12:56       ` solarized Göktuğ Kayaalp
2020-09-16  1:30         ` solarized Tim Cross
2020-09-16 10:21           ` solarized Göktuğ Kayaalp
2020-09-16 12:53             ` solarized Arthur Miller
2020-09-16 22:09             ` solarized Tim Cross
2020-09-17 14:29               ` solarized Arthur Miller
2020-09-18 13:32               ` solarized Stefan Kangas
2020-09-18 15:53                 ` solarized Arthur Miller
2020-09-18 16:03                 ` solarized Arthur Miller
2020-09-19  4:00                 ` solarized Richard Stallman
2020-09-20 20:18                   ` solarized Bozhidar Batsov
2020-09-15 12:05   ` WCAG AAA and Emacs themes Dmitry Gutov
2020-09-15 20:22     ` Protesilaos Stavrou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR06MB4526B8C754C1B31A7E4A2C4B963E0@VI1PR06MB4526.eurprd06.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=emacs-devel@gagbo.net \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=theophilusx@gmail.com \
    --cc=yandros@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.