Re: When is (NSColor) black not black?
Re: When is (NSColor) black not black?
- Subject: Re: When is (NSColor) black not black?
- From: Rosyna <email@hidden>
- Date: Mon, 2 May 2005 18:30:39 -0700
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:
This email sent to email@hidden