Skip to content

Commit

Permalink
Add palette ParalympicAgitos
Browse files Browse the repository at this point in the history
  • Loading branch information
maximekuntz committed Jun 22, 2024
1 parent b4b44ce commit b102e8d
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 23 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Paris2024Colours (development version)

* Add new palette: ParalympicAgitos

# Paris2024Colours 0.2.0

* Modify palette GamesLook
Expand Down
1 change: 1 addition & 0 deletions R/colours.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
paris2024_palettes <- list(
Logo = c("#D7C378", "#000000"),
OlympicRings = c("#0078D0", "#FFB114", "#000000", "#00A651", "#F0282D"),
ParalympicAgitos = c("#F0252D", "#0078D0", "#00A651"),
GamesLook = c("#F1ABC9", "#D9C47A", "#61CFFF", "#003561", "#2393CD"),
Impact2024 = c("#00004D", "#3EDE8E", "#006AFF"),
Generation2024 = c("#00004D", "#FAB900", "#006AFF"),
Expand Down
5 changes: 3 additions & 2 deletions R/functions.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#' Paris 2024 palette generator
#'
#' @param name Name of the colour palette. Options are \code{Logo},
#' \code{OlympicRings}, \code{GamesLook}, \code{Generation2024},
#' \code{Impact2024}, \code{TerreDeJeux}, \code{Tickets} and \code{Flame}.
#' \code{OlympicRings}, \code{ParalympicAgitos}, \code{GamesLook},
#' \code{Generation2024}, \code{Impact2024}, \code{TerreDeJeux}, \code{Tickets}
#' and \code{Flame}.
#' @param 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.
#' @param type Usage of palette as "continuous" or "discrete". Continuous usage
Expand Down
20 changes: 12 additions & 8 deletions R/scales.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
#' \code{\link{scale_fill_paris2024_c}} for continuous scales.
#'
#' @param name Name of the colour palette. Options are \code{Logo},
#' \code{OlympicRings}, \code{GamesLook}, \code{Generation2024},
#' \code{Impact2024}, \code{TerreDeJeux}, \code{Tickets} and \code{Flame}.
#' \code{OlympicRings}, \code{ParalympicAgitos}, \code{GamesLook},
#' \code{Generation2024}, \code{Impact2024}, \code{TerreDeJeux}, \code{Tickets}
#' and \code{Flame}.
#' @param reverse Whether to reverse colour palette (TRUE) or not (FALSE,
#' default).
#' @param ... Other arguments passed on to \code{\link[ggplot2]{discrete_scale}}
Expand Down Expand Up @@ -53,8 +54,9 @@ scale_color_paris2024_d <- scale_colour_paris2024_d
#' \code{\link{scale_fill_paris2024_c}} for continuous scales.
#'
#' @param name Name of the colour palette. Options are \code{Logo},
#' \code{OlympicRings}, \code{GamesLook}, \code{Generation2024},
#' \code{Impact2024}, \code{TerreDeJeux}, \code{Tickets} and \code{Flame}.
#' \code{OlympicRings}, \code{ParalympicAgitos}, \code{GamesLook},
#' \code{Generation2024}, \code{Impact2024}, \code{TerreDeJeux}, \code{Tickets}
#' and \code{Flame}.
#' @param reverse Whether to reverse colour palette (TRUE) or not (FALSE,
#' default).
#' @param ... Other arguments passed on to
Expand Down Expand Up @@ -96,8 +98,9 @@ scale_color_paris2024_c <- scale_colour_paris2024_c
#' \code{\link{scale_fill_paris2024_c}} for continuous scales.
#'
#' @param name Name of the colour palette. Options are \code{Logo},
#' \code{OlympicRings}, \code{GamesLook}, \code{Generation2024},
#' \code{Impact2024}, \code{TerreDeJeux}, \code{Tickets} and \code{Flame}.
#' \code{OlympicRings}, \code{ParalympicAgitos}, \code{GamesLook},
#' \code{Generation2024}, \code{Impact2024}, \code{TerreDeJeux}, \code{Tickets}
#' and \code{Flame}.
#' @param reverse Whether to reverse colour palette (TRUE) or not (FALSE,
#' default).
#' @param ... Other arguments passed on to \code{\link[ggplot2]{discrete_scale}}
Expand Down Expand Up @@ -138,8 +141,9 @@ scale_fill_paris2024_d <- function(name, reverse = FALSE, ...) {
#' \code{\link{scale_fill_paris2024_c}} for continuous scales.
#'
#' @param name Name of the colour palette. Options are \code{Logo},
#' \code{OlympicRings}, \code{GamesLook}, \code{Generation2024},
#' \code{Impact2024}, \code{TerreDeJeux}, \code{Tickets} and \code{Flame}.
#' \code{OlympicRings}, \code{ParalympicAgitos}, \code{GamesLook},
#' \code{Generation2024}, \code{Impact2024}, \code{TerreDeJeux}, \code{Tickets}
#' and \code{Flame}.
#' @param reverse Whether to reverse colour palette (TRUE) or not (FALSE,
#' default).
#' @param ... Other arguments passed on to
Expand Down
4 changes: 4 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ paris2024_palette("Logo")
paris2024_palette("OlympicRings")
```

```{r paralympic_agitos}
paris2024_palette("ParalympicAgitos")
```

```{r games_look}
paris2024_palette("GamesLook")
```
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ library("Paris2024Colours")

# See all palettes
names(paris2024_palettes)
#> [1] "Logo" "OlympicRings" "GamesLook" "Impact2024"
#> [5] "Generation2024" "TerreDeJeux" "Tickets" "Flame"
#> [1] "Logo" "OlympicRings" "ParalympicAgitos" "GamesLook"
#> [5] "Impact2024" "Generation2024" "TerreDeJeux" "Tickets"
#> [9] "Flame"
```

## Palettes
Expand All @@ -57,6 +58,12 @@ paris2024_palette("OlympicRings")

<img src="man/figures/README-olympic_rings-1.png" width="100%" />

``` r
paris2024_palette("ParalympicAgitos")
```

<img src="man/figures/README-paralympic_agitos-1.png" width="100%" />

``` r
paris2024_palette("GamesLook")
```
Expand Down
Binary file added man/figures/README-paralympic_agitos-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions man/paris2024_palette.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/paris2024_palettes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions man/scale_colour_paris2024_c.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions man/scale_colour_paris2024_d.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions man/scale_fill_paris2024_c.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions man/scale_fill_paris2024_d.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b102e8d

Please sign in to comment.