unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Richard Stallman <rms@gnu.org>
Cc: casouri@gmail.com, spacibba@aol.com, emacs-devel@gnu.org,
	rekado@elephly.net, ams@gnu.org, monnier@iro.umontreal.ca,
	Dmitry Gutov <dgutov@yandex.ru>,
	ghe@sdf.org, tecosaur@gmail.com
Subject: Re: "modern" colors Re: Changes for emacs 28
Date: Mon, 14 Sep 2020 17:19:28 +0200	[thread overview]
Message-ID: <VI1PR06MB45262B5D71DCEC6DD02DFE0296230@VI1PR06MB4526.eurprd06.prod.outlook.com> (raw)
In-Reply-To: <E1kHfUS-0007xT-Af@fencepost.gnu.org> (Richard Stallman's message of "Sun, 13 Sep 2020 23:49:16 -0400")

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > > It would make Emacs look more aesthetically pleasing if packages output 
>   > > data in more color consistent and coherent  way instead of everyone 
>   > > sprinkling hardcoded RGB values for their outputs.
>
>   > Yup. It sounds like a big change, though.
>
> A small part of Emacs interprets color specifications.
> If we want to define a new kind of color specification,
> perhaps defined in terms of solarized, it whould not be hard.
>

I was thinking about it a bit, and was looking at the code of Bozhidar's
Solarized implementation. I think it is rather a trivial thing to do.

Here is what I think is a specific of Emacs: 

1. Emacs has not parametrized names for colors of standard GUI elements
(as I am aware of); so both Emacs internally, and third party packages
are using color values directly for GUI elements (variables like
forground, background etc). It results in Emacs theme having to go to
great deal of color customizations when it comes to third party packages
in particular. For illustration take at look at

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

Or themes don't do this which results in less coherent visual appereance
in the end.

2. Everything in Emacs is text (mostly); that is one of best features of
Emacs but it also means that pretty much any defvar can become a part of
gui which leads to third party packages using color values directly (or
none). It makes it hard for themes to create unified looks in Emacs for all the
diverse packages that are out there.

What is nice with original Solarized by Ethan S. is that there is
"logical framework" to think about colors: he defines base colors
(background, foreground, selection etc) and accented colors for
information that has to stand out. Bozhidar's implementation adds ligher
and darker variant to accented colors. But best part with Bozhidar's
Solarized for Emacs is that he has done a lion share of work on styling
thrid party packages:

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

to make them consistent Emacs GUI and Solarized theme.

I think his theme implementation can be simplified, paramtrized and
turned into relatively simple framework to use.

For end users who would like to create a color scheme it could be as
easy as just specifying a two arrays of colors, base and accented ones.
For package creators, elisp scripting etc, it could be relatively simply
to use paramerized names like cs-accent-1, cs-accent-darker-1 etc (cs =
color-scheme), or something similar. It shouldn't be hard to write a
manual/docs on how to use the framework either since it is pretty much
trivial.

I can try to refactor Bozhidar's code if it is interesting (I have been
playing with it for my own purpose soem time ago), if Bozhidar himself is
not reading this list and don't' have opinions on this by himself.

> The hard question is what we WANT to do.  Does someone want to
> study the details and make a concrete proposal?

Concrete proposal would be:

1. remove dark/light variant and some color blending code which is
specific for Solarized theme itself to simplify the framework. 

2. parametrize names, instead of yellow, magenta etc, use something like
cs-accent-1, cs-accent-2, cs-base-1, cs-base-2 etc

3. create setter/getter api to manipulate base/accent color arrays
4. write nice docs/tips/guide how to use it




  parent reply	other threads:[~2020-09-14 15:19 UTC|newest]

Thread overview: 149+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-13  0:36 "modern" colors Re: Changes for emacs 28 arthur miller
2020-09-13  0:51 ` Dmitry Gutov
2020-09-14  3:49   ` Richard Stallman
2020-09-14  5:14     ` TEC
2020-09-14  6:35       ` Ergus
2020-09-14  8:18         ` Göktuğ Kayaalp
2020-09-14  9:48           ` Ergus
2020-09-15  4:35       ` Richard Stallman
2020-09-14 15:19     ` Arthur Miller [this message]
2020-09-15  4:44       ` Richard Stallman
2020-09-18 13:32       ` Stefan Kangas
2020-09-18 16:06         ` Arthur Miller
2020-09-18 16:17           ` Stefan Kangas
2020-09-18 17:14             ` Arthur Miller
2020-09-18 18:43               ` Stefan Kangas
2020-09-18 19:01                 ` Arthur Miller
2020-09-15  6:38   ` Marcus Harnisch
2020-09-15 15:54     ` Arthur Miller
  -- strict thread matches above, loose matches on Subject: below --
2020-09-13  1:26 arthur miller
2020-09-13 11:19 ` Dmitry Gutov
2020-09-13 11:50   ` Arthur Miller
2020-09-13 17:29     ` Dmitry Gutov
2020-09-12 14:21 ej32u
2020-09-12 16:29 ` Drew Adams
2020-09-12 14:21 ej32u
2020-09-08 16:02 TEC
2020-09-08 17:01 ` Yuan Fu
2020-09-08 18:15   ` TEC
2020-09-09 16:05     ` Stefan Monnier
2020-09-09 16:57       ` Ergus
2020-09-10  9:09         ` "modern" colors " Alfred M. Szmidt
2020-09-10 10:20           ` Ergus
2020-09-10 10:29             ` Alfred M. Szmidt
2020-09-10 10:43               ` Eli Zaretskii
2020-09-10 11:08               ` Ergus
2020-09-10 12:32                 ` Eli Zaretskii
2020-09-10 13:17                   ` Ergus
2020-09-10 13:55                     ` Yuri Khan
2020-09-10 14:41                     ` Eli Zaretskii
2020-09-10 18:40                       ` Ergus
2020-09-10 18:50                         ` Eli Zaretskii
2020-09-10 18:58                           ` Ergus
2020-09-11 13:15                 ` Alfred M. Szmidt
2020-09-11 13:42                   ` Ergus
2020-09-11 14:13                     ` Alfred M. Szmidt
2020-09-11 14:23                     ` Stefan Monnier
2020-09-11 14:36                       ` Iñigo Serna
2020-09-11 22:14                       ` Ergus
2020-09-12  6:25                         ` Eli Zaretskii
2020-09-12  9:03                           ` Ergus
2020-09-12  9:25                             ` Eli Zaretskii
2020-09-12 10:19                               ` Ergus
2020-09-12 17:02                               ` Alfred M. Szmidt
2020-09-13  5:51                               ` Thibaut Verron
2020-09-13 14:21                                 ` Eli Zaretskii
2020-09-13 18:40                                   ` Thibaut Verron
2020-09-13  4:06                             ` Richard Stallman
2020-09-12 11:24                           ` Yuri Khan
2020-09-12 11:32                             ` Eli Zaretskii
2020-09-12 12:41                               ` Ergus
2020-09-12 16:29                                 ` Drew Adams
2020-09-12 15:36                               ` Stefan Monnier
2020-09-12 15:43                                 ` Ergus
2020-09-12 17:25                                   ` Stefan Monnier
2020-09-13  4:06                               ` Richard Stallman
2020-09-13  8:53                                 ` Göktuğ Kayaalp
2020-09-14  3:50                                   ` Richard Stallman
2020-09-14  8:08                                     ` Göktuğ Kayaalp
2020-09-14  9:46                                       ` Ergus
2020-09-14 15:14                                       ` Eli Zaretskii
2020-09-14 15:48                                       ` Drew Adams
2020-09-12 15:33                           ` Stefan Monnier
2020-09-12 10:13                         ` Iñigo Serna
2020-09-12 11:13                         ` Yuri Khan
2020-09-12 12:26                           ` Ergus
2020-09-12 16:27                           ` Drew Adams
2020-09-12 14:52                         ` Alfred M. Szmidt
2020-09-12 15:37                           ` Ergus
2020-09-12 17:02                             ` Alfred M. Szmidt
2020-09-12 17:26                               ` TEC
     [not found]                                 ` <87o8maj1kh.fsf@gmail.com>
2020-09-12 18:27                                   ` TEC
2020-09-12 19:57                                   ` Ergus
2020-09-13  5:53                                     ` TEC
2020-09-12 21:22                                   ` Alfred M. Szmidt
2020-09-13  5:49                                     ` TEC
2020-09-15  6:54                                       ` Alfred M. Szmidt
2020-09-16  2:49                                         ` TEC
2020-09-13  8:00                                   ` Göktuğ Kayaalp
2020-09-13  9:04                                     ` Gregory Heytings via Emacs development discussions.
2020-09-13 10:17                                       ` Göktuğ Kayaalp
2020-09-13 14:26                                         ` Gregory Heytings via Emacs development discussions.
2020-09-13 14:43                                           ` Göktuğ Kayaalp
2020-09-13 15:22                                             ` Stefan Kangas
2020-09-13  9:16                                     ` Colin Baxter
2020-09-12 19:46                               ` Ergus
2020-09-12 21:22                                 ` Drew Adams
2020-09-12 21:22                                 ` Alfred M. Szmidt
2020-09-13  1:14                                   ` Caio Henrique
2020-09-12 17:43                             ` Ricardo Wurmus
2020-09-12 19:53                               ` Ergus
2020-09-12 19:59                                 ` Caio Henrique
2020-09-12 20:09                                   ` Ergus
2020-09-13  8:07                                   ` Göktuğ Kayaalp
2020-09-12 20:13                                 ` Ricardo Wurmus
2020-09-13 15:09                                   ` Eli Zaretskii
2020-09-13 16:22                                     ` Ricardo Wurmus
2020-09-13 16:45                                       ` Eli Zaretskii
2020-09-13 19:49                                         ` Ricardo Wurmus
2020-09-13 20:16                                           ` Stefan Monnier
2020-09-13 21:43                                             ` Ricardo Wurmus
2020-09-13 21:45                                               ` Ergus
2020-09-13 22:18                                                 ` Stefan Monnier
2020-09-13 22:26                                                   ` Lars Ingebrigtsen
2020-09-13 21:45                                               ` Ergus
2020-09-13 22:16                                               ` Stefan Monnier
2020-09-13 22:24                                                 ` Stefan Monnier
2020-09-14 14:44                                               ` Eli Zaretskii
2020-09-14 16:45                                                 ` Ricardo Wurmus
2020-09-14 17:15                                                   ` Stefan Monnier
2020-09-14 17:29                                                   ` Eli Zaretskii
2020-09-14 19:47                                                     ` Ricardo Wurmus
2020-09-14 20:20                                                       ` Stefan Monnier
2020-09-15  7:40                                                         ` Robert Pluim
2020-09-15 14:34                                                           ` Eli Zaretskii
2020-09-15 14:50                                                             ` Robert Pluim
2020-09-15 15:51                                                               ` Yuri Khan
2020-09-15 16:01                                                                 ` Göktuğ Kayaalp
2020-09-15 16:30                                                                   ` Göktuğ Kayaalp
2020-09-15 16:05                                                                 ` Robert Pluim
2020-09-15 16:30                                                                   ` Yuri Khan
2020-09-15 16:11                                                                 ` Eli Zaretskii
2020-09-15 16:31                                                                   ` Yuri Khan
2020-09-15 14:18                                                       ` Eli Zaretskii
2020-09-14 14:39                                             ` Eli Zaretskii
2020-09-14 14:47                                               ` Robert Pluim
2020-09-14 16:07                                                 ` Eli Zaretskii
2020-09-14 16:35                                                   ` Robert Pluim
2020-09-14 14:38                                           ` Eli Zaretskii
2020-09-14 16:46                                             ` Ricardo Wurmus
2020-09-13  3:57                         ` Richard Stallman
2020-09-13  3:57                         ` Richard Stallman
2020-09-13 14:16                           ` Eli Zaretskii
2020-09-15  6:54                           ` Alfred M. Szmidt
2020-09-11 23:29                     ` Philip K.
2020-09-12 11:10                       ` Göktuğ Kayaalp
2020-09-12 11:44                       ` Dmitry Gutov
2020-09-12 12:46                         ` Ergus
2020-09-12 16:24                       ` Drew Adams
2020-09-12 13:16                   ` Arthur Miller
2020-09-12 13:55                     ` Ricardo Wurmus
2020-09-12 14:31                       ` Arthur Miller
2020-09-13  0:17                         ` Dmitry Gutov
2020-09-12 14:52                       ` Alfred M. Szmidt
2020-09-13  0:44                     ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=VI1PR06MB45262B5D71DCEC6DD02DFE0296230@VI1PR06MB4526.eurprd06.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=ams@gnu.org \
    --cc=casouri@gmail.com \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=ghe@sdf.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rekado@elephly.net \
    --cc=rms@gnu.org \
    --cc=spacibba@aol.com \
    --cc=tecosaur@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).