unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: scame via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 47686@debbugs.gnu.org
Subject: bug#47686: Live preview of setting face color
Date: Sat, 10 Apr 2021 04:37:43 +0000	[thread overview]
Message-ID: <T2NdGCBKa0BsSLP7kQPRM-knemVDj1001EdRsUD2glD1D8wSBSrmD6kc0ZLFaqGY_95feWiGOjthMQPr60KJ2P942kET8gzA4IiJOfFjTwE=@protonmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1382 bytes --]

The other day I changed the color of a face and usually it's an uncomfortable process, because only in the real context together with other colors it shows how well the color works, the small sample text is usually not enough. So it's choosing some some color, changing the face color, going to the real context to see if it's right and repeating until it is.

I wanted some live preview and google found a small code which does this:

https://i.imgur.com/CqpB8gM.gif

[https://reddit.com/r/emacs/comments/ci1j66/live_color_selection_for_faces/](https://old.reddit.com/r/emacs/comments/ci1j66/live_color_selection_for_faces/)

It works, but it occured to me it could be easy to add something like this to the *Colors* buffer
which I can get with M-x list-colors-display.

That buffer does nothing by itself, just show colors, so keys could be bind for it to set face color:

f - read a facename and set its foreground color on the fly as the user moves in the *Colors*buffer as seen on the gif above
b - the same for face background color
c - cancel the live preview and restore the face's colors
s - set the selected colors of face using customize

This kind of interactive color setting where you just move in the Colors buffer and in the other window you can instantly see its effect on a face is much more effective and user friendly than the current color selection for a face.

[-- Attachment #2: Type: text/html, Size: 1712 bytes --]

             reply	other threads:[~2021-04-10  4:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-10  4:37 scame via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-04-10 11:49 ` bug#47686: Live preview of setting face color Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-10 16:14   ` scame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-06  9:58 ` Lars Ingebrigtsen

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='T2NdGCBKa0BsSLP7kQPRM-knemVDj1001EdRsUD2glD1D8wSBSrmD6kc0ZLFaqGY_95feWiGOjthMQPr60KJ2P942kET8gzA4IiJOfFjTwE=@protonmail.com' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=47686@debbugs.gnu.org \
    --cc=laszlomail@protonmail.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).