Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When is (NSColor) black not black?



My guess would be that something odd is going on with respect to how the colour is represented. For example it's very easy for two HSL colours to be black, but not be equal (they have the same lightness=0, but differing hue). You may need to write your own routine to decide if they really do represent a black colour.

Bob

On May 2, 2005, at 7:06 PM, 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?

Thanks!

mark

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >When is (NSColor) black not black? (From: Mark Dawson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.