colorblind: Returns the inputted color as perceivd by a colorblind person

Description Usage Arguments Value Examples

Description

Returns the inputted color as perceivd by a colorblind person

Usage

1
colorblind(col, type = "deuteranopia", output = "hex")

Arguments

type

Type of color blindness wanted to simulated. "normal", "protanopia", "protanomaly", "deuteranopia", "deuteranomaly","tritanopia", "tritanomaly", "achromatopsia" and "achromatomally" are all supported. Defaults to "deuteranopia" (most common type.

output

Output format. "hex" and "color" supported. Defaults to "hex"

...

Input color. Hexcode, c(r,g,b), color name as character and "color" class object are all supported.

Value

Generally, a hexcode representing the input's color_blindness. If a "color" class object is received as argument, the color_blindness will keep this format.

Examples

1
2
3
4
colorblind("red")
colorblind("#ff00ff")
colorblind(c(0,0,0))
colorblind("#ff00ff", type="tritanomaly")

dpcarballo/coloR documentation built on June 1, 2019, 8:14 p.m.