• 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: Marcel Weiher <email@hidden>
  • Date: Wed, 5 Jun 2002 01:45:55 +0200

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


--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Color comparison
      • From: Jaeho Chang <email@hidden>
References: 
 >Re: Color comparison (From: Jason Harris <email@hidden>)

  • Prev by Date: Re: (no subject)
  • Next by Date: Re: copyWithZone: -- selector not recognized
  • Previous by thread: Re: Color comparison
  • Next by thread: Re: Color comparison
  • Index(es):
    • Date
    • Thread