R/card.R
contrast_ratio.Rd
The contrast ratio of two colours, as WCAG 2 measures it: from 1:1, for the same colour, to 21:1, for black on white.
contrast_ratio(a, b)
The colours, as "#RRGGBB".
"#RRGGBB"
The ratio, a number from 1 to 21.
rghcard:::contrast_ratio("#198CE7", "#0d1117") # R on GitHub's dark mode #> [1] 5.3588