summaryrefslogtreecommitdiff
path: root/lisp/faces.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2016-02-29 13:31:45 +1100
committerLars Ingebrigtsen <larsi@gnus.org>2016-02-29 13:31:45 +1100
commitf195dd692bfc1911e85f92145df57a2dba460f58 (patch)
tree8bdf87613214d0afdc49bebe7b4209b88974345b /lisp/faces.el
parent9295d0a8c2078e5b85bc81b1f020cc73793767df (diff)
downloademacs-f195dd692bfc1911e85f92145df57a2dba460f58.tar.gz
* lisp/faces.el: Remove duplicated functions from previous patch.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el26
1 files changed, 0 insertions, 26 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index b5e9fdca08e..c9cc611a97a 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1818,32 +1818,6 @@ with the color they represent as background color."
"black"
"white")))
-(defun defined-colors-with-face-attributes (&optional frame)
- "Return a list of colors supported for a particular frame.
-See `defined-colors' for arguments and return value. In contrast
-to `define-colors' the elements of the returned list are color
-strings with text properties, that make the color names render
-with the color they represent as background color."
- (mapcar
- (lambda (color-name)
- (let ((foreground (readable-foreground-color color-name))
- (color (copy-sequence color-name)))
- (propertize color 'face (list :foreground foreground
- :background color))))
- (defined-colors frame)))
-
-(defun readable-foreground-color (color)
- "Return a readable foreground color for background COLOR."
- (let* ((rgb (color-values color))
- (max (apply #'max rgb))
- (black (car (color-values "black")))
- (white (car (color-values "white"))))
- ;; Select black or white depending on which one is less similar to
- ;; the brightest component.
- (if (> (abs (- max black)) (abs (- max white)))
- "black"
- "white")))
-
(declare-function xw-color-defined-p "xfns.c" (color &optional frame))
(defun color-defined-p (color &optional frame)