Re: standard colors
Re: standard colors
- Subject: Re: standard colors
- From: Ross Carter <email@hidden>
- Date: Sat, 17 Oct 2009 18:19:25 -0400
On Oct 17, 2009, at 5:31 PM, Alastair Houghton wrote:
On 17 Oct 2009, at 21:32, Michael Cinkosky wrote:
Has Apple provided documentation on their standard source list
background color? I haven't found it in the HIG docs, or with
Google (I have not come up with the right terms to make the search
specific enough).
I have also tried just sampling the colors from the running
applications (Mail, iTunes) but this yields a value which, when
applied, looks quite different from what I sampled. Clearly I do
not understand how colors work.
When you sample colours, you get the values from the frame buffer.
However, when you *use* colours in Cocoa, they're subject to colour
management, so they're transformed according to the colour space for
the screen on which your window is (mostly) present before they're
written to the backing store.
Anyone know where to find the official values?
I'd be interested to know myself :-)
Can't remember where I got this:
static NSColor *sourceListBackgroundColor = nil;
if (sourceListBackgroundColor == nil) {
NSOutlineView *outlineView = [[NSOutlineView alloc]
initWithFrame:NSZeroRect];
[outlineView
setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleSourceList
];
sourceListBackgroundColor = [outlineView backgroundColor];
}
IIRC, the color changes to gray when the app is deactivated.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden