Skip to content

Commit

Permalink
update wb palettes
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestguevarra committed Mar 10, 2024
1 parent c6bb80e commit ee887d7
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 83 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Language: en-GB
LazyData: true
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
VignetteBuilder: knitr
URL: https://github.com/katilingban/paleta,http://katilingban.io/paleta/
BugReports: https://github.com/katilingban/paleta/issues
VignetteBuilder: knitr


26 changes: 13 additions & 13 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@ export(theme_wb)
export(tint_colour)
export(tint_colours)
export(tint_colours_)
export(wb_aubergine)
export(wb_beryl)
export(wb_black)
export(wb_blue)
export(wb_bright_aqua)
export(wb_bright_green)
export(wb_bright_orange)
export(wb_bright_purple)
export(wb_bright_red)
export(wb_bright_yellow)
export(wb_brown)
export(wb_carrot)
export(wb_cyan)
export(wb_electric)
export(wb_emerald)
export(wb_dark_aqua)
export(wb_dark_green)
export(wb_dark_orange)
export(wb_dark_purple)
export(wb_dark_red)
export(wb_fonts)
export(wb_green)
export(wb_orange)
export(wb_light_aqua)
export(wb_light_orange)
export(wb_palettes)
export(wb_purple)
export(wb_red)
export(wb_rojo)
export(wb_teal)
export(wb_torquoise)
export(wb_torrid)
export(wb_white)
importFrom(ggplot2,element_blank)
importFrom(ggplot2,element_line)
Expand Down
61 changes: 41 additions & 20 deletions R/theme_wb.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,75 +8,75 @@
#' @rdname wb_colours
#' @export
#'
wb_blue <- "#002244"
wb_blue <- "#002244"

#' @rdname wb_colours
#' @export
wb_cyan <- "#009FDA"
wb_cyan <- "#009FDA"

#' @rdname wb_colours
#' @export
wb_black <- "#000000"
wb_black <- "#000000"

#' @rdname wb_colours
#' @export
wb_white <- "#FFFFFF"
wb_white <- "#FFFFFF"

#' @rdname wb_colours
#' @export
wb_torrid <- "#F05023"
wb_bright_orange <- "#F05023"

#' @rdname wb_colours
#' @export
wb_electric <- "#FDB714"
wb_bright_yellow <- "#FDB714"

#' @rdname wb_colours
#' @export
wb_rojo <- "#EB1C2D"
wb_bright_red <- "#EB1C2D"

#' @rdname wb_colours
#' @export
wb_carrot <- "#F78D28"
wb_light_orange <- "#F78D28"

#' @rdname wb_colours
#' @export
wb_torquoise <- "#009CA7"
wb_bright_aqua <- "#009CA7"

#' @rdname wb_colours
#' @export
wb_green <- "#00AB51"
wb_bright_green <- "#00AB51"

#' @rdname wb_colours
#' @export
wb_purple <- "#872B90"
wb_bright_purple <- "#872B90"

#' @rdname wb_colours
#' @export
wb_teal <- "#00A996"
wb_light_aqua <- "#00A996"

#' @rdname wb_colours
#' @export
wb_red <- "#98252B"
wb_dark_red <- "#98252B"

#' @rdname wb_colours
#' @export
wb_orange <- "#E16A2D"
wb_dark_orange <- "#E16A2D"

#' @rdname wb_colours
#' @export
wb_brown <- "#B88C1D"
wb_brown <- "#B88C1D"

#' @rdname wb_colours
#' @export
wb_aubergine <- "#614776"
wb_dark_purple <- "#614776"

#' @rdname wb_colours
#' @export
wb_beryl <- "#006068"
wb_dark_aqua <- "#006068"

#' @rdname wb_colours
#' @export
wb_emerald <- "#006450"
wb_dark_green <- "#006450"


#'
Expand All @@ -93,7 +93,28 @@ wb_palettes <- list(
wb_secondary = c(
"#F05023", "#FDB714", "#EB1C2D", "#F78D28", "#009CA7", "#00AB51", "#872B90",
"#00A996", "#98252B", "#E16A2D", "#B88C1D", "#614776", "#006068", "#006450"
)
),
wb_brights = c(
"#F05023", "#FDB714", "#EB1C2D", "#F78D28", "#009CA7", "#00AB51", "#872B90",
"#00A996"
),
wb_neutrals = c(
"#98252B", "#E16A2D", "#B88C1D", "#614776", "#006068", "#006450"
),
wb_bright_oranges = c("#F05023", "#F3734F", "#F6967B", "#F9B9A7", "#FCDCD3"),
wb_bright_yellows = c("#FDB714", "#FDC543", "#FDD372", "#FEE2A1", "#FEF0D0"),
wb_bright_reds = c("#EB1C2D", "#EF4957", "#F37681", "#F7A4AB", "#FBD1D5"),
wb_light_oranges = c("#F78D28", "#F8A353", "#FABA7E", "#FBD1A9", "#FDE8D4"),
wb_bright_aquas = c("#009CA7", "#33AFB8", "#66C3CA", "#99D7DB", "#CCEBED"),
wb_bright_greens = c("#00AB51", "#33BB73", "#66CC96", "#99DDB9", "#CCEEDC"),
wb_bright_purples = c("#872B90", "#9F55A6", "#B77FBC", "#CFAAD2", "#E7D4E8"),
wb_light_aquas = c("#00A996", "#33BAAB", "#66CBC0", "#99DCD5", "#CCEDEA"),
wb_dark_reds = c("#98252B", "#AC5055", "#C17C7F", "#D5A7AA", "#EAD3D4"),
wb_dark_oranges = c("#E16A2D","#E78757", "#EDA581", "#F3C3AB", "#F9E1D5"),
wb_browns = c("#B88C1D", "#C6A34A", "#D4BA77", "#E2D1A4", "#F0E8D1"),
wb_dark_purples = c("#614776", "#806B91", "#A090AC", "#BFB5C8", "#DFDAE3"),
wb_dark_aquas = c("#006068", "#337F86", "#669FA4", "#99BFC2", "#CCDFE0"),
wb_dark_greens = c("#006450", "#338373", "#66A296", "#99C1B9", "#CCE0DC")
)


Expand Down Expand Up @@ -217,7 +238,7 @@ set_wb_font <- function(alt = paleta_fonts$paleta_noto) {
#' x = "Engine Shape",
#' y = "Counts"
#' ) +
#' theme_wb_light()
#' theme_wb()
#' }
#'
#' @rdname theme_wb
Expand Down
18 changes: 10 additions & 8 deletions data-raw/colours.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@ acdc_colours <- tibble::tibble(
wb_colours <- tibble::tibble(
organisation = "World Bank",
name = c(
"WB Sapphire Blue", "WB Cyan", "WB Black", "WB White", "WB Torrid Orange",
"WB Electric", "WB Rojo", "WB Carrot", "WB Turquoise", "WB Green",
"WB Purple", "WB Teal", "WB Red", "WB Orange", "WB Brown", "WB Aubergine",
"WB Beryl", "WB Emerald"
"WB Sapphire Blue", "WB Cyan", "WB Black", "WB White", "WB Bright Orange",
"WB Bright Yellow", "WB Bright Red", "WB Light Orange", "WB Bright Aqua",
"WB Bright Green", "WB Bright Purple", "WB Light Aqua", "WB Dark Red",
"WB Dark Orange", "WB Brown", "WB Dark Purple", "WB Dark Aqua",
"WB Dark Green"
),
code = c(
"wb_blue", "wb_cyan", "wb_black", "wb_white", "wb_torrid", "wb_electric",
"wb_rojo", "wb_carrot", "wb_turquoise", "wb_green", "wb_purple",
"wb_teal", "wb_red", "wb_orange", "wb_brown", "wb_aubergine", "wb_beryl",
"wb_emerald"
"wb_blue", "wb_cyan", "wb_black", "wb_white", "wb_bright_orange",
"wb_bright_yellow", "wb_bright_red", "wb_light_orange", "wb_bright_aqua",
"wb_brith_green", "wb_bright_purple", "wb_light_aqua", "wb_dark_red",
"wb_dark_orange", "wb_brown", "wb_dark_purple", "wb_dark_aqua",
"wb_dark_green"
),
rgb = c(
"0 35 69", "0 173 228", "0, 0, 0", "225, 225, 225", "240, 80, 35",
Expand Down
Binary file modified data/paleta_colours.rda
Binary file not shown.
1 change: 1 addition & 0 deletions man/paleta.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/theme_wb.Rd

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

52 changes: 26 additions & 26 deletions man/wb_colours.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/wb_palette.Rd

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

26 changes: 13 additions & 13 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@ reference:
- wb_fonts
- wb_blue
- wb_cyan
- wb_torrid
- wb_electric
- wb_rojo
- wb_carrot
- wb_torquoise
- wb_green
- wb_purple
- wb_teal
- wb_red
- wb_orange
- wb_bright_orange
- wb_bright_yellow
- wb_bright_red
- wb_light_orange
- wb_bright_aqua
- wb_bright_green
- wb_bright_purple
- wb_light_aqua
- wb_dark_red
- wb_dark_orange
- wb_brown
- wb_aubergine
- wb_beryl
- wb_emerald
- wb_dark_purple
- wb_dark_aqua
- wb_dark_green
- theme_wb

- title: Utilities
Expand Down
27 changes: 27 additions & 0 deletions vignettes/world-bank.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,30 @@ These are complemented by a set of fourteen secondary colours.
structure(wb_palettes$wb_secondary, class = "palette", name = "World Bank Secondary Colours")
```

## World Bank Palettes

In addition to the primary and secondary colours, the colours can be grouped into a bright palette and a neutral palette along with tinted palettes for each World Bank colour.

### Bright palette

```{r wb-bright, echo = FALSE, fig.align = "center", fig.height = 1}
structure(wb_palettes$wb_brights, class = "palette", name = "World Bank Bright Palette")
```

### Neutral palette

```{r wb-neutral, echo = FALSE, fig.align = "center", fig.height = 1}
structure(wb_palettes$wb_neutrals, class = "palette", name = "World Bank Neutral Palette")
```

### Tinted bright orange palette

```{r wb-bright-oranges, echo = FALSE, fig.align = "center", fig.height = 1}
structure(wb_palettes$wb_bright_oranges, class = "palette", name = "World Bank Bright Oranges Palette")
```

### Tinted bright yellow palette

```{r wb-bright-yellows, echo = FALSE, fig.align = "center", fig.height = 1}
structure(wb_palettes$wb_bright_yellows, class = "palette", name = "World Bank Bright Yellows Palette")
```

0 comments on commit ee887d7

Please sign in to comment.