mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
fix to rgb-to-hex
This commit is contained in:
parent
bc3f8dd58c
commit
ea4c4a07a5
1 changed files with 1 additions and 1 deletions
|
|
@ -153,7 +153,7 @@ package."
|
|||
(defun rgb-to-hex (rgb)
|
||||
"Return hex #rrggbb from rgb(red,green,blue)"
|
||||
(multiple-value-bind (m l)
|
||||
(ppcre:scan-to-strings "rgba?\\s?\\((\\d+),\\s?(\\d+),\\s?(\\d+),?\\s?(\\d*)\\)" rgb)
|
||||
(ppcre:scan-to-strings "rgba?\\s?\\((\\d+),\\s?(\\d+),\\s?(\\d+),?\\s?(\\d|\.*)\\)" rgb)
|
||||
(declare (ignore m))
|
||||
(format nil "#~2,'0x~2,'0x~2,'0x"
|
||||
(parse-integer (aref l 0))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue