| Title: | Circadia Lab Colour Palettes and ggplot2 Theme |
|---|---|
| Description: | Provides the shared visual identity for the Circadia Lab R ecosystem: colour palettes, ggplot2 theme, and ggplot2 scales. Palettes cover qualitative, sequential, and diverging use cases anchored on the lab's brand colours. Designed to be used alongside zeitR, slumbR, tallieR, and syncR. |
| Authors: | Lucas França [aut, cre] (ORCID: <https://orcid.org/0000-0003-0853-1319>), Mario Leocadio-Miguel [aut] (ORCID: <https://orcid.org/0000-0002-7248-3529>) |
| Maintainer: | Lucas França <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-07-01 23:57:00 UTC |
| Source: | https://github.com/circadia-bio/circadia |
Returns a named character vector of hex colour codes for the requested
palette. Suitable for direct use in ggplot2::scale_fill_manual() or
ggplot2::scale_colour_manual().
circadia_palette(palette = "main", n = NULL, reverse = FALSE)circadia_palette(palette = "main", n = NULL, reverse = FALSE)
palette |
Name of the palette. One of |
n |
Number of colours to return. If |
reverse |
Logical. Reverse the order of the palette? Default |
Gradient palettes come in two families:
Complex (multi-hue): "diverging", "blues", "warm"
Simple (monochromatic / direct interpolation): "diverging_simple",
"seq_blue", "seq_coral", "seq_amber", "seq_ochre"
A named (or unnamed for gradient palettes) character vector of hex colour codes.
circadia_palette() circadia_palette("core") circadia_palette("diverging_simple") circadia_palette("seq_blue", n = 3) circadia_palette("diverging", reverse = TRUE)circadia_palette() circadia_palette("core") circadia_palette("diverging_simple") circadia_palette("seq_blue", n = 3) circadia_palette("diverging", reverse = TRUE)
Prints the names and sizes of all palettes defined in the package.
circadia_palettes()circadia_palettes()
A named integer vector of palette lengths, invisibly.
circadia_palettes()circadia_palettes()
Looks up the hex colour associated with a named data domain. Useful when you want to colour-code panels or annotations by data type rather than by group membership.
domain_colour_for(domain)domain_colour_for(domain)
domain |
Character scalar. One of |
A length-1 named character vector with the domain hex colour, e.g.
c(actigraphy = "#014370").
domain_colour_for("sleep") domain_colour_for("light") domain_colour_for("activity")domain_colour_for("sleep") domain_colour_for("light") domain_colour_for("activity")
Applies a Circadia Lab qualitative palette to the colour aesthetic.
scale_colour_circadia(palette = "main", reverse = FALSE, ...) scale_color_circadia(palette = "main", reverse = FALSE, ...)scale_colour_circadia(palette = "main", reverse = FALSE, ...) scale_color_circadia(palette = "main", reverse = FALSE, ...)
palette |
Palette name. Default |
reverse |
Logical. Reverse the palette? Default |
... |
Additional arguments passed to |
library(ggplot2) ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) + geom_point(size = 3) + scale_colour_circadia() + theme_circadia()library(ggplot2) ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) + geom_point(size = 3) + scale_colour_circadia() + theme_circadia()
Interpolates across a Circadia Lab palette for continuous colour data.
The "diverging" palette is recommended for data centred at zero; "blues"
or "warm" for unipolar data.
scale_colour_circadia_c(palette = "blues", reverse = FALSE, ...) scale_color_circadia_c(palette = "blues", reverse = FALSE, ...)scale_colour_circadia_c(palette = "blues", reverse = FALSE, ...) scale_color_circadia_c(palette = "blues", reverse = FALSE, ...)
palette |
Palette name. Default |
reverse |
Logical. Reverse the palette? Default |
... |
Additional arguments passed to |
library(ggplot2) ggplot(faithfuld, aes(waiting, eruptions, fill = density)) + geom_tile() + scale_fill_circadia_c("warm") + theme_circadia()library(ggplot2) ggplot(faithfuld, aes(waiting, eruptions, fill = density)) + geom_tile() + scale_fill_circadia_c("warm") + theme_circadia()
Applies a Circadia Lab qualitative palette to the fill aesthetic.
scale_fill_circadia(palette = "main", reverse = FALSE, ...)scale_fill_circadia(palette = "main", reverse = FALSE, ...)
palette |
Palette name. Default |
reverse |
Logical. Reverse the palette? Default |
... |
Additional arguments passed to |
library(ggplot2) ggplot(mpg, aes(class, fill = drv)) + geom_bar() + scale_fill_circadia() + theme_circadia()library(ggplot2) ggplot(mpg, aes(class, fill = drv)) + geom_bar() + scale_fill_circadia() + theme_circadia()
Interpolates across a Circadia Lab palette for continuous fill data.
scale_fill_circadia_c(palette = "blues", reverse = FALSE, ...)scale_fill_circadia_c(palette = "blues", reverse = FALSE, ...)
palette |
Palette name. Default |
reverse |
Logical. Reverse the palette? Default |
... |
Additional arguments passed to |
A clean, minimal ggplot2 theme built on ggplot2::theme_minimal() with
typography and spacing consistent with Circadia Lab figures.
theme_circadia( base_size = 12, base_family = "", grid = "xy", legend_position = "right" )theme_circadia( base_size = 12, base_family = "", grid = "xy", legend_position = "right" )
base_size |
Base font size in points. Default |
base_family |
Base font family. Default |
grid |
Which grid lines to show. One of |
legend_position |
Position of the legend passed to
|
A ggplot2::theme() object.
library(ggplot2) ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) + geom_point(size = 2) + scale_colour_circadia() + theme_circadia()library(ggplot2) ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) + geom_point(size = 2) + scale_colour_circadia() + theme_circadia()