Visibly is a handful of functions I use for color palettes, themes, etc. in R. Inside you will find:

  • some ready-made palettes, e.g. based on R blue and Stan red
  • a function to quickly and easily create palettes with using colortools::complementary colortools::adjacent etc.
  • clean, web-friendly themes for ggplot2 and plotly
  • a function to interact with colorgorical
  • coefficient plots for fixed and random effects, plotting of GAM results.


Install the development version directly from GitHub:

Visibly is currently in its early stages, so more may be added soon. For some additional palettes for those fond of another time, you might be interested in NineteenEightyR.


Create a palette from a single starting point. This requires the colortools package to create equally spaced colors.

Plot it to get a feel for things.

create_palette('#ff5500', plot = T)

[1] "#ff5500"

[1] "#FF5500" "#00AAFF"

[1] "#FF5500" "#FFD500" "#FF002B"

[1] "#FF5500" "#00FFD4" "#002BFF"

[1] "#FF5500" "#00FF55" "#5500FF"

[1] "#FF5500" "#2AFF00" "#00AAFF" "#D500FF"

[1] "#FF5500" "#AAFF00" "#00AAFF" "#5500FF"

One of the built-in palettes is based on R’s blue. Others are based on Stan’s red, plotly’s base colors, and the red-blue palette from RColorBrewer.

A clean theme for plotly.

mtcars %>% 
  plot_ly(x=~wt, y=~mpg, color=~cyl) %>% 
  add_markers(marker=list(size=15)) %>% 

Visualize a correlation matrix via factor analysis.

data('bfi', package = 'visibly')
cor_matrix = cor(bfi, use='pair')

Plot some model coefficients. Requires the scico package.

fit_lm = lm(mpg ~ ., mtcars)

Plot GAM results


See the intro for more.