| register_palette | R Documentation |
Adds a named palette to the highdir palette registry so it can be
referenced by name wherever colours are accepted
(e.g. hd_opts(colors = "my_palette")). This function is evaluated
when loading a file in zzz.R file.
register_palette(name, colors)
name |
Character. Unique palette identifier. |
colors |
Non-empty character vector of CSS/hex colour strings. |
Built-in palettes registered at package load time:
| Name | Description |
"hdir" | Helsedirektoratet 10-colour brand palette |
"hdir2" | 2-colour teal / purple pair |
name, invisibly.
register_palette("blues", c("#084594", "#2171b5", "#4292c6", "#6baed6"))
get_palette("blues")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.