"John Fox" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

> The object is to get contrasting colours, so that
> when one is plotted over the other, the two will be readily 
> distinguishable.

A simple approach to contrast is to compute a mean intensity by taking the 
mean of the three  RGB components (should be 0..255) and then going with 
either "black" or "white" -- whichever one  is "farthest" away.

Look at the Color Chart with contrasting numbers
http://research.stowers-institute.org/efg/R/Color/Chart/index.htm
or
http://research.stowers-institute.org/efg/R/Color/Chart/ColorChart.pdf

efg

Earl F. Glynn
Stowers Institute for Medical Research

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to