# NOT RUN {
# simulate color-vision deficiency by calling `simulate_cvd` with specified matrix
simulate_cvd(c("#005000", "blue", "#00BB00"), tritanomaly_cvd["6"][[1]])
# simulate color-vision deficiency by calling the shortcut high-level function
tritan(c("#005000", "blue", "#00BB00"), severity = 0.6)
# simulate color-vision deficiency by calling `simulate_cvd` with interpolated cvd matrix
simulate_cvd(c("#005000", "blue", "#00BB00"),
interpolate_cvd_transform(tritanomaly_cvd, severity = 0.6))
# apply CVD directly on RGB matrix
RGB <- t(hex2RGB(rainbow(3))@coords*255)
deutan(RGB)
# }
Run the code above in your browser using DataLab