Calculate a distance matrix between colours for colour blind people
Source:R/colour_distance.R
colour_blind_distance.Rd
The function calculates the distance matrices for every option. Then aggregates the matrices into a single distance matrix.
Usage
colour_blind_distance(
colours,
deutan = TRUE,
protan = FALSE,
tritan = FALSE,
gray = FALSE,
fun = min,
method = "emd"
)
Arguments
- colours
a vector of colours
- deutan
correct for deuteranomaly (red - green colour blindness). Defaults to
TRUE
.- protan
correct for protanopia (red - green colour blindness). Defaults to
FALSE
.- tritan
correct for tritanopia (blue - yellow colour blindness). Defaults to
FALSE
.- gray
correct for monochromacy (unable to distinguish colours). Defaults to
FALSE
.- fun
Function to aggregate different colour distance matrices.
- method
passed to
colordistance::getColorDistanceMatrix()