Re: [R] Selecting complementary colours

From: Earl F. Glynn <efg_at_stowers-institute.org>
Date: Tue, 22 May 2007 11:20:33 -0500

"John Fox" <jfox_at_mcmaster.ca> wrote in message news:20070522002251.UJON1671.tomts5-srv.bellnexxia.net_at_JohnDesktop8300...

> 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_at_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. Received on Tue 22 May 2007 - 16:35:20 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 May 2007 - 17:31:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.