inst/tinytest/test-25-distance.R

expect_equal(round(distance(c("red","green","blue"),"red")), c(0,87,53))
expect_error(distance("red", c("red","green","blue")), "Reference should be a single shade")
expect_equal(contrast("black","white"), 21)

Try the shades package in your browser

Any scripts or data that you put into this service are public.

shades documentation built on July 3, 2026, 1:07 a.m.