# check colors against dark and light backgrounds
splot.colorcontrast(c("#FF0000", "#00FF00", "#0000FF"), c("black", "white"))
# check contrast between colors
splot.colorcontrast(c("red", "green", "blue"), c("red", "green", "blue"))
# see when shades of a color cross thresholds on a given background
splot.colorcontrast(splot.color(1:10, seed = "#a388b5"), "#101010")
Run the code above in your browser using DataLab