Title: Color Palettes from Crayon Boxes
Version: 0.0.3
Description: Provides color palettes based on crayon colors since the early 1900s. Colors are based on various crayon colors, sets, and promotional palettes, most of which can be found at https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors. All palettes are discrete palettes and are not necessarily color-blind friendly. Provides scales for 'ggplot2' for discrete coloring.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.1
URL: https://github.com/christopherkenny/crayons, http://christophertkenny.com/crayons/
BugReports: https://github.com/christopherkenny/crayons/issues
Imports: ggplot2, grDevices, palette
NeedsCompilation: no
Packaged: 2024-03-21 20:50:10 UTC; chris
Author: Christopher T. Kenny ORCID iD [aut, cre]
Maintainer: Christopher T. Kenny <christopherkenny@fas.harvard.edu>
Repository: CRAN
Date/Publication: 2024-03-21 21:20:02 UTC

crayons: Color Palettes from Crayon Boxes

Description

logo

Provides color palettes based on crayon colors since the early 1900s. Colors are based on various crayon colors, sets, and promotional palettes, most of which can be found at https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors. All palettes are discrete palettes and are not necessarily color-blind friendly. Provides scales for 'ggplot2' for discrete coloring.

Author(s)

Maintainer: Christopher T. Kenny christopherkenny@fas.harvard.edu (ORCID)

See Also

Useful links:


Crayons Color Palettes

Description

Crayon colors, based on common Crayola colors. Palettes build from Wikipedia

Usage

crayons

Format

list of palette::palette vectors

Details

Included palettes:

Examples

plot(crayons$billionth)
plot(crayons$color_n_smell)
plot(crayons$colors_of_the_world)
plot(crayons$construction_paper)
plot(crayons$fluorescent)
plot(crayons$gel_fx)
plot(crayons$gem_tones)
plot(crayons$heads_n_tails)
plot(crayons$magic_scent)
plot(crayons$metallic_fx)
plot(crayons$mini_twistables)
plot(crayons$modern)
plot(crayons$munsell)
plot(crayons$multicultural)
plot(crayons$no_48)
plot(crayons$no_64)
plot(crayons$original)
plot(crayons$pearl)
plot(crayons$pearl_brite)
plot(crayons$silly_scents)
plot(crayons$silver_swirls)
plot(crayons$standard)
plot(crayons$standard16)
plot(crayons$standard24)
plot(crayons$standard32)
plot(crayons$standard64)
plot(crayons$star_brite)


Heuristics for Color Distances and Locations

Description

Usage

pick_colors(hex, n)

color_distance(hex)

color_order(hex)

Arguments

hex

a character vector of hexadecimal colors

n

the integer number of desired colors

Value

a character vector that is a subset of hex, or a matrix of distances for color_distance()

Examples

pick_colors(crayons$standard, 10)
color_order(crayons$standard)
color_distance(crayons$standard[1:4])

Crayon Color Scales for ggplot2

Description

Crayon Color Scales for ggplot2

Usage

scale_color_crayons(palette = "standard16", which = NULL, ..., reverse = FALSE)

scale_fill_crayons(palette = "standard16", which = NULL, ..., reverse = FALSE)

scale_colour_crayons(
  palette = "standard16",
  which = NULL,
  ...,
  reverse = FALSE
)

Arguments

palette

palette from names(crayons) to use

which

numeric indices of colors to use. NULL by default.

...

arguments passed on to ggplot2::discrete_scale()

reverse

Should the vector be reversed? Default is FALSE.

Value

A ggplot2::Scale

Examples

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

ggplot2::mpg |>
  ggplot() +
   geom_point(aes(displ, hwy, fill = class), pch = 23, color = 'transparent') +
   scale_fill_crayons(palette = 'original')

mirror server hosted at Truenetwork, Russian Federation.