Skip to content

Commit

Permalink
Even more color-related adjustements
Browse files Browse the repository at this point in the history
  • Loading branch information
sambtalcott committed Oct 31, 2023
1 parent b44899b commit ecd69a6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vignettes/visualization-cookbook.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,17 @@ The `tntpr` package includes functions to allow you to easily use TNTP brand col

### Colors

The primary function you'll use is `tntp_colors()`, which takes in human-friendly color names as arguments and returns a character vector of the equivalent hex code:
The primary function you'll use is `tntp_colors()`, which takes in human-friendly color names as arguments and returns a character vector of the equivalent hex codes:

```{r}
tntp_colors("green", "mint")
```
A companion function is `show_tntp_colors()`, which will make a quick display of the given colors in the plot window. You can use `show_tntp_colors()` with no arguments to display all available colors and names:
A companion function is `show_tntp_colors()`, which will make a quick display of the given colors in the plot window.
```{r}
show_tntp_colors('green', 'moss', 'mint')
```

You can also use `show_tntp_colors()` with no color arguments to display all available colors and names:
```{r}
# Note: the cex_label parameter is used to adjust the relative font size
show_tntp_colors(cex_label = 0.7)
Expand Down

0 comments on commit ecd69a6

Please sign in to comment.