Learn R Programming

colorblindr (version 0.1.0)

simulate_cvd: Simulate color vision deficiency given a cvd transform matrix

Description

This function takes valid R colors and transforms them according to a cvd transform matrix.

Usage

simulate_cvd(col, cvd_transform)

Arguments

col

A color or vector of colors e.g., "#FFA801" or "blue"

cvd_transform

A 3x3 matrix specifying the color vision deficiency transform matrix

Examples

Run this code
# NOT RUN {
 simulate_cvd(c("#005000","blue","#00BB00"),
 tritanomaly_cvd['6'][[1]])

# }

Run the code above in your browser using DataLab