Title: | Color Palettes Inspired by Paris 2024 Olympic and Paralympic Games |
Version: | 0.2.0 |
Description: | Palettes inspired by Paris 2024 Olympic and Paralympic Games for data visualizations. Length of color palettes is configurable. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.1 |
URL: | https://github.com/maximekuntz/Paris2024Colours, https://maximekuntz.github.io/Paris2024Colours/ |
BugReports: | https://github.com/maximekuntz/Paris2024Colours/issues |
Suggests: | testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
Imports: | ggplot2 |
NeedsCompilation: | no |
Packaged: | 2024-06-20 20:55:07 UTC; maxim |
Author: | Maxime Kuntz |
Maintainer: | Maxime Kuntz <maxime.kuntz75@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2024-06-20 21:10:02 UTC |
Paris2024Colours: 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.
Author(s)
Maintainer: Maxime Kuntz maxime.kuntz75@gmail.com (ORCID)
See Also
Useful links:
Report bugs at https://github.com/maximekuntz/Paris2024Colours/issues
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 |
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 8.
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
|
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 |
reverse |
Whether to reverse colour palette (TRUE) or not (FALSE, default). |
... |
Other arguments passed on to
|
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 |
reverse |
Whether to reverse colour palette (TRUE) or not (FALSE, default). |
... |
Other arguments passed on to |
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 |
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 |
reverse |
Whether to reverse colour palette (TRUE) or not (FALSE, default). |
... |
Other arguments passed on to
|
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 |
reverse |
Whether to reverse colour palette (TRUE) or not (FALSE, default). |
... |
Other arguments passed on to |
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")