tests/testthat/testColorLength.R

library(testthat)
library(colorspace)
library(colorpatch)

context("Color Length")

test_that("The length of a color palette", {
  expect_equal(length(RGB()), 0)
  expect_equal(length(hex2RGB(heat_hcl(10))), 10)
})

Try the colorpatch package in your browser

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

colorpatch documentation built on May 1, 2019, 10:28 p.m.