Fix device-specific color resolution #210

Possibly resolves #89, #125, #209
This commit is contained in:
Henrik Lissner 2018-08-04 14:45:45 +02:00
parent abb1ac6f72
commit 1cdc201266
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -102,11 +102,12 @@
;; Color helper functions
;; Shamelessly *borrowed* from solarized
;;;###autoload
(defun doom-name-to-rgb (color &optional frame)
(defun doom-name-to-rgb (color)
"Retrieves the hexidecimal string repesented the named COLOR (e.g. \"red\")
for FRAME (defaults to the current frame)."
(cl-loop for x in (color-values color frame)
collect (/ x (float (car (color-values "#ffffff"))))))
(cl-loop with div = (float (car (tty-color-standard-values "#ffffff")))
for x in (tty-color-standard-values (downcase color))
collect (/ x div)))
;;;###autoload
(defun doom-blend (color1 color2 alpha)