pals (version 1.5)

pal.safe: Show a palette/colormap for black/white and colorblind safety

Description

A single palette/colormap is shown (1) without any modifications (2) in black-and-white as if photocopied (3) as seen by deutan color-blind (4) as seen by protan color-blind (5) as seen by tritan color-blind

Usage

pal.safe(pal, n = 100, main = NULL)

Arguments

pal

A palette function or a vector of colors.

n

The number of colors to display for palette functions.

main

Title to display at the top of the test image

Value

None.

Details

Rates of colorblindness in women are low, but in men the rates are around 3 to 7 percent, depending on the race.

What to look for:

1. Are colors still unique when viewed in less-than full color?

2. Is a sequential colormap still sequential?

References

Vischeck. http://www.vischeck.com/vischeck/

None

Examples

Run this code
# NOT RUN {
pal.safe(glasbey)
pal.safe(rainbow, main="rainbow") # Really, really bad
pal.safe(cubicyf(100), main="cubicyf")
pal.safe(parula, main="parula")

# }

Run the code above in your browser using DataCamp Workspace