Fixed colour scaling.
authorTim Vaughan <tgvaughan@gmail.com>
Tue, 21 May 2019 09:30:56 +0000 (11:30 +0200)
committerTim Vaughan <tgvaughan@gmail.com>
Tue, 21 May 2019 09:30:56 +0000 (11:30 +0200)
sixel.el

index 8f00687..053739d 100644 (file)
--- a/sixel.el
+++ b/sixel.el
@@ -152,9 +152,9 @@ representation of SIXEL-IMAGE."
                  (elt colour 0) " "
                  "c #"
                  (format "%02x%02x%02x"
-                         (elt colour 1)
-                         (elt colour 2)
-                         (elt colour 3))
+                         (/ (* 255 (elt colour 1)) 100)
+                         (/ (* 255 (elt colour 2)) 100)
+                         (/ (* 255 (elt colour 3)) 100))
                  "\""))
               colour-map)
       ",\n")