emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#14078: closed ([PATCH] Fix 256 color mapping in rx


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#14078: closed ([PATCH] Fix 256 color mapping in rxvt.el)
Date: Tue, 17 Dec 2013 16:05:02 +0000

Your message dated Wed, 18 Dec 2013 00:04:16 +0800
with message-id <address@hidden>
and subject line Re: bug#14078: [PATCH] Fix 256 color mapping in rxvt.el
has caused the debbugs.gnu.org bug report #14078,
regarding [PATCH] Fix 256 color mapping in rxvt.el
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
14078: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14078
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] Fix 256 color mapping in rxvt.el Date: Thu, 28 Mar 2013 22:02:43 +0200
Color mapping was wrong, I use the same way xterm.el does it.
---
 lisp/term/rxvt.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el
index 0e026a8..6a62cff 100644
--- a/lisp/term/rxvt.el
+++ b/lisp/term/rxvt.el
@@ -201,7 +201,7 @@
 
 (defun rxvt-rgb-convert-to-16bit (prim)
   "Convert an 8-bit primary color value PRIM to a corresponding 16-bit value."
-  (min 65535 (round (* (/ prim 255.0) 65535.0))))
+  (logior prim (lsh prim 8)))
 
 (defun rxvt-register-default-colors ()
   "Register the default set of colors for rxvt or compatible emulator.
@@ -233,9 +233,10 @@ for the currently selected frame."
            (tty-color-define (format "color-%d" (- 256 ncolors))
                              (- 256 ncolors)
                              (mapcar 'rxvt-rgb-convert-to-16bit
-                                     (list (round (* r 42.5))
-                                           (round (* g 42.5))
-                                           (round (* b 42.5)))))
+                                      (list (if (zerop r) 0 (+ (* r 40) 55))
+                                            (if (zerop g) 0 (+ (* g 40) 55))
+                                            (if (zerop b) 0 (+ (* b 40) 55)))))
+
            (setq b (1+ b))
            (if (> b 5)
                (setq g (1+ g)
-- 
1.8.1.5




--- End Message ---
--- Begin Message --- Subject: Re: bug#14078: [PATCH] Fix 256 color mapping in rxvt.el Date: Wed, 18 Dec 2013 00:04:16 +0800 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
oblique <address@hidden> writes:

> Color mapping was wrong, I use the same way xterm.el does it.

Thanks, committed to trunk.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]