Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add preliminary single colour sequential colours #34

Merged
merged 1 commit into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ importFrom(ggplot2,margin)
importFrom(ggplot2,theme)
importFrom(ggplot2,theme_minimal)
importFrom(grDevices,col2rgb)
importFrom(grDevices,colorRampPalette)
importFrom(grDevices,rgb)
importFrom(graphics,image)
importFrom(graphics,par)
Expand Down
2 changes: 1 addition & 1 deletion R/motif.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' @importFrom ggplot2 theme element_rect element_line element_text margin
#' theme_minimal element_blank
#' @importFrom grid unit
#' @importFrom grDevices col2rgb rgb colorRampPalette
#' @importFrom grDevices col2rgb rgb
#' @importFrom graphics rect par image text
#'
"_PACKAGE"
12 changes: 10 additions & 2 deletions R/theme_acdc.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,16 @@ acdc_dark_green <- "#4B5430"
#' @export
#'
acdc_palettes <- list(
acdc_primary = c("#348F41", "#B4A269", "#000000"),
acdc_secondary = c("#6B4C24", "#E08F2A", "#C45B39", "#782C2D", "#4B5430")
acdc_primary = c("#348F41", "#B4A269", "#000000"),
acdc_secondary = c("#6B4C24", "#E08F2A", "#C45B39", "#782C2D", "#4B5430"),
acdc_greens = c("#348F41", "#5CA567", "#85BB8D", "#ADD2B3", "#D6E8D9"),
acdc_golds = c("#B4A269", "#C3B487", "#D2C7A5", "#E1D9C3", "#F0ECE1"),
acdc_blacks = c("#000000", "#333333", "#666666", "#999999", "#CCCCCC"),
acdc_browns = c("#6B4C24", "#886F4F", "#A6937B", "#C3B7A7", "#E1DBD3"),
acdc_yellows = c("#E08F2A", "#E6A554", "#ECBB7F", "#F2D2A9", "#F8E8D4"),
acdc_oranges = c("#C45B39", "#CF7B60", "#DB9C88", "#E7BDAF", "#F3DED7"),
acdc_reds = c("#782C2D", "#935657", "#AE8081", "#C9AAAB", "#E4D4D5"),
acdc_dark_greens = c("#4B5430", "#6F7659", "#939882", "#B7BAAC", "#DBDCD5" )
)


Expand Down
2 changes: 1 addition & 1 deletion man/acdc_palette.Rd

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

52 changes: 52 additions & 0 deletions vignettes/africa-cdc.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,58 @@ These are complemented by a set of five secondary colours.
structure(acdc_palettes$acdc_secondary, class = "palette", name = "Africa CDC Secondary Colours")
```

## Africa CDC Palettes

In addition to the primary and secondary colours, a set of tinted palettes for each Africa CDC colour is available.

### Tinted green palette

```{r acdc-green-tint, echo = FALSE, fig.align = "center", fig.height = 1}
structure(acdc_palettes$acdc_greens, class = "palette", name = "Africa CDC Greens")
```

### Tinted gold palette

```{r acdc-gold-tint, echo = FALSE, fig.align = "center", fig.height = 1}
structure(acdc_palettes$acdc_golds, class = "palette", name = "Africa CDC Golds")
```

### Tinted black palette

```{r acdc-black-tint, echo = FALSE, fig.align = "center", fig.height = 1}
structure(acdc_palettes$acdc_blacks, class = "palette", name = "Africa CDC Blacks")
```

### Tinted brown palette

```{r acdc-brown-tint, echo = FALSE, fig.align = "center", fig.height = 1}
structure(acdc_palettes$acdc_browns, class = "palette", name = "Africa CDC Browns")
```

### Tinted yellow palette

```{r acdc-yellow-tint, echo = FALSE, fig.align = "center", fig.height = 1}
structure(acdc_palettes$acdc_yellows, class = "palette", name = "Africa CDC Yellows")
```

### Tinted orange palette

```{r acdc-orange-tint, echo = FALSE, fig.align = "center", fig.height = 1}
structure(acdc_palettes$acdc_oranges, class = "palette", name = "Africa CDC Oranges")
```

### Tinted red palette

```{r acdc-red-tint, echo = FALSE, fig.align = "center", fig.height = 1}
structure(acdc_palettes$acdc_reds, class = "palette", name = "Africa CDC Reds")
```

### Tinted dark green palette

```{r acdc-dark-green-tint, echo = FALSE, fig.align = "center", fig.height = 1}
structure(acdc_palettes$acdc_dark_greens, class = "palette", name = "Africa CDC Dark Greens")
```

## Africa CDC `ggplot2` theme

### Africa CDC light theme
Expand Down