Last active
August 29, 2019 02:08
-
-
Save fouric/83165382d148c31df0c4779513054c57 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun foo (color baz zuul) | |
(typecase color | |
(truecolor (let ((r (aref color 0)) | |
(g (aref color 1)) | |
(b (aref color 2))) | |
(list baz 2 r g b))) | |
(ansi-color (+ zuul (ansi-color-code color))) | |
(otherwise (error "~S is not a color" color)))) | |
;; then just | |
(defun fg (color) | |
(foo 38 30)) | |
(defun bg (color) | |
(foo 48 40)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment