File tree 3 files changed +16
-3
lines changed
3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 5
5
:components ((:file " cl-ansi-text" )
6
6
(:file " define-colors" ))
7
7
:name " cl-ansi-text"
8
- :version " 1.2"
8
+ :version " 1.2.1 "
9
9
:maintainer " Paul Nathan"
10
10
:author " Paul Nathan"
11
11
:licence " LLGPL"
Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ then writes out the string that resets the decoration."
203
203
204
204
(defmethod rgb-color-code ((color string ) &optional (style :foreground ))
205
205
" Takes RGB integer ala Web integers"
206
- (rgb-color-code (cl-colors2 :hex-to -rgb color)
206
+ (rgb-color-code (cl-colors2 :parse-hex -rgb color)
207
207
style))
208
208
209
209
(defmethod rgb-color-code ((color cl-colors2 :rgb) &optional (style :foreground ))
Original file line number Diff line number Diff line change 82
82
(is (equal ' (#\Esc #\[ #\4 #\8 #\; #\2 #\; #\2 #\5 #\5 #\; #\2 #\5 #\5 #\; #\2 #\5 #\5 #\m )
83
83
(make-color-string-as-list #xFFFFFF :effect :unset :style :background )))))
84
84
85
+ (test color-rgb
86
+ ; ; RGB plain
87
+ (is (equal (coerce (cl-ansi-text :make-color-string " ff0000" ) ' list)
88
+ ' (#\Esc #\[ #\3 #\1 #\m )))
89
+ ; ; Web Style
90
+ (is (equal (coerce (cl-ansi-text :make-color-string " #ff0000" ) ' list)
91
+ ' (#\Esc #\[ #\3 #\1 #\m )))
92
+
93
+ ; ; redux, but with 3 octets not 3 16-lets
94
+ (is (equal (coerce (cl-ansi-text :make-color-string " f00" ) ' list)
95
+ ' (#\Esc #\[ #\3 #\1 #\m )))
96
+ (is (equal (coerce (cl-ansi-text :make-color-string " #f00" ) ' list)
97
+ ' (#\Esc #\[ #\3 #\1 #\m ))))
98
+
85
99
(test color-named-functions
86
100
(let ((str " Test string." ))
87
101
(is (equal (black str)
125
139
(is
126
140
(equal str
127
141
(white (cyan (magenta (blue (yellow (green (red (black str))))))))))))
128
-
You can’t perform that action at this time.
0 commit comments