Package 'idpalette'

Title: Palettes for IDEM, IDDU, ACEFA, and The Kids
Description: See: package title.
Authors: Gerry Ryan [aut, cre] (ORCID: <https://orcid.org/0000-0003-0183-7630>)
Maintainer: Gerry Ryan <[email protected]>
License: MIT + file LICENSE
Version: 2.0.0
Built: 2026-06-03 03:32:42 UTC
Source: https://github.com/idem-lab/idpalette

Help Index


ACEFA palette

Description

An alias for idpalette(p = "acefa", n, rev)

Usage

acefa(n = NULL, rev = FALSE)

Arguments

n

numeric. How many colours?

rev

logical Reverse the colour order?

Value

idpalette class object of hex colours length n. The idpalette class has a print method that will plot the colours in the object, but it is underneath that a character string of length n and can be otherwise treated as such.

Examples

acefa(5)

IDDU palette

Description

An alias for idpalette(p = "iddu", n, rev)

Usage

iddu(n = NULL, rev = FALSE)

Arguments

n

numeric. How many colours?

rev

logical Reverse the colour order?

Value

idpalette class object of hex colours length n. The idpalette class has a print method that will plot the colours in the object, but it is underneath that a character string of length n and can be otherwise treated as such.

Examples

iddu(5)

IDEM palette

Description

An alias for idpalette(p = "idem", n, rev)

Usage

idem(n = NULL, rev = FALSE)

Arguments

n

numeric. How many colours?

rev

logical Reverse the colour order?

Value

character of length n

idpalette class object of hex colours length n. The idpalette class has a print method that will plot the colours in the object, but it is underneath that a character string of length n and can be otherwise treated as such.

Examples

idem(7)

Colour palettes for IDEM, IDDU, ACEFA, and The Kids

Description

Colour palettes for IDEM, IDDU, ACEFA, and The Kids

Usage

idpal(
  p = c("idem", "idem_official", "iddu", "iddu_official", "acefa", "acefa_official",
    "thekids", "thekids_official", "thekids_diverging")
)

Arguments

p

character. Which palette do you want?

Details

"idem", "iddu", and "acefa" return palettes for all colours in logos. "..._official" palettes return only the four-colour palettes per the style- guide from the designer.

"thekids" returns colours from the brand template, excluding black and white. "_official" includes black and white, while "_diverging" includes white, but excludes dark teal, midnight blue, and black, for use in diverging colour schemes (duh)

NB: The additional IDEM, IDDU 'non-official' colours are estimated by a colour dropper thing Gerry found on the internet and may or may not be exactly correct.

Value

character of hex values

Examples

idpal("idem")

ID Palette

Description

Create colour palettes based on IDEM, IDDU, ACEFA, and The Kids Research Institute Australia colours

Usage

idpalette(p, n = NULL, rev = FALSE)

Arguments

p

character. Which palette? See ?idpal for details.

n

numeric. How many colours?

rev

logical Reverse the colour order?

Value

idpalette class object of hex colours length n. The idpalette class has a print method that will plot the colours in the object, but it is underneath that a character string of length n and can be otherwise treated as such.

Examples

idpalette(
  "idem",
  n = 20,
  rev = TRUE
)

kids_div <- idpalette(
   "thekids_diverging"
)

kids_div

str(kids_div)

is.character(kids_div)

scale ID continuous

Description

Convenience wrapper to ggplot2::continuous_scale to allow use of idpalette or any arbitrary set of colours to be used as a ggplot2 fill or colour scale

Usage

scale_id_continuous(
  cols,
  aesthetics = c("fill", "colour"),
  na.value = "transparent",
  guide = "colourbar",
  ...
)

Arguments

cols

character. A vector of colours

aesthetics

Scale aesthetic.

na.value

Garn - whaddaya want in the NAs?

guide

A function used to create a guide or its name. See ggplot2::guides() for more information

...

Arguments passed on to ggplot2::continuous_scale

Value

A ggproto object of class Scale and ScaleContinuous

Examples

library(ggplot2)

ggplot(mtcars) +
  geom_point(
    aes(
      x = disp,
      y = hp,
      colour = qsec
    ),
    size = 5
  ) +
  scale_id_continuous(
    cols = iddu(),
    aesthetics = "colour"
  )

The Kids palette

Description

An alias for idpalette(p = "thekids", n, rev)

Usage

thekids(n = NULL, rev = FALSE)

Arguments

n

numeric. How many colours?

rev

logical Reverse the colour order?

Value

idpalette class object of hex colours length n. The idpalette class has a print method that will plot the colours in the object, but it is underneath that a character string of length n and can be otherwise treated as such.

Examples

thekids(8)