Crayon colors in R
Last night I was working on a talk on creating effective graphs. Mostly, I needed to update the colors, as there’d been some gaudy ones in its previous form (e.g., slide 22).
I usually pick colors using the crayons in the Mac Color Picker. But that has just 40 crayons, and I wanted more choices.
That led me to the list of Crayola crayon colors on wikipedia. I wrote a ruby script to grab the color names and codes and added them to my R/broman package.
brocolors("crayons") to get the list of colors. For example, to get “Tickle Me Pink, &rdqou; use
pink <- brocolors("crayons")["Tickle Me Pink"]
plot_crayons() to get the following summary plot of the colors:
You can install the R/broman package using
install_github in devtools, (specifically,
install_github("kbroman/broman")) or wait a day or two and the version with this code will be on CRAN.
offers daily e-mail updates
news and tutorials
on topics such as: Data science
, Big Data, R jobs
, visualization (ggplot2
), programming (RStudio
, Web Scraping
) statistics (regression
, time series
) and more...
If you got this far, why not subscribe for updates
from the site? Choose your flavor: e-mail
, or facebook