• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: When is (NSColor) black not black?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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>)

  • Prev by Date: Core Data XCode issue
  • Next by Date: Re: Is this a bug in Tiger's NSBitmapImageRep?
  • Previous by thread: Re: When is (NSColor) black not black?
  • Next by thread: Anonymous NSConnection using NSApplication's receive NSPort?
  • Index(es):
    • Date
    • Thread