Package 'Paris2024Colours'

Title: Color Palettes Inspired by Paris 2024 Olympic and Paralympic Games
Description: Palettes inspired by Paris 2024 Olympic and Paralympic Games for data visualizations. Length of color palettes is configurable.
Authors: Maxime Kuntz [aut, cre]
Maintainer: Maxime Kuntz <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0.9000
Built: 2024-11-18 05:09:17 UTC
Source: https://github.com/maximekuntz/paris2024colours

Help Index


Paris 2024 palette generator

Description

Paris 2024 palette generator

Usage

paris2024_palette(name, n, type = c("discrete", "continuous"), reverse = FALSE)

Arguments

name

Name of the colour palette. Options are Logo, OlympicRings, ParalympicAgitos, GamesLook, Generation2024, Impact2024, TerreDeJeux, Tickets and Flame.

n

Number of colours in the palette. Palettes have 2 to 5 colours that can be used as a discrete palette. To use more, use a continuous palette.

type

Usage of palette as "continuous" or "discrete". Continuous usage interpolates between colors to create a scale of values. If omitted, function assumes continuous if n > length of palette, and discrete if n < length of palette.

reverse

Whether to reverse colour palette (TRUE) or not (FALSE, default).

Value

A vector of colours.

Examples

paris2024_palette("GamesLook", n = 6, type = "continuous")
paris2024_palette("Logo", 2)
paris2024_palette("OlympicRings")
paris2024_palette("OlympicRings", reverse = TRUE)

Complete list of palettes

Description

Use paris2024_palette to construct palettes of desired length.

Usage

paris2024_palettes

Format

An object of class list of length 9.


Palette printer

Description

Palette printer

Usage

## S3 method for class 'palette'
print(x, ...)

Arguments

x

A palette

...

...

Value

An image of the palette


Paris 2024 palettes for plotting with ggplot2

Description

Function for using Paris2024Colours colours schemes in ggplot2.

Usage

scale_colour_paris2024(type = c("discrete", "continuous"), ...)

scale_color_paris2024(type = c("discrete", "continuous"), ...)

Arguments

type

Usage of palette as "continuous" or "discrete". Continuous usage interpolates between colours to create a scale of values.

...

Other arguments passed on to scale_colour_paris2024_d or scale_colour_paris2024_c.

Value

A function that returns a colour scale.


Paris 2024 palettes for plotting with ggplot2

Description

Function for using Paris2024Colours colours schemes in ggplot2. Use scale_colour_paris2024_d and scale_fill_paris2024_d for discrete scales, and use scale_colour_paris2024_c and scale_fill_paris2024_c for continuous scales.

Usage

scale_colour_paris2024_c(name, reverse = FALSE, ...)

scale_color_paris2024_c(name, reverse = FALSE, ...)

Arguments

name

Name of the colour palette. Options are Logo, OlympicRings, ParalympicAgitos, GamesLook, Generation2024, Impact2024, TerreDeJeux, Tickets and Flame.

reverse

Whether to reverse colour palette (TRUE) or not (FALSE, default).

...

Other arguments passed on to scale_color_gradientn

Value

A function that returns a continuous colour scale.

Examples

library(ggplot2)
ggplot2::ggplot(
  data = iris, aes(x = Sepal.Width, y = Sepal.Length, colour = Sepal.Length)
) +
  geom_point() +
  scale_colour_paris2024_c("GamesLook")

Paris 2024 palettes for plotting with ggplot2

Description

Function for using Paris2024Colours colours schemes in ggplot2. Use scale_colour_paris2024_d and scale_fill_paris2024_d for discrete scales, and use scale_colour_paris2024_c and scale_fill_paris2024_c for continuous scales.

Usage

scale_colour_paris2024_d(name, reverse = FALSE, ...)

scale_color_paris2024_d(name, reverse = FALSE, ...)

Arguments

name

Name of the colour palette. Options are Logo, OlympicRings, ParalympicAgitos, GamesLook, Generation2024, Impact2024, TerreDeJeux, Tickets and Flame.

reverse

Whether to reverse colour palette (TRUE) or not (FALSE, default).

...

Other arguments passed on to discrete_scale

Value

A function that returns a discrete colour scale.

Examples

library(ggplot2)
ggplot2::ggplot(
  data = iris, aes(x = Sepal.Width, y = Sepal.Length, colour = Species)
) +
  geom_point() +
  scale_colour_paris2024_d("GamesLook")

Paris 2024 palettes for plotting with ggplot2

Description

Function for using Paris2024Colours colours schemes in ggplot2.

Usage

scale_fill_paris2024(type = c("discrete", "continuous"), ...)

Arguments

type

Usage of palette as "continuous" or "discrete". Continuous usage interpolates between colours to create a scale of values.

...

Other arguments passed on to scale_fill_paris2024_d or scale_fill_paris2024_c.

Value

A function that returns a colour scale.


Paris 2024 palettes for plotting with ggplot2

Description

Function for using Paris2024Colours colours schemes in ggplot2. Use scale_colour_paris2024_d and scale_fill_paris2024_d for discrete scales, and use scale_colour_paris2024_c and scale_fill_paris2024_c for continuous scales.

Usage

scale_fill_paris2024_c(name, reverse = FALSE, ...)

Arguments

name

Name of the colour palette. Options are Logo, OlympicRings, ParalympicAgitos, GamesLook, Generation2024, Impact2024, TerreDeJeux, Tickets and Flame.

reverse

Whether to reverse colour palette (TRUE) or not (FALSE, default).

...

Other arguments passed on to scale_color_gradientn

Value

A function that returns a continuous colour scale.


Paris 2024 palettes for plotting with ggplot2

Description

Function for using Paris2024Colours colours schemes in ggplot2. Use scale_colour_paris2024_d and scale_fill_paris2024_d for discrete scales, and use scale_colour_paris2024_c and scale_fill_paris2024_c for continuous scales.

Usage

scale_fill_paris2024_d(name, reverse = FALSE, ...)

Arguments

name

Name of the colour palette. Options are Logo, OlympicRings, ParalympicAgitos, GamesLook, Generation2024, Impact2024, TerreDeJeux, Tickets and Flame.

reverse

Whether to reverse colour palette (TRUE) or not (FALSE, default).

...

Other arguments passed on to discrete_scale

Value

A function that returns a discrete colour scale.

Examples

library(ggplot2)
ggplot2::ggplot(
  data = iris, aes(x = Species, y = Sepal.Length, fill = Species)
) +
  geom_violin() +
  scale_fill_paris2024_d("GamesLook")