Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Issue 3046052: [Mac] Do not use |+[NSColor selectedMenuItemColor]| in a gradient due to color space issues. (Closed)

Created:
10 years, 4 months ago by Robert Sesek
Modified:
9 years, 7 months ago
Reviewers:
Nico
CC:
chromium-reviews, John Grabowski, pam+watch_chromium.org, ben+cc_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

[Mac] Do not use |+[NSColor selectedMenuItemColor]| in a gradient due to color space issues. BUG=49448 TEST=On both 10.5 and 10.6, open the Wrench menu and click a button. Button has blue gradient. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=55327

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M chrome/browser/cocoa/wrench_menu_button_cell.mm View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Robert Sesek
10 years, 4 months ago (2010-08-06 21:34:22 UTC) #1
Nico
LG On Fri, Aug 6, 2010 at 2:34 PM, <rsesek@chromium.org> wrote: > Reviewers: Nico, > ...
10 years, 4 months ago (2010-08-06 23:07:13 UTC) #2
Nico
On Fri, Aug 6, 2010 at 4:07 PM, Nico Weber <thakis@chromium.org> wrote: > LG > ...
10 years, 4 months ago (2010-08-06 23:08:51 UTC) #3
Robert Sesek
On 2010/08/06 23:08:51, Nico wrote: > (If you use NSColor colorWithCalibratedRed:green:blue:, the color will > ...
10 years, 4 months ago (2010-08-06 23:44:46 UTC) #4
Nico
10 years, 4 months ago (2010-08-06 23:48:07 UTC) #5
On Fri, Aug 6, 2010 at 4:44 PM,  <rsesek@chromium.org> wrote:
> On 2010/08/06 23:08:51, Nico wrote:
>>
>> (If you use NSColor colorWithCalibratedRed:green:blue:, the color will
>> look the same on 10.5 and 10.6. The device version will look slightly
>> darker on 10.6 due to the changed system gamma – but the calibrated
>> version embeds a colorspace, and the conversion to device pixels then
>> undoes the gamma effect. As far as I understand.)
>
> Thanks for the tip -- didn't know that.  But in this case, I do want device
> colors because I picked these using Pixie to match the menu item color.
>  Using
> calibrated will generate more washed-out colors.  I'm okay with there not a
> pixel-perfect match on 10.5.

The theoretical correct way to do this is to get the device pixels and
convert them to calibrated colors. Then it should be pixel-perfect no
matter the selected color profile of the monitor (assuming the
calibrated space is larger than the monitor color space) ;-)

(No need to do that here)

>
> http://codereview.chromium.org/3046052/show
>

Powered by Google App Engine
This is Rietveld 408576698