GNU bug report logs -
#15977
24.3.50; enhancement request: `sample' for Customize colors should show fg & bg
Previous Next
To reply to this bug, email your comments to 15977 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15977
; Package
emacs
.
(Mon, 25 Nov 2013 23:10:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 25 Nov 2013 23:10:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Please change `sample' for a color value in Customize so that it shows
the color both as a foreground and as a background. E.g., show `sam' as
foreground and `ple' as background.
A color can be used for either. This would give a less misleading idea
of the effect of the option value.
For example, consider a color value that is used only as a background.
It makes little sense to show its sample as only a foreground.
In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
of 2013-11-20 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15977
; Package
emacs
.
(Thu, 15 Aug 2019 02:36:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 15977 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> Please change `sample' for a color value in Customize so that it shows
> the color both as a foreground and as a background. E.g., show `sam' as
> foreground and `ple' as background.
>
> A color can be used for either. This would give a less misleading idea
> of the effect of the option value.
>
> For example, consider a color value that is used only as a background.
> It makes little sense to show its sample as only a foreground.
I'm not quite sure what you're referring to here -- do you have a recipe
for how to show Customize colours?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15977
; Package
emacs
.
(Thu, 15 Aug 2019 04:34:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 15977 <at> debbugs.gnu.org (full text, mbox):
> I'm not quite sure what you're referring to here -- do you have a
> recipe for how to show Customize colours?
emacs -Q
(defcustom foo "Red"
"Some foo"
:type 'color
:group 'convenience)
M-x customize-option foo
You see this:
Hide Foo: Red Choose (sample)
State : STANDARD.
Some foo
Groups: Convenience
This uses the `color' widget, defined in `wid-edit.el' as follows:
(define-widget 'color 'editable-field
"Choose a color name (with sample)."
:format "%{%t%}: %v (%{sample%})\n"
:value-create 'widget-color-value-create
:size 10
:tag "Color"
:value "black"
:completions (or facemenu-color-alist (defined-colors))
:sample-face-get 'widget-color-sample-face-get
:notify 'widget-color-notify
:action 'widget-color-action)
In Customize The text "sample" (in parentheses) shows you
what the color looks like when used as a foreground (face
attribute). It does not show you what the color looks as
a background (face attribute).
This enhancement request asks that the color be shown as
both foreground and background. For example, instead of
a single "sample" that shows only foreground appearance,
show both "foreground" and "background" text, with the
color used as foreground and background, respectively.
Or, as the bug report suggested, show just the text
"sample", but show half of it as foreground and half of
it as background.
That's all.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15977
; Package
emacs
.
(Thu, 15 Aug 2019 08:15:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 15977 <at> debbugs.gnu.org (full text, mbox):
> Or, as the bug report suggested, show just the text
> "sample", but show half of it as foreground and half of
> it as background.
It might be a bit non-trivial to pick a suitable foreground color for
"sample" when showing the background but it sounds like a nice idea.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15977
; Package
emacs
.
(Thu, 15 Aug 2019 13:57:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 15977 <at> debbugs.gnu.org (full text, mbox):
> > Or, as the bug report suggested, show just the text
> > "sample", but show half of it as foreground and half of
> > it as background.
>
> It might be a bit non-trivial to pick a suitable foreground color for
> "sample" when showing the background but it sounds like a nice idea.
Even with no attempt to do anything special
(i.e., just using the frame background as the
foreground color) it would be an improvement.
And even when the text on the sample wouldn't
be legible/visible (e.g. background swatch
same as or similar to white default background)
it would be useful.
It's a _color_ sample - a simple (background)
color swatch would be OK in all circumstances.
It's just that if we can show its appearance
for both foreground and background then that's
a plus.
FWIW, in my library palette.el I have code
that optionally changes the cursor color to
make it be the complement of the color of
its current position. Yes, that's a little
bit complicated, but it's doable.
But in the case of this enhancement request
we wouldn't really want the complement.
Probably one of the functions added to
color.el for dealing with color distance would
be usable, to get a grayscale color that
contrasts well with the background. Just one
suggestion - but see above: just not worrying
about this at all would be fine, IMO. All we
need is a color swatch (just background, no
text needed).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15977
; Package
emacs
.
(Thu, 15 Aug 2019 18:54:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 15977 <at> debbugs.gnu.org (full text, mbox):
> Or, as the bug report suggested, show just the text
> "sample", but show half of it as foreground and half of
> it as background.
Please don't show half of it as foreground/background. Better to show
two complete words each with their own foreground/background.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15977
; Package
emacs
.
(Fri, 16 Aug 2019 01:17:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 15977 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> emacs -Q
>
> (defcustom foo "Red"
> "Some foo"
> :type 'color
> :group 'convenience)
>
> M-x customize-option foo
>
> You see this:
>
> Hide Foo: Red Choose (sample)
> State : STANDARD.
> Some foo
> Groups: Convenience
Thanks for the recipe. Yes, I agree with you -- it would be better if
it also showed this colour as a background (i.e., block), which would
make it easier to determine whether to use the colour. And like Juri
says, it should probably be two samples, one as a foreground and one as
a background.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15977
; Package
emacs
.
(Wed, 26 Jan 2022 17:09:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 15977 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Thanks for the recipe. Yes, I agree with you -- it would be better if
> it also showed this colour as a background (i.e., block), which would
> make it easier to determine whether to use the colour. And like Juri
> says, it should probably be two samples, one as a foreground and one as
> a background.
I had a peek at this, and the sample faces come from here:
(define-widget 'color 'editable-field
"Choose a color name (with sample)."
:format "%{%t%}: %v (%{sample%})\n"
:value-create 'widget-color-value-create
:size (1+ (apply #'max 13 ; Longest RGB hex string.
(mapcar #'length (defined-colors))))
:tag "Color"
:value "black"
:completions (defined-colors)
:sample-face-get 'widget-color-sample-face-get
But of course, you can't have two samples in the :format, I think?
So... you'd have to create... er... a sub widget? OK, I give up.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 195 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.