Skip to contents

Show colors using dichromat color blindness adjustment

Usage

showDichromat(
  x,
  type = c("deutan", "protan", "tritan"),
  sep = "\n",
  spacer = TRUE,
  original = TRUE,
  do_plot = TRUE,
  ...
)

Arguments

x

list or character vector with R compatible colors.

type

character passed to dichromat::dichromat() for one or more types of color blindness to simulate.

sep

character used as a delimited to label each resulting color vector.

spacer

logical indicating whether to include a blank spacer between sets of colors. This spacer is mainly useful for display.

original

logical indicating whether to include original colors and adjusted colors.

do_plot

logical indicating whether to plot the results using jamba::showColors().

...

additional arguments are ignored.

Details

This function is a very simple wrapper around jamba::showColors() which also applies one of the color blindness emulations from dichromat::dichromat().

See also

Other colorjam display: color_pie(), combine_alphas()

Examples

showDichromat(jam_linear["firebrick"])


showDichromat(jam_linear[1:2])


showDichromat(jam_linear[7:9])


showDichromat(jam_linear, type="tritan", spacer=FALSE)


showDichromat(jam_linear, type="tritan", spacer=FALSE, original=FALSE)