unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: light, dark, and theme adjustment & generation     [was: solarized]
Date: Fri, 18 Sep 2020 09:21:00 +1000	[thread overview]
Message-ID: <87h7rw7zxf.fsf@gmail.com> (raw)
In-Reply-To: <5a3685f0-a1dd-44f9-9e15-e8f1bc35ea57@default>


Drew Adams <drew.adams@oracle.com> writes:

> I'm not advertising this as an Icicles feature.  My
> point is to suggest having tools to globally tweak
> an appearance and create a theme from that.  That
> includes starting with some theme and tweaking it.
>
> Besides adjusting hue, saturation, and value, it would
> be good to be able to adjust _contrast_.
>

I agree this would be a useful component. I have often found themes
which I find to be 80% there, but just need a little tweaking to adjust
hue, saturation or contrast, but the effort to do that by updating each
face is a pain. I would suggest that any 'theme generator' would need
such functionality. 

> Others have brought up theme generation.  I'm not sure
> what was meant by that, but what I describe here could
> be considered a kind of theme generation, as well as a
> kind of theme editing.
>
> IOW, besides customizing individual face settings in
> a theme, it can be quite useful to be able to adjust
> a set of faces used by a them _together_.
>

While everyone will have a different interpretation of what a theme
generator is, my position is that it would provide a way to work with
theme definition which reduces the need to work at the individual face
level. You will still need this ability, but it would be great to have a
way to work at a group or layer level. This would possibly require some
more specific way of defining relationships between faces. 

> The Icicles commands that do this act on all faces.
> But it could be helpful to be able to (easily, somehow)
> limit such global tweaking to a particular subset of
> faces.

Agreed.

Consistency will be important as well. A very common failure I've seen
with attempts to provide an interface to manage themes is when the
generated result is inconsistent. I recall the old way of customizing
your theme under windows. The system work OK provided you wanted a theme
with a light background. However, as soon as you wanted a theme with a
dark background, you would suddenly have situations where you ended up
with black/dark foreground faces on black/dark backgrounds. I've seen
the same problems under various GNU Linux window managers and other
applications.

The challenge for Emacs will be how to ensure faces are categorised
correctly. We can have algorithms to ensure certain levels of contrast
etc, but if you don't have some way of classifying how/where the face is
used, you cannot easily determine this. As any package can define new
faces, this will be a challenge. It becomes an even greater challenge
because packages and face definitions can be loaded at different times -
how does any theme generator or customisation framework handle the
situation where a face is not yet defined/known at the point when the
tool runs? Do we just accept the tools work on a core set of faces and
suggest that any package which defines a new face defaults to inherit
from one of the core faces or do we implement some higher level
abstraction which is used whenever a new face is loaded to define
initial settings?


-- 
Tim Cross



  reply	other threads:[~2020-09-17 23:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17 16:43 light, dark, and theme adjustment & generation [was: solarized] Drew Adams
2020-09-17 23:21 ` Tim Cross [this message]
2020-09-19 19:36   ` Add some built-in faces for inheritance Yuan Fu
2020-09-19 19:50     ` Stefan Monnier
2020-09-19 20:00       ` Yuan Fu
2020-09-19 23:51         ` chad
2020-09-20 13:21           ` Howard Melman
2020-09-20 19:18     ` Juri Linkov
2020-09-21  7:48       ` Protesilaos Stavrou
2020-09-21 19:14         ` Juri Linkov

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=87h7rw7zxf.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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).