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?



Ack, at 5/2/05, Ali Ozer said:

another option, which uses the color space of one of the colors:

BOOL equal = [color1 isEqual:[color2 colorUsingColorSpaceName:[color1 colorSpaceName]];

Not sure if that would be the best thing to do if say color one was in NSCalibratedBlackColorSpace or color2 was made using NSPatternColorSpace.


I only mention this because I've had many issues in the past when trying to convert color spaces like this.

NSColor *rgb1 = [color1 colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
NSColor *rgb2 = [color2 colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
BOOL equal = rgb1 && rgb2 && [rgb1 isEqual:rgb2];


I'd personally go for this one.

--


Sincerely, Rosyna Keller Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People
_______________________________________________
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>)
 >Re: When is (NSColor) black not black? (From: Douglas Davidson <email@hidden>)
 >Re: When is (NSColor) black not black? (From: Ali Ozer <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.