Shared colour palettes, ggplot2 theme, and scales for the Circadia Lab R ecosystem.
circadia is the visual identity layer for the Circadia Lab R ecosystem. It
provides a consistent set of brand colours, a clean ggplot2 theme, and
discrete and continuous scale functions that plug directly into plots produced
by zeitR, slumbR, tallieR, syncR, and standalone analysis notebooks.
main (6-colour qualitative), core (4-colour
compact), diverging (blue β antique white β coral), blues (sequential),
warm (sequential)domain_colour_for() returns the brand colour for
a named data domain ("actigraphy", "sleep", "circadian",
"questionnaire", "demographics", "clinical")scale_colour_circadia() and
scale_fill_circadia() for categorical datascale_colour_circadia_c() and
scale_fill_circadia_c() with colour interpolationtheme_circadia() β minimal ggplot2 theme with configurable gridlines,
Circadia Lab typography, and brand accent colourscircadia/
βββ R/
β βββ circadia-package.R # package-level documentation
β βββ palettes.R # palette definitions and retrieval functions
β βββ scales.R # ggplot2 discrete and continuous scales
β βββ theme.R # theme_circadia()
βββ tests/
β βββ testthat/
β βββ test-palettes.R
β βββ test-scales.R
βββ vignettes/
β βββ getting-started.Rmd
βββ _pkgdown.yml
βββ DESCRIPTION
βββ LICENSE
# install.packages("remotes")
# remotes::install_github("circadia-bio/circadia")
install.packages("circadia", repos = c('https://circadia-bio.r-universe.dev', 'https://cloud.r-project.org'))
library(circadia)
library(ggplot2)
# Retrieve a palette
circadia_palette("core")
#> deep_blue coral_red amber antique_white
#> "#014370" "#FC544A" "#FFA75D" "#FFECD4"
# Domain colour lookup
domain_colour_for("sleep")
#> sleep
#> "#1B6799"
# Apply theme and scales to a plot
ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) +
geom_point(size = 3) +
scale_colour_circadia() +
theme_circadia()
# Continuous fill scale with the diverging palette
ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
geom_tile() +
scale_fill_circadia_c("warm") +
theme_circadia(grid = "none")
| Package | Version | Purpose |
|---|---|---|
ggplot2 |
β₯ 3.4.0 | Theme and scale infrastructure |
| Role | Name | Affiliation |
|---|---|---|
| Author, maintainer | Lucas FranΓ§a | Northumbria University |
| Author | Mario Leocadio-Miguel | Northumbria University |
Released under the MIT License.
Copyright Β© Lucas FranΓ§a, Mario Leocadio-Miguel, 2025