Takes a color input as x and returns either the black or white color (or
expression) if dark or light text should be used over the input color for
best contrast. Follows W3C Recommendations.
choose_dark_or_light(x, black = "#000", white = "#FFF")
| x | The background color |
|---|---|
| black | Text or foreground color, e.g. "#222" or
|
| white | Text or foreground color or expression, e.g. "#EEE" or
|