Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (in-package :lem-user)
- (defun list-colors-display ()
- (let ((buffer (get-buffer-create "*colors*")))
- (switch-to-buffer buffer)
- (buffer-erase buffer)
- (dolist (color (reverse lem.term::*colors*))
- (let ((attribute (make-attribute (lem.term::color-name color) nil))
- (point-start (current-point)))
- (insert-string (lem.term::color-name color))
- (move-to-column (+ 20 (point-charpos point-start)) t)
- (put-property point-start (current-point)
- :attribute attribute))
- (insert-string " ")
- (let ((attribute (make-attribute (lem.term::color-name color) nil :reverse-p t))
- (point-start (current-point)))
- (insert-string (lem.term::color-name color))
- (move-to-column (+ 20 (point-charpos point-start)) t)
- (put-property point-start (current-point)
- :attribute attribute))
- (insert-string " ")
- (insert-string (format nil "#~2,'0X~2,'0X~2,'0X"
- (lem.term::color-r color)
- (lem.term::color-g color)
- (lem.term::color-b color)))
- (insert-newline 1))
- (beginning-of-buffer)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement