🎨 circadia

Shared colour palettes, ggplot2 theme, and scales for the Circadia Lab R ecosystem.

License: MIT R R-CMD-check


πŸ“– What is circadia?

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.


✨ Features


πŸ—‚οΈ Project Structure

circadia/
β”œβ”€β”€ 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

πŸš€ Getting Started

Installation

# 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'))

Basic usage

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")

πŸ“¦ Dependencies

Package Version Purpose
ggplot2 β‰₯ 3.4.0 Theme and scale infrastructure

πŸ‘₯ Authors

Role Name Affiliation
Author, maintainer Lucas FranΓ§a Northumbria University
Author Mario Leocadio-Miguel Northumbria University

🀝 Related Tools


πŸ“„ Licence

Released under the MIT License.

Copyright Β© Lucas FranΓ§a, Mario Leocadio-Miguel, 2025