summaryrefslogtreecommitdiff
path: root/test/src/xfaces-tests.el
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Minor improvements as followup to recent RGB string-parsing changeEli Zaretskii2020-06-221-13/+13
| | | | | | | | | | | * src/xfaces.c (Finternal_color_values_from_color_spec): Rename to... (Fcolor_values_from_color_spec): ...this. Callers changed. Rename the argument to SPEC and improve the doc string. (parse_color_spec, parse_float_color_comp, parse_hex_color_comp): Improve commentary. (parse_color_spec): Rename the argument S to SPEC. * etc/NEWS: Mention 'color-values-from-color-spec'.
* Consolidate #RGB string parsersMattias Engdegård2020-06-211-0/+23
| | | | | | | | | | | | | | | | | | | | Use a single parser of color strings in the #RGB, rgb:R/G/B and rgbi:R/G/B formats, replacing four existing ones. Previously, error-checking was spotty, handling of the rgbi: format not always present, and normalization of the result was sometimes incorrect. * src/dispextern.h: New prototype. * src/xfaces.c (parse_hex_color_comp, parse_float_color_comp) (parse_color_spec, Finternal-color_values_from_color_spec): New functions. * test/src/xfaces-tests.el (xfaces-internal-color-values-from-color-spec): New test. * lisp/term/tty-colors.el (tty-color-standard-values): Use internal-color-values-from-color-spec, replacing old parser. * src/nsterm.m (ns_get_color): * src/w32fns.c (x_to_w32_color): * src/xterm.c (x_parse_color): Use parse_color_spec, replacing old parsers. (HEX_COLOR_NAME_LENGTH): Remove #define.
* ; * test/src/xfaces-tests.el (xfaces-color-distance): Fix bug idMattias Engdegård2020-06-041-1/+1
|
* Make color-distance symmetric and more accurateMattias Engdegård2020-06-031-0/+27
* src/xfaces.c (color_distance): Don't throw away the low 8 bits of the colours, and make the function symmetric (bug41544) (Fcolor_distance): Add caution about this not being a true metric. * test/src/xfaces-tests.el: New file.