unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16974: 24.3.50; [Wishlist] Feature to automatically adjust foreground/background colours when contrast below some threshold
@ 2014-03-09 15:36 N. Jackson
  2014-03-10  2:52 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: N. Jackson @ 2014-03-09 15:36 UTC (permalink / raw)
  To: 16974

Wishlist: It would be very useful to have a feature that automatically
adjusts the foreground and background colours when the contrast between
them is below some threshold value (in some reasonably meaningful units
-- perhaps a percentage), while keeping the colours as close as possible
to their unadjusted values.

Such a feature was proposed (and, IIUC, prototyped) in the discussion of
the bizarrely named :distant-foreground face attribute on the
emacs-devel list around the 7th of January (2014). There it met with the
objection that nothing should ever override any of a user's
settings. However, if the user wants their settings overridden in certain
circumcstances, then it seems unreasonable to deny them that.

Presumably there would be two variables: a Boolean `auto-adjust-contrast' and
a numeric `auto-adjust-contrast-threshold' (or names to that effect). The first
variable could be eliminated with the convention that the feature be
disabled when the threshold variable is set to zero.






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#16974: 24.3.50; [Wishlist] Feature to automatically adjust foreground/background colours when contrast below some threshold
  2014-03-09 15:36 bug#16974: 24.3.50; [Wishlist] Feature to automatically adjust foreground/background colours when contrast below some threshold N. Jackson
@ 2014-03-10  2:52 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-03-10  2:52 UTC (permalink / raw)
  To: N. Jackson; +Cc: 16974

> Such a feature was proposed (and, IIUC, prototyped) in the discussion of
> the bizarrely named :distant-foreground face attribute on the
> emacs-devel list around the 7th of January (2014). There it met with the
> objection that nothing should ever override any of a user's
> settings. However, if the user wants their settings overridden in certain
> circumcstances, then it seems unreasonable to deny them that.

Agreed.  I think the way to fix this is:
- Add some hook in the C code that "realizes" faces so that Lisp code
  can tweak the result.
- Write a new package which uses this hook to get the above result.


        Stefan





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-10  2:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-09 15:36 bug#16974: 24.3.50; [Wishlist] Feature to automatically adjust foreground/background colours when contrast below some threshold N. Jackson
2014-03-10  2:52 ` Stefan Monnier

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).