Everyone, I'm working with scatter plots with different colored symbols (via lattice). I'm currently using these colors for points and lines: col1 <- c(rgb(1, 0, 0), rgb(0, 0, 1), rgb(0, 1, 0), rgb(0.55482458, 0.40350876, 0.04166666), rgb(0, 0, 0)) plot(seq(along = col1), pch = 16, col = col1, cex = 1.5) I'm also using these with transparency (alpha between .5-.8 depending on the number of points). I'd like to make sure that these colors are interpretable by the color bind. Doing a little looking around, this might be a good palette: col2 <- c(rgb(0, 0.4470588, 0.6980392), rgb(0.8352941, 0.3686275, 0, ), rgb(0.8000000, 0.4745098, 0.6549020), rgb(0.1686275, 0.6235294, 0.4705882), rgb(0.9019608, 0.6235294, 0.0000000)) plot(seq(along = col2), pch = 16, col = col2, cex = 1.5) but to be honest, I'd like to use something a little more vibrant. First, can anyone verify that these the colors in col2 are differentiable to someone who is color blind? Second, are there any other specific palettes that can be recommended? How do the RColorBrewer palettes rate in this respect? Thanks, Max
Hi, Try the dichromat package (also dichromat_pal in the scales package). HTH, baptiste On 3 November 2011 10:26, Max Kuhn <mxkuhn at gmail.com> wrote:> Everyone, > > I'm working with scatter plots with different colored symbols (via > lattice). I'm currently using these colors for points and lines: > > col1 <- c(rgb(1, 0, 0), rgb(0, 0, 1), > ? ? ? ? rgb(0, 1, 0), > ? ? ? ? rgb(0.55482458, 0.40350876, 0.04166666), > ? ? ? ? rgb(0, 0, 0)) > plot(seq(along = col1), pch = 16, col = col1, cex = 1.5) > > I'm also using these with transparency (alpha between .5-.8 depending > on the number of points). > > I'd like to make sure that these colors are interpretable by the color > bind. Doing a little looking around, this might be a good palette: > > col2 <- c(rgb(0, ? ? ? ? 0.4470588, 0.6980392), > ? ? ? ? ?rgb(0.8352941, 0.3686275, 0, ? ? ? ), > ? ? ? ? ?rgb(0.8000000, 0.4745098, 0.6549020), > ? ? ? ? ?rgb(0.1686275, 0.6235294, 0.4705882), > ? ? ? ? ?rgb(0.9019608, 0.6235294, 0.0000000)) > > plot(seq(along = col2), pch = 16, col = col2, cex = 1.5) > > but to be honest, I'd like to use something a little more vibrant. > > First, can anyone verify that these the colors in col2 are > differentiable to someone who is color blind? > > Second, are there any other specific palettes that can be recommended? > How do the RColorBrewer palettes rate in this respect? > > Thanks, > > Max > > ______________________________________________ > R-help at r-project.org 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. >
On Thu, Nov 3, 2011 at 10:26 AM, Max Kuhn <mxkuhn at gmail.com> wrote:> First, can anyone verify that these the colors in col2 are > differentiable to someone who is color blind? > > Second, are there any other specific palettes that can be recommended? > How do the RColorBrewer palettes rate in this respect?If you go to www.colorbrewer.org, the ColorBrewer site, it has ratings of the palettes for visibility under a variety of conditions, including red-green color blindness. Some of them are good, but not all of them. The dichromat package attempts to show the impact of both sorts of red:green anomalous vision on color visibility. It isn't quite right because of gamma correction, but people have told me that it is a fairly good representation, and it does have the right impact on clustering of pixels in some of the Ishihara color vision tests. It suggests that your colors 1 and 3 will be too similar and 2 and 4 will also be too similar for someone with protanopia. You aren't going to be able to get five colors that are equal luminance, equal chroma, and distinguishable to dichromats: you're putting three constraints on a three-dimensional space and you will end up with just two points. For three colors I would suggest orange, blue, gray. More than three will be hard. -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland
Before you pick out a palette: you are aware that their are several different types of color-blindness, aren't you? http://en.wikipedia.org/wiki/Color_blind -- Sent from my Cray XK6 "Pendeo-navem mei anguillae plena est."
Possibly Parallel Threads
- Multiple palettes on single plot don't get rendered when I use dev.copy2pdf
- colors and palettes and things...
- Photoshop CS2 - hiding palettes with tools, layers etc.
- dichromat, regexp, and grid objects
- Palettes {grDevices} - wrong number of colors returned?