Re: When is (NSColor) black not black?
Re: When is (NSColor) black not black?
- Subject: Re: When is (NSColor) black not black?
- From: Douglas Davidson <email@hidden>
- Date: Mon, 2 May 2005 15:10:39 -0700
On May 2, 2005, at 11:06 AM, Mark Dawson wrote: I'm not sure if I'm doing a compare wrong, but if I set my color wheel to black (10.3.9, using the "named" colors/3 section from left of color wheel), it doesn't seem to compare correctly:
if ([[colorWheel color] isEqual:[NSColor blackColor]]) doSomething; <--- never equals
Is there something further I need to do?
Colors have color spaces, so two colors that appear to be the same on the screen may not compare as equal if they have different color spaces. In general the notion of equality between colors is not a simple one; you need to decide what sort of equality you are interested in for this particular test.
Douglas Davidson
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden