Designing Graphs for User Accessibility

What is Color Blindess?

  • Color blindness is when people can’t distinguish colors
  • Affects approximately 8% of population of men, 0.5% of women
  • Issues distinguishing red & green is most common

Color Brewer Online

https://colorbrewer2.org

RColorBrewer Package

display.brewer.all(n,type,colorblindFriendly)

Input:

  • n - number of colors you want
  • type - type of data (qual for qualitative,seq for sequential,or div for diverging)
  • colorblindFriendly - TRUE or FALSE (set TRUE to return color blind friendly colors)

Output:

  • Visual representation of available colors. Each set has a name, which can be called in code.

brewer.pal(n,name)
Input:

  • n - number of colors you want
  • name - name of color palette, which can be found using display.brewer.all()

Output:

  • Hex color codes
## [1] "#1B9E77" "#D95F02" "#7570B3"