• 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: Color comparison
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Color comparison


  • Subject: Re: Color comparison
  • From: Jaeho Chang <email@hidden>
  • Date: Wed, 5 Jun 2002 17:34:37 +0900

Sorry... It's going to a bit OT now... but...

How about using HSV (Hue, Saturation, Value) ?
I used to use this to compare colors, but never tried CIE stuff.
Is it better?

Jaeho.


On Wednesday, June 5, 2002, at 08:45 AM, Marcel Weiher wrote:

On Tuesday, June 4, 2002, at 08:48 Uhr, Jason Harris wrote:

You could also use the Euclidean distance in whatever color space your color
lives in. For RGB, it's
distance = sqrt( pow(r1-r2, 2.0) + pow(g1-g2, 2.0) + pow(b1-b2, 2.0) );
"distance" is a number in the same units as r,g, and b that describes how
"close" the the two colors are.

For just equality, that probably won't be necessary. If you're actually trying to get color difference, euclidean distance in RGB is not a good measure, because RGB is not a perceptually uniform color-space (not even close). For determining color-distance, use CIE Lab color space ( or CIE Luv ). For these color-spaces, a delta-E of 1 is approximately the JND, the Just Noticeable Difference under standard viewing conditions.

Marcel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Color comparison (From: Marcel Weiher <email@hidden>)

  • Prev by Date: Re: drawing NOW in a callback, boom!
  • Next by Date: Re: Any way to draw a PixMapHandle into an NSView??
  • Previous by thread: Re: Color comparison
  • Next by thread: [Q] Detecting running processes
  • Index(es):
    • Date
    • Thread