best_contrast {prismatic} | R Documentation |
Finds the color in 'y' with the highest contrast to the color 'x'.
best_contrast(x, y = c("#010101", "#FFFFFF"))
x |
Multiple colors |
y |
Multiple colors |
The elements of 'y' with highest contrast to 'x'.
best_contrast("red")
best_contrast("grey20")
best_contrast("white")
best_contrast(rainbow(10), rainbow(3))