README.md

Palettes inspired by “La La Land”

I think La La Land’s use of color is breathtakingly beautiful, so I made an R package of palettes based on stills from the film. I used a combination of online image color pickers and Susie Lu’s Viz Palette to build them.

Poking around the wesanderson package really, really helped me!

"It's conflict and it's compromise, and ... it's very, very exciting!" - Sebastian on jazz, but also me making these palettes

Installing and loading the package:

devtools::install_github("simranvatsa/lalaland")
library(lalaland)

The functions:

show_lll_palette(name, n): prints the selected palette/subsection of palette as an image

lll_palette(name, n): generates a vector containing hex codes for the selected palette/subsection of palette

California:

show_lll_palette("California")

City Of Stars #1:

show_lll_palette("CityOfStars1")

City Of Stars #2:

show_lll_palette("CityOfStars2")

Epilogue #1:

show_lll_palette("Epilogue1")

Epilogue #2:

show_lll_palette("Epilogue2")

LighthouseCafe:

show_lll_palette("LighthouseCafe")

LovelyNight:

show_lll_palette("LovelyNight")

Sebs:

show_lll_palette("Sebs")

Summer:

show_lll_palette("Summer")

Traffic:

show_lll_palette("Traffic")

Using the palettes!

library(ggplot2)

ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color = Species)) +
  geom_point() +
  scale_color_manual(values = lll_palette("CityOfStars1", c(2,3,4))) +
  theme_minimal() +
  labs(title = "Sepal and petal lengths for the iris dataset, colored by species")

ggplot(diamonds[diamonds$carat < 3, ], aes(x = carat, fill = cut)) +
  geom_histogram(bins = 20) +
  scale_fill_manual(values = lll_palette("Sebs")) +
  theme_minimal() +
  labs(title = "Distribution of carat values of diamonds")

ggplot(mpg, aes(x = class, fill = as.factor(cyl))) +
  geom_bar() +
  scale_fill_manual(values = lll_palette("LighthouseCafe", c(1,3,2,4))) +
  theme_minimal()



simranvatsa/lalaland documentation built on May 22, 2019, 6:34 p.m.