DELTAE
Name
   
    DELTAE
Purpose
   
    This function returns the computed color difference (deltaE)
    
    between two (2) provided RGB color triplets.  The triplets are
    
    converted to sRGB (0-1), converted to tristimulus values (XYZ),
    
    converted to CIE L*a*b* where the color difference between them
    
    is computed using a simple Euclidean distance measure.
Category
   
    Color Science.
Calling Sequence
   
    Result = DELTAE( color1, color2, ILLUMINANT=illuminant,
                    
               
                                     DL=dL,
                    
               
                                     DA=dA,
                    
               
                                     DB=dB,
                    
               
                                     AVERAGE=average )
Inputs
   
    color1
      
       A 3-element vector or 3xn array of color triplet values
      
       with each color value in the range [0,255]
    
    color2
      
       A 3-element vector or 3xn array of color triplet values
      
       with each color value in the range [0,255]
Keyword Parameters
   
    ILLUMINANT
      
       An optional keyword to describe the illuminant that should
      
       be used for the XYZ to CIE L*a*b* conversion
          
          0 - D65 (Daylight) [DEFAULT]
          
          1 - Illuminant A (Tungsten)
          
          2 - Illuminant F2 (Cool White Fluorescent)
          
          3 - Illuminant F11 (Narrow Band Fluorescent)
          
          4 - Illuminant F7 (Daylight Fluorescent)
          
          5 - Illuminant F8 (Daylight Fluorescent)
    
    DL
      
       An optional keyword to return a scalar or vector of deltaL value(s)
    
    DA
      
       An optional keyword to return a scalar or vector of deltaA value(s)
    
    DB
      
       An optional keyword to return a scalar or vector of deltaB value(s)
    
    AVERAGE
      
       An optional keyword that will, upon return, contain
      
       a 4-element vector composed of deltaE, deltaL, deltaA, and
      
       deltaB
Return Value
   
    Result is either a scalar (if the provided color values
    
    were single triplets) or an n-element vector (if a series of
    
    triplets were provided for each color) that contains the color
    
    difference values.
  
 :ERROR CHECKING:
    
    RETURN, -1
      
       if the provided color data is not of compatible dimensions
Side Effects
   
    None
Requires
   
    SRGB2XYZ
    
    XYZ2LAB
Modification History
   
    Written by:       Carl Salvaggio
    
    January, 2008     Original code
    
    
Disclaimer
   
    This source code is provided "as is" and without warranties as to performance 
    
    or merchantability. The author and/or distributors of this source code may 
    
    have made statements about this source code. Any such statements do not 
    
    constitute warranties and shall not be relied on by the user in deciding 
    
    whether to use this source code.
    
    This source code is provided without any express or implied warranties 
    
    whatsoever. Because of the diversity of conditions and hardware under which 
    
    this source code may be used, no warranty of fitness for a particular purpose 
    
    is offered. The user is advised to test the source code thoroughly before 
    
    relying on it. The user must assume the entire risk of using the source code.