View source: R/check_vangogh_cvd.R
| get_cvd_safe_palettes | R Documentation |
Returns a list of Van Gogh palettes that meet minimum accessibility standards for color vision deficiency.
get_cvd_safe_palettes(
min_distance = 15,
cvd_types = c("deutan", "protan", "tritan")
)
min_distance |
Numeric. Minimum CIELAB distance threshold. Default 15. |
cvd_types |
Character vector. Which CVD types to check. Options: "deutan", "protan", "tritan". Default checks all. |
Character vector of palette names that meet the criteria
## Not run:
# Get highly accessible palettes
safe_palettes <- get_cvd_safe_palettes(min_distance = 20)
# Use a safe palette
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
geom_point() +
scale_color_vangogh(safe_palettes[1])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.