# color/contrast-text
Pick whichever of two candidate colors contrasts more with a background,
using the WCAG contrast ratio. Defaults to black vs white — the standard
"readable text on this background" decision.
## Syntax
[color/contrast-text $background] [color/contrast-text $background $dark $light]
## Examples
[color/contrast-text "#ffffff"] # "#000000" [color/contrast-text "#101010"] # "#ffffff" # Theme-aware pair instead of pure black/white: [color/contrast-text "#89b4fa" "#1e1e2e" "#cdd6f4"]
## Returns
`"#rrggbb"` hex string (the chosen candidate). nil when the background is
unparseable.
## See Also
`color/luminance`, `color/parse`