1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-21 05:00:47 -08:00
emacs/lisp/textmodes
Mattias Engdegård 68ae6faa7f Improved light/dark colour predicate (bug#41544)
Add a predicate, color-dark-p, for deciding whether a colour is more
readable with black or white as contrast.  It has experimentally been
shown to be more accurate and robust than the various methods
currently employed.

The new predicate compares the relative luminance of the colour to an
empirically determined cut-off value, and it seems to get it right in
almost all cases, with no value leading to outright bad results.

* lisp/faces.el (readable-foreground-color): Use color-dark-p.
(color-dark-p): New function.
* lisp/facemenu.el (list-colors-print): Use readable-foreground-color,
improving readability of list-colors-display.
* lisp/textmodes/css-mode.el (css--contrasty-color): Remove.
(css--fontify-region): Use readable-foreground-color.
2020-06-10 20:11:13 +02:00
..
artist.el
bib-mode.el
bibtex-style.el
bibtex.el * lisp/textmodes/bibtex.el: Fix bug#41285 (paren typo) 2020-05-16 09:08:27 -04:00
conf-mode.el * lisp/textmodes/conf-mode.el (conf-mode): Fix last change 2020-03-25 14:09:48 -04:00
css-mode.el Improved light/dark colour predicate (bug#41544) 2020-06-10 20:11:13 +02:00
dns-mode.el
enriched.el
fill.el * lisp/textmodes/fill.el (fill-nobreak-predicate): Fix documentation. 2020-03-14 11:25:57 +01:00
flyspell.el
ispell.el ; Fix some typos and doc issues (bug#40695) 2020-04-18 17:10:02 +02:00
less-css-mode.el
makeinfo.el
mhtml-mode.el Remove mhtml--extend-font-lock-region (Bug#41441) 2020-05-31 10:21:38 -06:00
nroff-mode.el
page-ext.el
page.el
paragraphs.el
picture.el
po.el Use lexical-binding in po.el and add tests 2020-04-25 09:12:24 +02:00
refbib.el
refer.el Fix edge case errors in filename-matching regexps 2020-04-14 12:25:16 +02:00
refill.el
reftex-auc.el
reftex-cite.el
reftex-dcr.el
reftex-global.el
reftex-index.el
reftex-parse.el
reftex-ref.el
reftex-sel.el
reftex-toc.el
reftex-vars.el
reftex.el
remember.el Declare some <package>-version variables obsolete 2020-03-21 02:49:25 +01:00
rst.el
sgml-mode.el Prefer 'strong' and 'em' to 'b' and 'i' in html-mode 2020-05-06 03:30:20 +02:00
table.el Merge from origin/emacs-27 2020-03-07 07:50:28 -08:00
tex-mode.el * lisp/textmodes/tex-mode.el: Replace double-definition hack with an advice 2020-03-27 12:54:52 -04:00
texinfmt.el
texinfo.el Update texinfo.el following changes in 'tex-start-options-string' 2020-04-03 15:12:47 +03:00
texnfo-upd.el
text-mode.el
tildify.el
two-column.el
underline.el