0% found this document useful (0 votes)
13 views6 pages

Studio Ghibli Color Palettes for R

This document describes the R package 'ghibli' which provides colour palettes inspired by Studio Ghibli films. It contains functions for generating palettes from names of Ghibli films and using them in ggplot2 plots through continuous and discrete colour scales. A list of all available palette names is also included.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views6 pages

Studio Ghibli Color Palettes for R

This document describes the R package 'ghibli' which provides colour palettes inspired by Studio Ghibli films. It contains functions for generating palettes from names of Ghibli films and using them in ggplot2 plots through continuous and discrete colour scales. A list of all available palette names is also included.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Package ‘ghibli’

October 13, 2022


Title Studio Ghibli Colour Palettes
Description Colour palettes inspired by Studio Ghibli <https:
//[Link]/wiki/Studio_Ghibli>
films, ported to R for your enjoyment.
Version 0.3.3
Depends R (>= 2.10)
License MIT + file LICENSE
Encoding UTF-8
LazyData true
Imports grDevices, prismatic
Suggests ggplot2, dplyr, knitr, rmarkdown, testthat, crayon, cowplot,
codemeta
URL [Link]
BugReports [Link]
RoxygenNote 7.2.1
VignetteBuilder knitr
NeedsCompilation no
Author Ewen Henderson [aut, cre] (<[Link]
Danielle Desrosiers [ctb],
Michael Chirico [ctb]
Maintainer Ewen Henderson <ewenhenderson@[Link]>
Repository CRAN
Date/Publication 2022-08-26 [Link] UTC

R topics documented:
ggplot2-scales-continuous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
ghibli_palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
ghibli_palettes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
scale_colour_ghibli_d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1
2 ggplot2-scales-continuous

Index 6

ggplot2-scales-continuous
Continuous scales to use for ggplot2

Description

These functions provide the option to use ghibli colours inside continuous palettes with the ‘gg-
plot2‘ package.

Usage

scale_colour_ghibli_c(name, direction = 1, ...)

scale_color_ghibli_c(name, direction = 1, ...)

scale_fill_ghibli_c(name, direction = 1, ...)

Arguments

name Name of desired palette.


direction Either ‘1‘ or ‘-1‘. If ‘-1‘ the palette will be reversed.
... Arguments to pass on to ‘ggplot2::scale_colour_gradientn()‘ or ‘ggplot2::scale_fill_gradientn()‘

Details

Available palettes are found in ghibli_palettes.

Value

A ‘ScaleContinuous‘ object that can be added to a ‘ggplot‘ object

Examples

if (require('ggplot2')) {

ggplot(iris, aes(x = [Link], y = [Link], colour = [Link])) +


geom_point() +
scale_colour_ghibli_c("PonyoMedium")
}
ghibli_palette 3

ghibli_palette A Studio Ghibli palette generator

Description
These are some color palettes from Studio Ghibli films. All color schemes are derived from Movies
In Color.

Usage
ghibli_palette(name, n, direction = 1, type = c("discrete", "continuous"))

Arguments
name Name of desired palette.
n Number of colors desired. All palettes now only have seven colors. If omitted,
uses all colours.
direction Either ‘1‘ or ‘-1‘. If ‘-1‘ the palette will be reversed.
type Either "continuous" or "discrete". Use continuous if you want to automatically
interpolate between colours.

Value
A vector of colours.

Examples
ghibli_palette("PonyoLight")
ghibli_palette("LaputaMedium")
ghibli_palette("SpiritedDark")
ghibli_palette("MarnieMedium2", 3)

# If you need more colours than normally found in a palette, you


# can use a continuous palette to interpolate between existing
# colours
pal <- ghibli_palette(name = "YesterdayLight", n = 21, type = "continuous")

ghibli_palettes Complete list of available ghibli palettes

Description
A list of all colour palettes to choose from, and preview directly in the console.
4 scale_colour_ghibli_d

Usage

ghibli_palettes

Format

A list of 27 color objects elements.

Details

Pretty print and plot methods are powered by the prismatic package. Each palette is stored as a
color object to enact this behaviour.

See Also

See ghibli_palette to construct palettes of desired length, and colour for constructing color
objects.

scale_colour_ghibli_d Discrete scales to use for ggplot2

Description

These functions provide the option to use ghibli colours inside discrete palettes with the ‘ggplot2‘
package.

Usage

scale_colour_ghibli_d(name, direction = 1, ...)

scale_color_ghibli_d(name, direction = 1, ...)

scale_fill_ghibli_d(name, direction = 1, ...)

Arguments

name Name of desired palette.


direction Either ‘1‘ or ‘-1‘. If ‘-1‘ the palette will be reversed.
... additional arguments to pass to discrete_scale

Details

Available palettes are found in ghibli_palettes.


scale_colour_ghibli_d 5

Examples

if (require('ggplot2')) {

ggplot(iris, aes(x = [Link], y = [Link], colour = Species)) +


geom_point() +
scale_colour_ghibli_d("PonyoMedium")
}
Index

∗ colors
ghibli_palette, 3
∗ datasets
ghibli_palettes, 3

colour, 4

ggplot2-scales-continuous, 2
ghibli_palette, 3, 4
ghibli_palettes, 2, 3, 4

scale_color_ghibli_c
(ggplot2-scales-continuous), 2
scale_color_ghibli_d
(scale_colour_ghibli_d), 4
scale_colour_ghibli_c
(ggplot2-scales-continuous), 2
scale_colour_ghibli_d, 4
scale_fill_ghibli_c
(ggplot2-scales-continuous), 2
scale_fill_ghibli_d
(scale_colour_ghibli_d), 4

Common questions

Powered by AI

In the 'ghibli' palettes framework for R, continuous palettes allow for color interpolation between existing colors, which is useful for representing gradient effects in large datasets. This is achieved using functions like 'scale_colour_ghibli_c'. Discrete palettes, on the other hand, use a set number of distinct colors without interpolation, suitable for categorical data, and utilize functions such as 'scale_colour_ghibli_d'. The choice between continuous and discrete palettes depends on whether the data being visualized is numerical or categorical, respectively .

The 'ghibli_palette' function in R can enhance data visualizations by providing aesthetically pleasing color selections derived from Studio Ghibli films. It allows users to generate palettes by specifying a palette name, number of colors, and whether the palette should be continuous or discrete. This flexibility helps tailor color schemes to the data's needs. Examples of usage include 'ghibli_palette("PonyoLight")' for a default palette, or 'ghibli_palette("MarnieMedium2", 3)' for a reduced color selection. Continuous palettes can be created for more colors than available by setting a higher 'n' parameter and using type "continuous", like 'ghibli_palette(name = "YesterdayLight", n = 21, type = "continuous")' .

Studio Ghibli-inspired color palettes can be utilized in R for data visualization by using the 'ghibli' package, which offers functions to integrate these palettes with the 'ggplot2' package. For continuous scales, you can use functions like 'scale_colour_ghibli_c' and 'scale_fill_ghibli_c'. For discrete scales, 'scale_colour_ghibli_d' and 'scale_fill_ghibli_d' are available. The available palettes are specified in 'ghibli_palettes', and you can pass the name of the desired palette to these functions .

In the 'ghibli' package description, 'lazyData' set to 'true' indicates that the package's data is loaded lazily, meaning it's loaded only when needed, rather than at package startup. This can improve performance by reducing initial memory usage. 'NeedsCompilation', set to 'no', implies that the package does not require C or Fortran code compilation, simplifying installations and updates as there's no need for a compiler. These entries reflect considerations for efficient package management and user convenience .

The main arguments in the 'ghibli_palette' function are 'name', 'n', 'direction', and 'type'. 'Name' specifies the desired palette, affecting the visual identity of the output. 'N' determines the number of colors, impacting the color resolution. 'Direction' allows for reversing the palette order, which can change the focal point of the visualization. 'Type' can be either 'discrete' or 'continuous', determining whether the function interpolates between colors or selects a fixed set, respectively. Collectively, these arguments provide flexibility to tailor palettes for specific visualization needs .

The 'prismatic' package complements the functionality of 'ghibli_palettes' by providing pretty print and plot methods that enhance the presentation of color palettes in R. It allows 'ghibli_palettes' to be effectively manipulated and visualized, making it easier for users to preview and select palettes directly from the console. This integration supports better user experience by providing visual feedback on palette selection, aiding in decision-making for data visualizations .

The 'ghibli' package allows reversing the color palette direction by using the 'direction' argument in its functions, which can be set to either '1' or '-1'. Setting 'direction' to '-1' reverses the order of colors in the chosen palette, which can change the visual emphasis in a data visualization, as earlier or later color positions may convey different levels of intensity or importance .

The 'ghibli' color palettes enhance the aesthetic appeal of visualizations in R by offering unique and carefully curated color schemes inspired by Studio Ghibli films. These palettes provide a storytelling element and vibrant color contrasts that are often lacking in default R palettes. They appeal to visual aesthetics by incorporating colors that convey emotion, serenity, and liveliness, characteristic of Studio Ghibli's artistic style. This uniqueness can set a visualization apart, engaging viewers more effectively than standard palettes, which may not offer the same depth of cultural or emotional context .

The 'ghibli' package lists Ewen Henderson as the author and creator, responsible for the primary development and maintenance of the package. Danielle Desrosiers and Michael Chirico are listed as contributors, suggesting they aided in specific aspects of the package's development or documentation. Henderson likely handles overall package direction and updates, while contributors support enhancements, testing, or documentation efforts, helping ensure the package's robustness and user accessibility .

The suggested packages 'ggplot2' and 'dplyr' enhance the usage of 'ghibli' color palettes by providing advanced data visualization and manipulation capabilities. 'ggplot2' allows the application of 'ghibli' palettes to enhance the aesthetic aspects of charts and plots. 'Dplyr' facilitates data manipulation operations, which can set the stage for effective visualization by ensuring the data is in the right format. Together, these packages enable cleaner, more informative, and visually engaging data presentations when paired with 'ghibli' palettes .

You might also like