Skip to content

Commit

Permalink
Fix how doom themes handle tty colors.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyruseuros committed Sep 22, 2020
1 parent 4ecc355 commit e2a04f5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions doom-themes/ewal-doom-themes.el
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@
(require 'doom-themes)

(defun ewal-doom-themes-get-color (color &optional shade shade-percent-difference)
"Return COLOR of SHADE with SHADE-PERCENT-DIFFERENCE repeated 3 times.
This fits `def-doom-theme' and works because `ewal' automatically
deals with tty contexts."
(let ((color (ewal-get-color color shade shade-percent-difference)))
`(,color ,color ,color)))
"Return COLOR of SHADE with SHADE-PERCENT-DIFFERENCE.
Return one accurate hex color, and 2 tty approximation colors to
fit `def-doom-theme'."
(let ((color (ewal-get-color color shade shade-percent-difference))
(tty-color (let ((ewal-force-tty-colors-p t))
(ewal-get-color color shade shade-percent-difference))))
`(,color ,tty-color ,tty-color)))

;;;###autoload
(when (and (boundp 'custom-theme-load-path)
Expand Down

0 comments on commit e2a04f5

Please sign in to comment.