TODO: URL to explain CVD

pev_fcont_cvd(.fcont, type = c("deutan", "protan", "tritan", "none"),
  severity = 1, ...)

# S3 method for default
pev_fcont_cvd(.fcont, type = c("deutan", "protan",
  "tritan", "none"), severity = 1, ...)

# S3 method for pev_fcont
pev_fcont_cvd(.fcont, type = c("deutan", "protan",
  "tritan", "none"), severity = 1, ...)

pev_fdisc_cvd(.fdisc, type = c("deutan", "protan", "tritan", "none"),
  severity = 1, ...)

# S3 method for default
pev_fdisc_cvd(.fdisc, type = c("deutan", "protan",
  "tritan", "none"), severity = 1, ...)

# S3 method for pev_funbounded
pev_fdisc_cvd(.fdisc, type = c("deutan",
  "protan", "tritan", "none"), severity = 1, ...)

# S3 method for pev_fbounded
pev_fdisc_cvd(.fdisc, type = c("deutan", "protan",
  "tritan", "none"), severity = 1, ...)

Arguments

.fcont

object that can be coerced to pev_fcont, when called with a numeric vector with values between 0 and 1, returns the corresponding (hex-code) values.

type

character, describes color-vision deficiency. One of "deutan", "protan", "tritan", "none".

severity

numeric, number between 0 (none) and 1 to describe the severity of color-vision deficiency.

...

Other args (not used)

.fdisc

object that can be coerced to pev_fdisc, when called with an integer, returns the corresponding (hex-code) values.

Value

Object of of the same type as .fpal; a palette function, with S3 class pev_fcont or pev_fdisc.

Examples

# Create continuous diverging-palette function fcont_purple_green <- pev_fcont("Purple-Green") fcont_purple_green
# Create discrete diverging-palette function fdisc_purple_green <- pev_fdisc(fcont_purple_green, n = 11) fdisc_purple_green
# Simulate color-vision deficiency pev_fcont_cvd(fcont_purple_green, type = "deutan")
pev_fdisc_cvd(fdisc_purple_green, type = "deutan")