check_vangogh_cvd: Check Color Vision Deficiency (CVD) Accessibility of Van Gogh...

View source: R/check_vangogh_cvd.R

check_vangogh_cvdR Documentation

Check Color Vision Deficiency (CVD) Accessibility of Van Gogh Palettes

Description

Simulates how a Van Gogh palette appears under different types of color vision deficiency and provides accessibility scores. This function complements the existing check_palette() function by adding visual simulation and quantitative metrics.

Usage

check_vangogh_cvd(
  palette_name,
  n = NULL,
  simulate = TRUE,
  return_scores = FALSE
)

Arguments

palette_name

Character string specifying the palette name (e.g., "StarryNight")

n

Integer. Number of colors to extract from palette. Default is NULL (uses all colors).

simulate

Logical. If TRUE, displays simulations for each CVD type. Default TRUE.

return_scores

Logical. If TRUE, returns detailed scoring data. Default FALSE.

Details

This function evaluates palette accessibility across three main types of color vision deficiency:

  • Deuteranopia (red-green, affects ~5% of males)

  • Protanopia (red-green, affects ~2% of males)

  • Tritanopia (blue-yellow, affects ~0.01% of population)

The function uses the colorspace package for CVD simulation and calculates minimum pairwise perceptual distance in CIELAB color space to assess distinguishability.

Value

If return_scores = TRUE, returns a data frame with CVD scores. Otherwise, displays visual simulations and prints a summary.

Examples

## Not run: 
# Visual simulation of StarryNight palette
check_vangogh_cvd("StarryNight")

# Get detailed scores without plotting
scores <- check_vangogh_cvd("Irises", simulate = FALSE, return_scores = TRUE)

# Check subset of colors
check_vangogh_cvd("CafeTerrace", n = 3)

## End(Not run)


vangogh documentation built on Nov. 5, 2025, 7:39 p.m.