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] |
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 |
These functions provide the option to use ghibli colours inside continuous palettes with the 'ggplot2' package.
scale_colour_ghibli_c(name, direction = 1, ...) scale_color_ghibli_c(name, direction = 1, ...) scale_fill_ghibli_c(name, direction = 1, ...)
scale_colour_ghibli_c(name, direction = 1, ...) scale_color_ghibli_c(name, direction = 1, ...) scale_fill_ghibli_c(name, direction = 1, ...)
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()' |
Available palettes are found in ghibli_palettes
.
A 'ScaleContinuous' object that can be added to a 'ggplot' object
if (require('ggplot2')) { ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) + geom_point() + scale_colour_ghibli_c("PonyoMedium") }
if (require('ggplot2')) { ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) + geom_point() + scale_colour_ghibli_c("PonyoMedium") }
These are some color palettes from Studio Ghibli films. All color schemes are derived from Movies In Color.
ghibli_palette(name, n, direction = 1, type = c("discrete", "continuous"))
ghibli_palette(name, n, direction = 1, type = c("discrete", "continuous"))
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. |
A vector of colours.
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_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")
A list of all colour palettes to choose from, and preview directly in the console.
ghibli_palettes
ghibli_palettes
A list of 27 color
objects elements.
Pretty print and plot methods are powered by the prismatic
package. Each palette is stored as a color
object to enact this behaviour.
See ghibli_palette
to construct palettes of desired length, and
colour
for constructing color objects.
These functions provide the option to use ghibli
colours inside discrete
palettes with the 'ggplot2' package.
scale_colour_ghibli_d(name, direction = 1, ...) scale_color_ghibli_d(name, direction = 1, ...) scale_fill_ghibli_d(name, direction = 1, ...)
scale_colour_ghibli_d(name, direction = 1, ...) scale_color_ghibli_d(name, direction = 1, ...) scale_fill_ghibli_d(name, direction = 1, ...)
name |
Name of desired palette. |
direction |
Either '1' or '-1'. If '-1' the palette will be reversed. |
... |
additional arguments to pass to discrete_scale |
Available palettes are found in ghibli_palettes
.
if (require('ggplot2')) { ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species)) + geom_point() + scale_colour_ghibli_d("PonyoMedium") }
if (require('ggplot2')) { ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species)) + geom_point() + scale_colour_ghibli_d("PonyoMedium") }