palette_check {colorblindcheck}R Documentation

Compare Palette with Color Vision Deficiencies

Description

Comparision of the original input palette and simulations of color vision deficiencies - deuteranopia, protanopia, and tritanopia.

Usage

palette_check(
  x,
  tolerance = NULL,
  plot = FALSE,
  bivariate = FALSE,
  severity = 1,
  ...
)

Arguments

x

A vector of hexadecimal color descriptions

tolerance

The minimal value of acceptable difference between the colors to distinguish between them. As the default, minimal distance between colors in the original input palette is given.

plot

If TRUE, display a plot comparing the original input palette and simulations of color vision deficiencies - deuteranopia, protanopia, and tritanopia

bivariate

If TRUE (and plot = TRUE), display a bivariate plot (plot where colors are located in columns and rows) comparing the original input palette and simulations of color vision deficiencies - deuteranopia, protanopia, and tritanopia

severity

Severity of the color vision defect, a number between 0 and 1

...

Other arguments passed on to palette_dist() to control the color metric

Value

A data.frame with 4 observations and 8 variables:

Additionally, a plot comparing the original input palette and simulations of color vision deficiencies - deuteranopia, protanopia, and tritanopia can be shown.

Examples

rainbow_pal = rainbow(n = 7)
rainbow_pal
palette_check(rainbow_pal, plot = TRUE)

x = rcartocolor::carto_pal(11, "Vivid")
palette_check(x)
palette_check(x, plot = TRUE)
palette_check(x, tolerance = 1)
palette_check(x, tolerance = 10, metric = 1976)
palette_check(x, plot = TRUE, severity = 0.5)

y = rcartocolor::carto_pal(4, "Sunset")
palette_check(y, plot = TRUE, bivariate = TRUE, severity = 0.5)

[Package colorblindcheck version 1.0.2 Index]