tests/testthat/_snaps/get_colours.md

With bad colour name errors gracefully

No colour in r2dii.colours::palette_1in1000_plot with a given `colour_name`.
x Possible colour names in the palette: black, white, red, blue, green, yellow, violet, orange, pink, grey.
i You can change the palette by specifying the `palette` argument.

Returns expected vector of hex codes

Code
  get_colours(c("red", "blue"))
Output
  [1] "#F53D3F" "#3d9bf5"

Works with a user-defined palette

[1] "#FFFFFF"


2DegreesInvesting/r2dii.colours documentation built on May 7, 2024, 4:49 p.m.