Skip to content

Commit

Permalink
certebruin
Browse files Browse the repository at this point in the history
  • Loading branch information
msberends committed Jul 8, 2024
1 parent cd2243c commit 5c105cd
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 54 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: certestyle
Title: A Certe R Package for Applying Certe Organisational Style
Version: 1.6.8
Version: 1.6.9
Authors@R: c(
person(given = c("Matthijs", "S."),
family = "Berends",
Expand Down
28 changes: 14 additions & 14 deletions R/certe_colours.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,42 +40,42 @@ certe.colours <- c(
certegroen = "#93984C",
certeroze = "#B4527F",
certegeel = "#E4D559",
certelila = "#825988",
certezachtlila = "#CEB9D6",
certelila = "#CEB9D6",
certebruin = "#998961",
certeblauw2 = "#69849C",
certegroen2 = "#AEB278", # "#B8BB8B",
certeroze2 = "#C581A0", # "#C794AC",
certegeel2 = "#E4DD9C",
certelila2 = "#AE92B1",
certezachtlila2 = "#DED3E2",
certelila2 = "#DED3E2",
certebruin2 = "#B9B09C",
certeblauw3 = "#97AABB", # "#7A93A9",
certegroen3 = "#C9CCA5",
certeroze3 = "#D5ACBF",
certegeel3 = "#ECE6B1",
certelila3 = "#C1ABC4",
certezachtlila3 = "#E6DDE9",
certelila3 = "#E6DDE9",
certebruin3 = "#CAC3B2",
certeblauw4 = "#C5D0DB",
certegroen4 = "#DFE1C8",
certeroze4 = "#E7CCD8",
certegeel4 = "#F5F1CF",
certelila4 = "#DACCDC",
certezachtlila4 = "#F0EAF2",
certelila4 = "#F0EAF2",
certebruin4 = "#DFDBD0",
certeblauw5 = "#E2E7EC",
certegroen5 = "#EEEFE4",
certeroze5 = "#F2E6EB",
certegeel5 = "#F9F7E8",
certelila5 = "#ECE6ED",
certezachtlila5 = "#F7F4F8",
certelila5 = "#F7F4F8",
certebruin5 = "#EEECE8",
certeblauw6 = "#F6F7F8",
certegroen6 = "#F9F9F6",
certeroze6 = "#FAF7F8",
certegeel6 = "#FCFBF8",
certelila6 = "#F8F6F8",
certezachtlila6 = "#FCFBFC",
certelila6 = "#FCFBFC",
certebruin6 = "#F9F8F7",
certeblauw0 = "#3A4D5D",
certegroen0 = "#5A5D33",
certeroze0 = "#7F3C5B",
certegeel0 = "#D4C230",
certelila0 = "#503852",
certezachtlila0 = "#BEA5C7"
certelila0 = "#BEA5C7",
certebruin0 = "#675D45"
)
2 changes: 1 addition & 1 deletion R/colourpicker.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ viridisLite_colours <- c("viridis", "magma", "inferno", "plasma", "cividis", "ro
#' @param x colour or colour palette name. Certe colours will be used from the [certe.colours] object. Input can be:
#' * `"certe"`
#' * `"certe0"` to `"certe6"` (higher numbers give lighter colours)
#' * `"certeblauw"`, `"certegroen"`, `"certeroze"`, `"certegeel"`, `"certelila"`, or `"certezachtlila"` (or any of these followed by a 0 to 6)
#' * `"certeblauw"`, `"certegroen"`, `"certeroze"`, `"certegeel"`, `"certelila"`, or `"certebruin"` (or any of these followed by a 0 to 6)
#' * `"certe_sir"` or `"certe_sir2"` for certeroze/certegeel/certegroen (will **always** return length 5, with names "S", "SI", "I", "IR", "R")
#' * One of the colourblind-safe `viridisLite` palettes: `r paste0('\n - \u0060"', viridisLite_colours, '"\u0060', collapse = "")`
#' * One of the built-in palettes in \R (currently \R `r paste(R.version$major, R.version$minor, sep = ".")`): `r paste0('\n - \u0060"', c(grDevices::palette.pals(), "topo", "heatmap", "rainbow", "terrain", "greyscale", "grayscale"), '"\u0060', collapse = "")`
Expand Down
6 changes: 4 additions & 2 deletions data-raw/new-colours.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@ update_certe_cols <- function() {
certegroen = c(147, 152, 77), # from thin top line on website
certeroze = c(180, 82, 127), # from thin top line on website
certegeel = c(229, 214, 89), # from thin top line on website
certelila = c(131, 89, 136), # from font colour on website homepage
certezachtlila = c(206, 185, 214) # from thin top line on website
certelila = c(206, 185, 214), # from thin top line on website
certebruin = c(153, 137, 98) # from PPT = #998962)
),
extended_spectrum = TRUE)
}

# for expanding the colours from dark to light
expand_colours <- function(colour.list, extended_spectrum) {

# these are the settings for getting *0, *2, *3, *4, *5, *6
# so e.g. certeblauw0, certeblauw2, certeblauw3, certeblauw4, certeblauw5, certeblauw6
lightness_values <- c(-0.30, 0.35, 0.50, 0.70, 0.85, 0.95)
saturation_values <- c(0.90, 0.80, 0.85, 0.90, 0.80, 0.60)
if (extended_spectrum == FALSE) {
Expand Down
60 changes: 28 additions & 32 deletions man/certe.colours.Rd

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

6 changes: 3 additions & 3 deletions man/colourpicker.Rd

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

2 changes: 1 addition & 1 deletion tests/testthat/test_certestyle.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test_that("colourpicker works", {
expect_identical(as.character(colourpicker("certeroze")), unname(certe.colours[names(certe.colours) == "certeroze"]))
expect_identical(as.character(colourpicker("certegeel")), unname(certe.colours[names(certe.colours) == "certegeel"]))
expect_identical(as.character(colourpicker("certelila")), unname(certe.colours[names(certe.colours) == "certelila"]))
expect_identical(as.character(colourpicker("certezachtlila")), unname(certe.colours[names(certe.colours) == "certezachtlila"]))
expect_identical(as.character(colourpicker("certebruin")), unname(certe.colours[names(certe.colours) == "certebruin"]))

expect_identical(colourpicker("certe_sir"),
c(S = colourpicker("certegroen"),
Expand Down

0 comments on commit 5c105cd

Please sign in to comment.