tests/testthat/test-scale_color_values.R

test_that("`bluebrown_colors()` works", {
  expect_identical(
    as.vector(bluebrown_colors("blue", "brown")),
    c("#5B93AE", "#61381A")
  )
})


test_that("`material_colors()` works", {
  expect_identical(
    as.vector(material_colors("indigo", "lime")),
    c("#3F51B5", "#CDDC39")
  )
})


test_that("`social_colors()` works", {
  expect_identical(
    as.vector(social_colors("dark red", "teal")),
    c("#b92b27", "#00b489")
  )
})

test_that("`see_colors()` works", {
  expect_identical(as.vector(see_colors("indigo", "lime")), c("#303960", "#f7fbe1"))
})

test_that("`flat_colors()` works", {
  expect_identical(as.vector(flat_colors("dark red", "teal")), c("#c0392b", "#16a085"))
})

Try the see package in your browser

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

see documentation built on Nov. 3, 2023, 5:10 p.m.