tests/testthat/test-palettes.R

test_that("palettes have correct lengths and error handling", {
  for (pal in valid_palettes()) {
    expect_length(okcolors(pal, 4), 4)
  }
  expect_error(okcolors("unknown", 3))
})

Try the okcolors package in your browser

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

okcolors documentation built on June 8, 2025, 9:42 p.m.