[Top][All Lists]

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

Re: sRGB color support in NS port [PATCH]

From: Steve Purcell
Subject: Re: sRGB color support in NS port [PATCH]
Date: Sat, 21 Dec 2013 19:59:03 +0000

Hi Jan,

On 21 Dec 2013, at 18:10, Jan Djärv <address@hidden> wrote:

> Hello.
> 21 dec 2013 kl. 18:37 skrev Steve Purcell <address@hidden>:
>> On 21 Dec 2013, at 16:16, Jan Djärv <address@hidden> wrote:
>>> Also, this is not what the documentation says is the right way to display 
>>> colors on OSX.
>> That’s actually not at all clear to me from the docs: I haven’t found 
>> anything which says that programs may only accept from users hex colour 
>> literals in the calibrated RGB space.  The docs appear to simply say that 
>> that is the space to use within NS programs for shuffling R, G and B values 
>> around.  What we’re talking about here is how to interpret user colour 
>> input, and how to display colours back to the user as RGB triplets.
> They don't say "may only", but suggests calibrated color space to overcome 
> differences between monitors.
> Two different monitor should in theory display the same sRGB color the same.  
> In practice this is seldom so.  So you calibrate each monitor individually to 
> get the same color.

Yes, I understand calibration well, and that is certainly necessary in order to 
get reliable results. But it is orthogonal to this issue.

If I enter a hex colour value into, say, Photoshop or a web page, I know what 
colour space it is in, because it is defined.  What colour space are hex 
colours in Emacs in?  The current answer is, “whatever the host OS likes to 
work with”.

My view is that we can do better: this is an opportunity to settle on a 
consistent answer, by defining the reference colour space for Emacs’ RGB 
literals. And sRGB is the obvious choice, because it is already the standard 
for Windows and the Web, with the only (widely-accepted) limitation being that 
certain narrow ranges of colours displayable by extra-wide-gamut monitors are 
outside the sRGB space.

>> To be useful, the user-oriented RGB notation should presumably denote 
>> colours which will be displayed consistently on all machines. For that to be 
>> even be possible, those colours must be in an absolute and standard colour 
>> space.
> This only applies if all display devices output sRGB the same.  They don't.  
> Also, sRGB has a limited color range, some wants to go beyond this range 
> (gaumut I think it is called).  Adobe has some RGB color spaces that contains 
> more colors than sRGB for example.

If you have colours specified in sRGB, then they *will* display identically on 
any calibrated monitor with a colour profile, to the maximum extent possible on 
that hardware.

>> On Windows, the RGB colour literals will be assumed to be coordinates within 
>> its default sRGB space. On OS X, emacs will claim that they are in the vague 
>> “calibrated” space, which is not sRGB, so they will automatically look 
>> different between the two platforms. This seems like a shortcoming to me, 
>> and it’s not clear to me that making the color space a user preference is 
>> the correct fix, at least if the default is the calibrated space.
> Well, OSX doesn't use \ in paths like Windows either, not does it use 16 bit 
> chars in API:s and a bunch of other differences.  Saying X does something, 
> therefore we must do like X is a nonsense argument.

That summary of my argument does not accurately reflect the point I was making.

This seems like an opportunity to do something that helps colours *actually 
look the same* across platforms, because the current situation only guarantees 
that they will look different.


reply via email to

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