View source: R/contrast_ratio.R
| best_contrast | R Documentation |
best_contrast() finds the color in y with the highest contrast to the
color x.
best_contrast(x, y = c("#010101", "#FFFFFF"))
x |
A vector of colors as described in |
y |
A vector of colors as described in |
A vector of the same length as x with, for each element of x, the
element of y that has the highest contrast to x.
best_contrast("red")
best_contrast("grey20")
best_contrast("white")
best_contrast(rainbow(10), rainbow(3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.