docs + tests
Some checks are pending
pkgdown.yaml / pkgdown (push) Waiting to run

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-04-15 08:55:35 +02:00
commit e463fa0670
No known key found for this signature in database
11 changed files with 365 additions and 133 deletions

View file

@ -0,0 +1,15 @@
test_that("Contrasting works", {
colors <- c("#F2F2F2", "blue","red","black","white","gray35")
expect_snapshot(
contrast_text(colors)
)
expect_snapshot(
contrast_text(colors,light_text = "blue",dark_text = "grey10", method = "relative", threshold = .1)
)
expect_snapshot(
contrast_text(colors,light_text = "blue",dark_text = "grey10", method = "perceived", threshold = .7)
)
})