knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of splattr is to provide some HTML-based tools for viewing and evaluating color-palettes. It is strongly inspired by the approach that Mike Bostock takes to show d3 color-palettes in Observable.
You can install the development version of splattr from GitHub with:
# install.packages("devtools") devtools::install_github("ijlyttle/splattr")
These examples are not run in the README because I am not able to get swatch()
and ramp()
to print outside of an HTML context.
You can see them in action in the get-started article.
library("splattr") colors <- colorspace::terrain_hcl(10) swatch(colors) ramp(colors)
Please note that the 'splattr' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.