GNU bug report logs - #8402
24.0.50; Hex colors are not rendered correctly on OS X (Cocoa)

Previous Next

Package: emacs;

Reported by: Steve Purcell <steve <at> sanityinc.com>

Date: Fri, 1 Apr 2011 10:02:01 UTC

Severity: normal

Tags: moreinfo

Found in version 24.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 8402 <at> debbugs.gnu.org (full text, mbox):

From: Erik Andrejko <eandrejko <at> gmail.com>
To: steve <at> sanityinc.com,
 8402 <at> debbugs.gnu.org
Subject: bug#8402: Acknowledgement (24.0.50;
	Hex colors are not rendered correctly on OS X (Cocoa))
Date: Thu, 7 Apr 2011 21:36:18 -0700
I was able to fix this problem on my OS X 10.6 machine by modifying nsterm.m:

diff --git a/src/nsterm.m b/src/nsterm.m
index af1f21a..696dbdc 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1389,7 +1389,7 @@ ns_get_color (const char *name, NSColor **col)
 
   if (r >= 0.0)
     {
-      *col = [NSColor colorWithCalibratedRed: r green: g blue: b alpha: 1.0];
+      *col = [NSColor colorWithDeviceRed: r green: g blue: b alpha: 1.0];
       UNBLOCK_INPUT;
       return 0;
     }


After the change, the RGB values of the colors displayed matched the expected RGB values according to the DigitalColor Meter utility.



This bug report was last modified 3 years and 32 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.