summaryrefslogtreecommitdiff
path: root/lisp/color.el
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Add tests for color.elSimen Heggestøyl2017-09-131-3/+5
| | | | | | | | | * lisp/color.el (color-name-to-rgb, color-complement): Clarify in docstrings that RGB triplets should use four digits per component. (color-rgb-to-hsl): Break line to avoid "Hidden behind deeper element" warning. * test/lisp/color-tests.el: New file.
* Add other D series white points and some simple conversionsMark Oteiza2017-09-131-0/+27
| | | | | | | * lisp/color.el (color-d75-xyz, color-d55-xyz, color-d50-xyz): New constants. (color-xyz-to-xyy, color-xyy-to-xyz, color-lab-to-lch): (color-lch-to-lab): New functions.
* Permit non-integral color gradientsMark Oteiza2017-09-131-3/+4
| | | | * lisp/color.el (color-gradient): Float the step-number.
* Fix color component calculations in color.elEli Zaretskii2017-03-031-6/+10
| | | | | | | | | | * lisp/color.el (color-name-to-rgb): Use 16 bits per color component. (color-rgb-to-hex): Accept an optional argument DIGITS-PER-COMPONENT, defaulting to 4, and format the hexadecimal notation either for 8 or 16 bits per component. (Bug#25890) * lisp/net/shr-color.el (shr-color->hexadecimal): Call color-rgb-to-hex with the optional argument of 2, to match color processing on the Web.
* Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | Run admin/update-copyright.
* Update copyright year to 2016Paul Eggert2016-01-011-1/+1
| | | | Run admin/update-copyright.
* (/ N) now returns the reciprocal of NPaul Eggert2015-10-201-9/+9
| | | | | | | | | | | | | | | This is more compatible with Common Lisp and XEmacs (Bug#21690). See: http://lists.gnu.org/archive/html/emacs-devel/2015-10/msg01053.html * lisp/color.el (color-hue-to-rgb, color-hsl-to-rgb) (color-xyz-to-srgb, color-xyz-to-lab): * lisp/emacs-lisp/cl-extra.el (cl-float-limits): * lisp/net/shr-color.el (shr-color-hue-to-rgb) (shr-color-hsl-to-rgb-fractions): Exploit the change to simplify the code a bit. * lisp/emacs-lisp/bytecomp.el (byte-compile-quo): Don’t complain about single-argument calls to ‘/’. * src/data.c (arith_driver, float_arith_driver): Implement the change.
* ; Remove extraneous "coding: utf-8" specifications in Elisp filesDmitry Gutov2015-09-291-1/+1
|
* Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | Run admin/update-copyright.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* color.el: fix color-rgb-to-hsv computingJulien Danjou2013-01-111-2/+2
|
* Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.caPaul Eggert2013-01-021-1/+1
|\
| * Update copyright notices for 2013.Paul Eggert2013-01-011-1/+1
| |
* | Use cl-lib instead of cl, and interactive-p => called-interactively-p.Stefan Monnier2012-11-191-6/+3
|/ | | | | | | | | | | | | | | | | * lisp/erc/erc-track.el, lisp/erc/erc-networks.el, lisp/erc/erc-netsplit.el: * lisp/erc/erc-dcc.el, lisp/erc/erc-backend.el: Use cl-lib, nth, pcase, and called-interactively-p instead of cl. * lisp/erc/erc-speedbar.el, lisp/erc/erc-services.el: * lisp/erc/erc-pcomplete.el, lisp/erc/erc-notify.el, lisp/erc/erc-match.el: * lisp/erc/erc-log.el, lisp/erc/erc-join.el, lisp/erc/erc-ezbounce.el: * lisp/erc/erc-capab.el: Don't require cl since we don't use it. * lisp/erc/erc.el: Use cl-lib, nth, pcase, and called-interactively-p i.s.o cl. (erc-lurker-ignore-chars, erc-common-server-suffixes): Move before first use. * lisp/json.el: Don't require cl since we don't use it. * lisp/color.el: Don't require cl. (color-complement): `caddr' -> `nth 2'. * test/automated/ert-x-tests.el: Use cl-lib. * test/automated/ert-tests.el: Use lexical-binding and cl-lib.
* color-hsl-to-rgb fix (tiny change)Julian Scheid2012-10-051-2/+2
| | | | | | | * lisp/color.el (color-hsl-to-rgb): Fix incorrect results for small and large hue values. Fixes: debbugs:12559
* Merge from emacs-24; up to 2012-05-08T14:11:47Z!monnier@iro.umontreal.caGlenn Morris2012-10-051-83/+65
|\
| * Doc fixesGlenn Morris2012-10-051-56/+38
| | | | | | | | | | | | | | | | | | | | * lisp/color.el (color-name-to-rgb, color-rgb-to-hex) (color-hue-to-rgb, color-hsl-to-rgb, color-rgb-to-hsv) (color-rgb-to-hsl, color-srgb-to-xyz, color-saturate-hsl) (color-desaturate-hsl, color-desaturate-name, color-lighten-hsl) (color-lighten-name, color-darken-hsl, color-darken-name): Doc fixes. Fixes: debbugs:12558
* | * lisp/color.el (color-xyz-to-lab, color-lab-to-xyz, color-cie-de2000):Stefan Monnier2012-08-131-93/+98
|/ | | | | | | Prefer pcase-let over destructuring-bind. * lisp/vc/diff-mode.el (diff-remove-trailing-whitespace): Same. Also, remove whitespace as we go, rather than after accumulating the various places.
* Fix typo in color.el.Bastien Guerry2012-04-051-1/+1
| | | | Thanks to Brad Town for spotting this.
* color.el: Add saturate, lighten functions.Julien Danjou2012-01-241-17/+119
|
* color.el (color-name-to-rgb): Use the white color to find the max color ↵Julien Danjou2012-01-191-1/+4
| | | | | | component value and return correctly computed values. (color-name-to-rgb): Add missing float conversion for max value.
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* Spelling fixes.Paul Eggert2011-11-241-2/+2
|
* Spelling fixes.Paul Eggert2011-11-191-1/+1
|
* Merge some code from hexrgb.el into color.el.Chong Yidong2011-02-211-72/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/color.el (color-name-to-rgb): Rename from color-rgb->normalize. Autoload. Add optional arg FRAME, and pass it to color-values. (color-complement): Caller changed. Doc fix. (color-gradient): Rewrite for better clarity and efficiency. (color-rgb-to-hex): Rename from color-rgb->hex. (color-rgb-to-hsv): Rename from color-rgb->hsv. Force hue and saturation to zero if the value is too small. (color-rgb-to-hsl): Rename from color-rgb->hsl. (color-srgb-to-xyz): Rename from color-srgb->xyz. Doc fix. (color-xyz-to-srgb): Rename from color-xyz->srgb. Doc fix. (color-xyz-to-lab): Rename from color-xyz->lab. Doc fix. (color-lab-to-xyz): Rename from color-lab->xyz. Doc fix. (color-lab-to-srgb): Rename from color-lab->srgb. Doc fix. (color-cie-de2000): Doc fix. * lisp/facemenu.el (color-rgb-to-hsv): Deleted; use the version in lisp/color.el instead. (list-colors-sort-key, list-colors-print): Use color-normalized-values. * lisp/faces.el (color-values): Use cond for clarity. Doc fix. * lisp/gnus/shr-color.el (shr-color->hexadecimal): Use renamed function names color-rgb-to-hex, color-name-to-rgb, color-srgb-to-lab, and color-lab-to-srgb.
* mm-uu.el (mm-uu-type-alist): Add support for git format-patch diff format.Julien Danjou2011-02-011-0/+14
| | | | | mm-decode.el (mm-inline-media-tests): Do not check for diff-mode it's standard in Emacs nowadays. color.el (color-gradient): Add a color-gradient function.
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-1/+1
|
* [Gnus] Update copyright years.Katsumi Yamaoka2011-01-151-1/+1
|
* Move color.el out of the gnus/ tree.Chong Yidong2010-12-201-0/+269