Skip to content

Commit

Permalink
update RD
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 25, 2024
1 parent 75af49c commit 034eb62
Show file tree
Hide file tree
Showing 23 changed files with 24 additions and 40 deletions.
20 changes: 3 additions & 17 deletions R/scale_color_flat.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ scale_color_flat <- function(palette = "contrast",
}



# Aliases -----------------------------------------------------------------


Expand Down Expand Up @@ -94,13 +93,9 @@ scale_colour_flat_c <- scale_color_flat_c
scale_colour_flat_d <- scale_color_flat_d





# Fill --------------------------------------------------------------------



#' @rdname scale_color_flat
#' @export
scale_fill_flat <- function(palette = "contrast",
Expand Down Expand Up @@ -134,6 +129,7 @@ scale_fill_flat_d <- function(palette = "contrast",
)
}


#' @rdname scale_color_flat
#' @export
scale_fill_flat_c <- function(palette = "contrast",
Expand All @@ -151,14 +147,9 @@ scale_fill_flat_c <- function(palette = "contrast",
}





# Palette --------------------------------------------------------------------




# The palette based on flat design colors: https://www.materialui.co/flatuicolors
flat_colors_list <- c(
`red` = "#e74c3c",

Check warning on line 155 in R/scale_color_flat.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/scale_color_flat.R,line=155,col=3,[keyword_quote_linter] Only quote named arguments to functions if necessary, i.e., if the name is not a valid R symbol (see ?make.names).
Expand Down Expand Up @@ -205,8 +196,6 @@ flat_colors <- function(...) {
}




flat_palettes <- list(
`full` = flat_colors(),
`ice` = flat_colors("purple", "deep purple", "blue", "light blue"),
Expand Down Expand Up @@ -239,9 +228,6 @@ flat_palettes <- list(






#' Flat UI color palette
#'
#' The palette based on [Flat UI](https://materialui.co/flatuicolors).
Expand All @@ -251,10 +237,10 @@ flat_palettes <- list(
#' `"contrast"`, `"light"` (for dark themes), `"black_first"`, `full_original`,
#' or `black_first_original`.
#' @param reverse Boolean indicating whether the palette should be reversed.
#' @param ... Additional arguments to pass to [`colorRampPalette()`][colorRampPalette].
#' @param ... Additional arguments to pass to [`grDevices::colorRampPalette()`].
#'
#' @details This function is usually not called directly, but from within
#' [`scale_color_flat()`][scale_color_flat].
#' [`scale_color_flat()`].
#'
#' @export
palette_flat <- function(palette = "contrast", reverse = FALSE, ...) {
Expand Down
2 changes: 1 addition & 1 deletion R/scale_color_pizza.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ pizza_palettes <- list(
#' @param palette Pizza type. Can be "margherita" (default), "margherita_crust",
#' "diavola" or "diavola_crust".
#' @param reverse Boolean indicating whether the palette should be reversed.
#' @param ... Additional arguments to pass to [`colorRampPalette()`][colorRampPalette].
#' @param ... Additional arguments to pass to [`grDevices::colorRampPalette()`].
#'
#' @details This function is usually not called directly, but from within
#' [`scale_color_pizza()`][scale_color_pizza].
Expand Down
2 changes: 0 additions & 2 deletions R/scale_color_see.R
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,6 @@ palette_see <- function(palette = "contrast", reverse = FALSE, ...) {





# helper -----------------------

.retrieve_palette <- function(palette, palette_list, reverse = FALSE, ...) {
Expand Down
2 changes: 1 addition & 1 deletion R/scale_color_tol.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ tol_colors <- function(..., palette = "bright") {
#' @param order A vector of numbers indicating the order of colors to use
#' (default: `NULL` indicating to use all available colors in order).
#' @param ... For sequential palettes other than `rainbow_discrete`, additional
#' arguments to pass to [`colorRampPalette()`][colorRampPalette].
#' arguments to pass to [`grDevices::colorRampPalette()`].
#'
#' @references
#' Tol, P. (2021). Colour schemes (SRON/EPS Technical Note No. 09-002; Version 3.2).
Expand Down
2 changes: 1 addition & 1 deletion man/palette_bluebrown.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/palette_colorhex.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/palette_flat.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/palette_material.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/palette_metro.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/palette_okabeito.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/palette_pizza.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/palette_see.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/palette_social.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/palette_tol_discrete.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/scale_color_bluebrown.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/scale_color_colorhex.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/scale_color_material.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/scale_color_metro.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/scale_color_okabeito.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/scale_color_pizza.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/scale_color_see.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/scale_color_social.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/scale_color_tol_discrete.Rd

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

0 comments on commit 034eb62

Please sign in to comment.