[comp.windows.x] Contrast from RGB

reggie@dinsdale.paradyne.com (George W. Leach) (10/28/89)

      Has anyone done any studies concerning color contrast with bitmapped
displays, eg. Suns, PCs, etc.....  What I am looking for is a way to compute
the contrast from RGB triplets for a given set of background and foreground
colors.  We realize that there are some problems with this due to not being
concerned with the distance from the screen that the operator is positioned,
the reflective nature of the surface of the screen, any light sources that
can cause reflected light, etc....  However, we should be able to make some
use of a contrast ratio between two given RGB triplets.


      I seem to recall a discussion of "Luminance from RGB" taking place
in the comp.windows.x newsgroup a while back.  However, I did not save
any of the articles from that discussion.  Perhaps someone else did?

Thanks,

George

George W. Leach					AT&T Paradyne 
(uunet|att)!pdn!reggie				Mail stop LG-133
Phone: 1-813-530-2376				P.O. Box 2826
FAX: 1-813-530-8224				Largo, FL 34649-2826 USA

trejo@nprdc.arpa (Leonard J. Trejo) (10/31/89)

In article <6709@pdn.paradyne.com> reggie@dinsdale.paradyne.com (George W. Leach) writes:
>
>
>
>      Has anyone done any studies concerning color contrast with bitmapped
>displays, eg. Suns, PCs, etc.....  What I am looking for is a way to compute
>the contrast from RGB triplets for a given set of background and foreground
>colors.  We realize that there are some problems with this due to not being
>concerned with the distance from the screen that the operator is positioned,
>the reflective nature of the surface of the screen, any light sources that
>can cause reflected light, etc....  However, we should be able to make some
>use of a contrast ratio between two given RGB triplets.
>

There is no single "best" way to compute the "contrast" of a display
area.  Effective contrast depends on the size, visual field location,
duration, and context of a display area.

There are two simple formulas for color differences, approved by the
CIE (Commission Internationale de l'eclairage) (excuse the spelling),
CIELAB and CIELUV.  Both are easily derived from the RGB triplets of
a properly calibrated CRT (calibration is not trivial). CIELUV is
preferred by the TV industry and is best suited to self-luminous 
displays because it is associated with a chromaticity diagram, whereas
CIELAB is not. It yields a color difference measure "delta E" which 
you may use as an estimate of color contrast.  

We've found that delta E doesn't predict human colored signal 
classification performance for brief colored signals very well.  
(Trejo & Lewis, Optical Society of America, Annual Meeting, 1989, 
Orlando, FL).  Delta E may be OK for static displays, but test your
assumptions!

For formal descriptions of the CIE formulas, have a look at CIE 
Publication No. 15.2, "Colorimetry", 2nd ed. (1986) and CIE 
Supplement No. 2 to Publication No. 15, "Recommendations on
uniform colour spaces, color difference equations, and psychometric
terms (1978).  Sorry, I cannot provide copies.

You may read more about measuring color in "Measuring Color" by R. W.
G. Hunt (1987), published by Ellis Horwood Limited, and distributed by
Halstead Press, a division of John Wiley & Sons, 605 Third Avenue, 
New York, NY 10158.

If you really want to do it right, consult a colorimetry expert.
I can recommend some if you're interested.

				LJT

============================================================================
ARPANET : trejo@nprdc.navy.mil		UUCP:  ucsd!nprdc!trejo

U.S. Mail: Leonard J. Trejo, Ph. D.	Phone: (619) 553-7711
	   Neuroscience Laboratory		(AV) 553-7711
	   NPRDC, Code 141
	   San Diego, CA 92152-6800