Function: erc-nicks-invert
erc-nicks-invert is a byte-compiled function defined in
erc-nicks.el.gz.
Signature
(erc-nicks-invert COLOR)
Documentation
Invert COLOR based on the CAR of erc-nicks-contrast-range.
Don't bother if the inverted color has less contrast than the input.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-nicks.el.gz
(defun erc-nicks-invert (color)
"Invert COLOR based on the CAR of `erc-nicks-contrast-range'.
Don't bother if the inverted color has less contrast than the
input."
(if-let ((con-input (erc-nicks--get-contrast color))
((< con-input (car erc-nicks-contrast-range)))
(flipped (mapcar (lambda (c) (- 1.0 c)) color))
((> (erc-nicks--get-contrast flipped) con-input)))
flipped
color))