Zenn
Open16

WebBook/サイトに関してここでまとめておく

yuuyuu
yuuyuu

カラーコントラストのチェックができる

So contrast comes into play with text as well as color. In general, you should consider a 7 to 1 contrast ratio for text, minimally 4 to 1.

# default ggplot2 discrete color (left) against the default ggplot2 gray background
visibly::color_contrast_checker(foreground = '#F8766D', background = 'gray92')
#>  ratio   AA AALarge  AAA AAALarge
#>1  2.25 fail    fail fail     fail
# the dark viridis (right) would be better
visibly::color_contrast_checker(foreground = '#440154', background = 'gray92')
#>  ratio   AA AALarge  AAA AAALarge
#>1  12.7 pass    pass pass     pass
ログインするとコメントできます