Learn R Programming

crayons

crayons provides crayon-based color palettes. For nostalgic uses, consider combining with ggrough or roughsf.

These palettes are not necessarily (and unlikely to be) color-blind friendly. For public-facing work, consider a color-blind friendly package, such as Cory McCartan’s wacolors.

Installation

crayons is available on CRAN and can be installed using:

install.packages('crayons')

You can also install the development version of crayons from GitHub with:

remotes::install_github('christopherkenny/crayons')

Example

crayons provides basic ggplot2 scales for fill and color (also aliased as colour).

library(ggplot2)
library(crayons)

mpg |>
  ggplot() + 
  geom_point(aes(displ, hwy, colour = class)) + 
  scale_color_crayons(palette = 'original')

crayons has many palettes, based on current and long-gone crayon packs.

Copy Link

Version

Install

install.packages('crayons')

Monthly Downloads

222

Version

0.0.3

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

March 21st, 2024

Functions in crayons (0.0.3)

pick_colors

Heuristics for Color Distances and Locations
scale_color_crayons

Crayon Color Scales for ggplot2
crayons-package

crayons: Color Palettes from Crayon Boxes
crayons

Crayons Color Palettes