Skip to content

Instantly share code, notes, and snippets.

@jimeh
Created November 13, 2011 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimeh/1361934 to your computer and use it in GitHub Desktop.
Save jimeh/1361934 to your computer and use it in GitHub Desktop.
sRGB color patch for Emacs 24 on Mac OS X. More info: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8402
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;
}
@purcell
Copy link

purcell commented Oct 9, 2012

I was the original reporter of the color bug referenced above.

Although I'd seen patches like yours, I worked up a fresh patch which explicitly uses sRGB for all Emacs' colors, and I'd be interested in any feedback you might have: https://gist.github.com/3858136

@purcell
Copy link

purcell commented Oct 9, 2012

Oh, note also that there are suggestions that "DeviceRed" colors are essentially treated as sRGB colors in Mountain Lion...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment