Subject: bug#8402: 24.0.50; Hex colors are not rendered correctly on OS X (Cocoa)

From: Steve Purcell <[email-masked]>
Date: Fri, 1 Apr 2011 11:01:11 +0100

Hi,

If I set face colors using hex values, those colors are not displayed
correctly.

For example, 'M-x set-face-background RET default RET #fdf6e3 RET'
results in a frame background color which, when sampled using Apple's
"Digital Color Meter" utility, has hex value #fff8e8.

And, in fact, all colors are apparently skewed similarly, while other
Cocoa apps (e.g. iterm2) render them correctly.

To give an example from out in the field, here is a screenshot of a
color theme as rendered by Emacs: http://dropup.net/lz64u0ctpcge.png.html

and here is how those same colors would look if they were rendered
correctly:

http://ethanschoonover.com/img/solarized/solarized-screen-pandoc-dark.png

Note the significant difference in the background color, for instance.

Could it be that Emacs needs to hook into system-provided color
management routines on this platform in order for its colors to be
correctly calibrated?

-Steve

In GNU Emacs 24.0.50.1 (x86_64-apple-darwin, NS apple-appkit-1038.35)
of 2011-03-20 on black.porkrind.org
Windowing system distributor `Apple', version 10.3.1038
configured using `configure  '--host=x86_64-apple-darwin' '--build=i686-apple-darwin' '--with-ns' 'build_alias=i686-apple-darwin' 'host_alias=x86_64-apple-darwin' 'CC=gcc -mmacosx-version-min=10.5''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8
  default enable-multibyte-characters: t