Skip to content

Commit

Permalink
trying sommat else
Browse files Browse the repository at this point in the history
  • Loading branch information
dcooley committed Dec 3, 2020
1 parent 7ba8b24 commit 60289d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions inst/include/colourvalues/palettes/ylorrd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ namespace palette {
0.109803921568627,0.149019607843137,0.149019607843137
};

const Rcpp::List ylorrd = Rcpp::List::create(
_["r"] = ylorrd_red,
_["g"] = ylorrd_green,
_["b"] = ylorrd_blue
);
inline Rcpp::DataFrame ylorrd() {
return Rcpp::DataFrame::create(
_["r"] = ylorrd_red,
_["g"] = ylorrd_green,
_["b"] = ylorrd_blue
);
}

} // namespace palette
} // namepsace colourvalues

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-palettes.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ test_that("palettes are returned", {
all_palettes <- color_palettes()
expect_true( length(all_palettes) == 52 )

for( palette in all_palettes[10:length(all_palettes)] ) {
# print(palette)
for( palette in all_palettes[1:7] ) {
#print(palette)
expect_silent( colour_values(1, palette = palette ))
res <- colourvalues::get_palette( palette )
expect_true( ncol( res ) == 3 & nrow( res ) == 256 )
Expand Down

0 comments on commit 60289d9

Please sign in to comment.