knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  fig.height = 2,
  fig.width = 3
)

Build Status

Render README

pkgdown

R build status

What?

This is a collection of colour palettes based on classic rock album covers.

Not all of the artists are 'rock', but they appeared in lists of classic rock album covers and the internet is never wrong, is it ;)

Other albums were chosen either for their striking covers (in terms of colour), because they are bona fide rock classics, or just because I like them.

Featuring:

Why?

Because this repo of Metallica inspired palettes has been received quite well on various social media platforms, and I figured that there were other albums with interesting covers that might provide more scope for data visualisation purposes.

Installation

This will probably not go to CRAN, so please install using the remotes package.

#library(remotes)
#remotes::install_github("johnmackintosh/rockthemes")
library(rockthemes)
library(ggplot2)
library(dplyr)
library(scales)
library(gapminder)

Palettes and Themes

rock_palette("alice")
rock_palette("californication")
rock_palette("coltrane")
rock_palette("deelite")
rock_palette("electric")
rock_palette("facelift")
rock_palette("faithnomore")
rock_palette("harvey")
rock_palette("heep")
rock_palette("hellawaits")
rock_palette("husker")
rock_palette("janelle")
rock_palette("melloncollie")
rock_palette("miles")
rock_palette("muse")
rock_palette("nodoubt")
rock_palette("peacesells")
rock_palette("secondlaw")
rock_palette("siamesedream")
rock_palette("swift")
rock_palette("zeppelin")

Palettes in action

facet <- gapminder %>%
  filter(continent != "Americas") %>%
  group_by(continent, year) %>%
  summarise(pop = sum(as.numeric(pop)), .groups = 'drop_last') %>% 
  ungroup()

#Alice

ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("alice")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "alice",
       x = NULL, y = NULL)

# Californication
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("californication")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "californication",
       x = NULL, y = NULL)

# Coltrane

ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("coltrane")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "coltrane",
       #subtitle = "Relative population growth by continent,1952-2007", 
       x = NULL, y = NULL)

# Deelite
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("deelite")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "deelite",
       #subtitle = "Relative population growth by continent,1952-2007", 
       x = NULL, y = NULL)

# Electric
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("electric")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "electric",
       #subtitle = "Relative population growth by continent,1952-2007", 
       x = NULL, y = NULL)


# Facelift
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("facelift")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "facelift",
       #subtitle = "Relative population growth by continent,1952-2007", 
       x = NULL, y = NULL)

# FNM
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("faithnomore")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "faithnomore",
       x = NULL, y = NULL)

# Harvey
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("harvey")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "harvey",
       x = NULL, y = NULL)
# Heep
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("heep")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "heep",
       x = NULL, y = NULL)

# Hell Awaits
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("hellawaits")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "hellawaits",
       x = NULL, y = NULL)


# Husker
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("husker")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "husker",
       x = NULL, y = NULL)


# Janelle
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("janelle")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "janelle",
       x = NULL, y = NULL)


# melloncollie
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("melloncollie")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "melloncollie",
       x = NULL, y = NULL)


# miles
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("miles")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "miles",
       x = NULL, y = NULL)

# muse
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("muse")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "muse",
       x = NULL, y = NULL)


# nodoubt
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("nodoubt")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "nodoubt",
       x = NULL, y = NULL)


# Peace Sells... But Who's Buying
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("peacesells")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "peacesells",
       x = NULL, y = NULL)

# secondlaw
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("secondlaw")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "secondlaw",
       x = NULL, y = NULL)

# siamesedream
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("siamesedream")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "siamesedream",
       x = NULL, y = NULL)


# swift
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("swift")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "swift",
       x = NULL, y = NULL)

# zeppelin
ggplot() +
  geom_area(data = facet, aes(x = year, y = pop, fill = continent)) +
  facet_wrap(~ continent, scales = "free", ncol = 2) + 
  scale_fill_manual(values = rock_palette("zeppelin")) +
  geom_hline(yintercept = 0, size = 1, colour = "#333333") +
  theme_void() +
  theme(legend.position = "none",
        axis.text.x = element_blank(),
        axis.text.y = element_blank()) +
  labs(title = "zeppelin",
       x = NULL, y = NULL)

Longer colour palettes, more suited for ggplot2 use

The following palettes share the same inspirations, but there are more colours, which hopefully increases their utility for data visualisation.

data <- gapminder::gapminder %>% 
    filter(country %in% c("France", "Germany", "Ireland", "Italy", 
                        "Japan", "Norway", "Belarus", "United Kingdom",
                        "Peru", "Spain"))  %>% 
    mutate(year = as.Date(paste(year, "-01-01", sep = "", format = '%Y-%b-%d')))



ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_californication() + 
    ggtitle(label = "scale_fill_californication")  

ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_coltrane() + 
    ggtitle(label = "scale_fill_coltrane")  

ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_deelite() + 
    ggtitle(label = "scale_fill_deelite") 

ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_dirt() + 
    ggtitle(label = "scale_fill_dirt") 

ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_electric() + 
    ggtitle(label = "scale_fill_electric")  

ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_facelift() + 
    ggtitle(label = "scale_fill_facelift")  


ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_harvey() + 
    ggtitle(label = "scale_fill_harvey")  

ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_heep() + 
    ggtitle(label = "scale_fill_heep")  

ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_hellawaits() + 
    ggtitle(label = "scale_fill_hellawaits")  

ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_husker() + 
    ggtitle(label = "scale_fill_husker")

ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_janelle() + 
    ggtitle(label = "scale_fill_janelle")


ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_melloncollie() + 
    ggtitle(label = "scale_fill_melloncollie")


ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_muse() + 
    ggtitle(label = "scale_fill_muse")


ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_nodoubt() + 
    ggtitle(label = "scale_fill_nodoubt")


ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_peacesells() + 
    ggtitle(label = "scale_fill_peacesells")

ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_real_thing() + 
    ggtitle(label = "scale_fill_realthing")

ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_siamesedream() + 
    ggtitle(label = "scale_fill_siamesedream")


ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_second_law() + 
    ggtitle(label = "scale_fill_second_law")


ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_taylor() + 
    ggtitle(label = "scale_fill_taylor")

ggplot(data = data, aes(x = year, y = gdpPercap, fill = country)) +
    geom_area(alpha = 0.8) +
    theme_void() + 
    theme(legend.position = "none") + 
    scale_fill_ledzep() + 
    ggtitle(label = "scale_fill_ledzep")

Credit

Thanks to Ryo for the tvthemes package which helped me get this off the ground quickly

Code of Conduct

Please note that the rockthemes project is released with a Contributor Code of Conduct. By contributing to this project you agree to abide by its terms.

Contributing

See the Contribution guide



johnmackintosh/rockthemes documentation built on Jan. 16, 2024, 5:05 a.m.