Package 'ghibli'

Title: Studio Ghibli Colour Palettes
Description: Colour palettes inspired by Studio Ghibli <https://en.wikipedia.org/wiki/Studio_Ghibli> films, ported to R for your enjoyment.
Authors: Ewen Henderson [aut, cre] , Danielle Desrosiers [ctb], Michael Chirico [ctb]
Maintainer: Ewen Henderson <[email protected]>
License: MIT + file LICENSE
Version: 0.3.4
Built: 2025-02-11 04:27:23 UTC
Source: https://github.com/ewenme/ghibli

Help Index


Continuous scales to use for ggplot2

Description

These functions provide the option to use ghibli colours inside continuous palettes with the 'ggplot2' 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 = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) +
    geom_point() +
    scale_colour_ghibli_c("PonyoMedium")
}

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")

Complete list of available ghibli palettes

Description

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

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.


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.

Examples

if (require('ggplot2')) {

  ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species)) +
    geom_point() +
    scale_colour_ghibli_d("PonyoMedium")
}