knitr::opts_chunk$set( echo = TRUE, collapse = TRUE, comment = '>', fig.path = "figures/", fig.height = 1 )

Transform your R plots and graphics with the magical colors of Sailor Moon! 🌙✨🌸
install.packages("devtools") #If you don't already have devtools installed devtools::install_github("morgansleeper/SailorMoonR")

#Load SailorMoonR library(SailorMoonR)
Functions:
MoonPaletteEnumeration: list all available palettesMoonPaletteIllumination(): generate a sample swatch for a paletteinthenameofthemoon(): use a palette (by having it return its color values)# See all available palettes MoonPaletteEnumeration # See a sample swatch for a palette MoonPaletteIllumination("MoonPrismPower") # Use a palette inthenameofthemoon("MoonPrismPower")
Prism:
If you need more colors than a given palette offers, you can generate a larger palette by adding the prism argument:
#Expand a palette with prism inthenameofthemoon("CrescentBeam", prism=6) MoonPaletteIllumination("MinatoSunset", prism=128)
MoonPaletteIllumination("MoonPrismPower") MoonPaletteIllumination("MoonTiaraAction") MoonPaletteIllumination("MoonHealingEscalation") MoonPaletteIllumination("MoonPrincessHalation") MoonPaletteIllumination("ShabonSpray") MoonPaletteIllumination("ShineAquaIllusion") MoonPaletteIllumination("AkuryoTaisan") MoonPaletteIllumination("FireSoul") MoonPaletteIllumination("SparklingWidePressure") MoonPaletteIllumination("JupiterOakEvolution") MoonPaletteIllumination("VenusLoveMeChain") MoonPaletteIllumination("CrescentBeam") MoonPaletteIllumination("MinatoDaylight") MoonPaletteIllumination("MinatoSunset") MoonPaletteIllumination("MinatoMoonlight") MoonPaletteIllumination("TokyoTower")
inthenameofthemoon("MoonPrismPower")

inthenameofthemoon("MoonTiaraAction")

inthenameofthemoon("MoonHealingEscalation")

inthenameofthemoon("MoonPrincessHalation")

inthenameofthemoon("ShabonSpray")

inthenameofthemoon("ShineAquaIllusion")

inthenameofthemoon("AkuryoTaisan")

inthenameofthemoon("FireSoul")

inthenameofthemoon("SparklingWidePressure")

inthenameofthemoon("JupiterOakEvolution")

inthenameofthemoon("VenusLoveMeChain")

inthenameofthemoon("CrescentBeam")

inthenameofthemoon("MinatoDaylight")

inthenameofthemoon("MinatoSunset")

inthenameofthemoon("MinatoMoonlight")

inthenameofthemoon("TokyoTower")

library(ggplot2) ggplot(distances, aes(x=Planet, y=Distance, fill=Planet)) + geom_col() + xlab("") + ylab("Distance from Sun (AU)") + scale_fill_manual(values = inthenameofthemoon("MoonTiaraAction")) + guides(fill=FALSE)

library(leaflet) #Set up color palette pal <- colorFactor(palette = (col=(inthenameofthemoon("MoonPrismPower"))), domain = locs$Type) #Draw map leaflet(locs) %>% addProviderTiles(providers$CartoDB.Positron) %>% addMarkers(label=~Name) %>% addCircles(radius=150, weight=1, color=~pal(Type)) %>% addLegend("topright", pal = pal, values = ~locs$Type, title = "Location type", opacity = .4) %>% addMiniMap("bottomright", width=100, height=100, tiles = providers$CartoDB.Positron)

library(seewave) spectro(tico, palette=colorRampPalette(inthenameofthemoon("MinatoSunset")), collevels=seq(-50,0,1), osc=TRUE, flim=c(2,6), tlim=c(0.5,1.4), heights=c(4,2))

image(volcano, col=inthenameofthemoon("MinatoMoonlight", prism=32), axes=FALSE) title(sub="Maungawhau", family = "sans", line=0.5, font.sub=2, cex.sub=1.2)

Project inspired by Karthik Ram's Wes Anderson Palettes package.
Written using and pairs nicely with sailorhg's fairyfloss theme (RStudio version available here).
Sailor Moon © Naoko Takeuchi.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.