| Title: | AAGI Colours and Colour Palettes |
|---|---|
| Description: | Colour palettes based on the official Analytics for the Australian Grains Industry ('AAGI') comms guide and others designed to work harmoniously with the official 'AAGI' colours while being colour vision deficient (CVD) friendly. |
| Authors: | Adam H. Sparks [aut, cre] (ORCID: <https://orcid.org/0000-0002-0061-8359>), Grains Research and Development Corporation [fnd, cph] (GRDC Project CUR2210-005OPX (AAGI-CU), ROR: <https://ror.org/02xwr1996>) |
| Maintainer: | Adam H. Sparks <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.4 |
| Built: | 2026-05-26 06:20:59 UTC |
| Source: | https://github.com/AAGI-AUS/AAGIPalettes |
A Vector of the official AAGI Colour Hex Codes. Other colour palettes are provided via aagi_palettes_list for plotting purposes but may not considered to be "official" AAGI colours.
A Vector of the official AAGI Colour Hex Codes. Other colour palettes are provided via aagi_palettes_list for plotting purposes but may not considered to be "official" AAGI colours.
aagi_colours aagi_coloursaagi_colours aagi_colours
A vector with eight (8) colours as hexadecimal values:
#B6D438
#00808B
#648FD2
#54921E
#FFBC42
#ec8525
#414042
#F2F2F2
A vector with eight (8) colours as hexadecimal values:
#B6D438
#00808B
#648FD2
#54921E
#FFBC42
#ec8525
#414042
#F2F2F2
Other data:
aagi_palettes_list
Sequential and Diverging Colour Palettes for AAGI Graphical Outputs
aagi_palettes(name, n = 5, direction = 1)aagi_palettes(name, n = 5, direction = 1)
name |
Character. Name of the desired palette. |
n |
Integer. Number of different colours in the palette. Defaults to 5. |
direction |
Integer. If |
A character vector of hexadecimal colour codes.
A nested list of sequential and diverging AAGI colour palettes used
by aagi_palettes(). The top-level names are palette identifiers (e.g.,
"aagi_RdTl"). Each palette is itself a named list keyed by the number of
colour stops ("3", "4", …). Each entry is a character vector of hex
colour codes of length n.
aagi_palettes_listaagi_palettes_list
A named list of named lists of character vectors.
This dataset is intended for internal reuse and for users who want direct access to the fixed palette definitions without calling the palette function.
Not all palettes support all values of n. For example, "aagi_RdYl" is
defined only for 3–7 stops.
Other data:
aagi_colours
# List available palettes names(aagi_palettes_list) # Available 'n' values for a palette names(aagi_palettes_list[["aagi_RdTl"]]) # Get the 11-stop RdTl palette aagi_palettes_list[["aagi_RdTl"]][["11"]] # Reverse order (equivalent to direction = -1) rev(aagi_palettes_list[["aagi_RdTl"]][["11"]])# List available palettes names(aagi_palettes_list) # Available 'n' values for a palette names(aagi_palettes_list[["aagi_RdTl"]]) # Get the 11-stop RdTl palette aagi_palettes_list[["aagi_RdTl"]][["11"]] # Reverse order (equivalent to direction = -1) rev(aagi_palettes_list[["aagi_RdTl"]][["11"]])
Use plain English colour names for AAGI colours to get the hex codes.
colour_as_hex( name = c("AAGI Black", "AAGI Bright Green", "AAGI Blue", "AAGI Teal", "AAGI Green", "AAGI Yellow", "AAGI Orange", "AAGI Grey") )colour_as_hex( name = c("AAGI Black", "AAGI Bright Green", "AAGI Blue", "AAGI Teal", "AAGI Green", "AAGI Yellow", "AAGI Orange", "AAGI Grey") )
name |
Character names of AAGI colours. Multiple values are allowed. |
A string value that consists of the corresponding colour hex code that was requested.
# return AAGI Black as a hex code colour_as_hex(name = "AAGI Black") # return AAGI Black, Bright Green and Orange as hex codes colour_as_hex(name = c("AAGI Black", "AAGI Bright Green", "AAGI Orange"))# return AAGI Black as a hex code colour_as_hex(name = "AAGI Black") # return AAGI Black, Bright Green and Orange as hex codes colour_as_hex(name = c("AAGI Black", "AAGI Bright Green", "AAGI Orange"))
A quick and dirty way to show AAGI colours in a palette plot.
display_aagi_cols(name = "aagi_colours", n = 5)display_aagi_cols(name = "aagi_colours", n = 5)
name |
Either |
n |
There are two (2) types of palettes provided, sequential and diverging.
The sequential palettes names are:
All the sequential palettes are available in variations from 3 different values up to 11 different values. The diverging palettes are:
All the diverging palettes are available in variations from 3 different values up to 11 different values. For qualitative palettes, the lowest number of distinct values available always is 3, but the largest number is different for different palettes. It is given together with the palette names in the following table. |
Called for its side-effects, a plot of the given palette.
# display the official AAGI colours display_aagi_cols(name = "aagi_colours") # display five colours from the Blue Orange diverging palette display_aagi_cols(name = "aagi_BuOr")# display the official AAGI colours display_aagi_cols(name = "aagi_colours") # display five colours from the Blue Orange diverging palette display_aagi_cols(name = "aagi_BuOr")
Takes a AAGI colour palette and generates more colours from it, so
that there are enough to make your chart. The interpolation method is set
to spline (the default is linear) in an attempt to reduce the number
of undesirable colours that get produced when generating many colours.
interpolate_aagi_colours( colours = c("AAGI Orange", "AAGI Yellow", "AAGI Bright Green", "AAGI Teal", "AAGI Blue"), direction = 1, ... )interpolate_aagi_colours( colours = c("AAGI Orange", "AAGI Yellow", "AAGI Bright Green", "AAGI Teal", "AAGI Blue"), direction = 1, ... )
colours |
|
direction |
|
... |
Additional arguments to pass to |
A function that takes a single value and makes that many colours.
aagi_palettes
library(ggplot2) x <- interpolate_aagi_colours() wt_vals <- x(length(unique(round(mtcars$wt, 1)))) ggplot(mtcars, aes(x = mpg, y = hp, colour = as.factor(round(wt, 1)))) + geom_point() + scale_colour_manual("Weight", values = wt_vals)library(ggplot2) x <- interpolate_aagi_colours() wt_vals <- x(length(unique(round(mtcars$wt, 1)))) ggplot(mtcars, aes(x = mpg, y = hp, colour = as.factor(round(wt, 1)))) + geom_point() + scale_colour_manual("Weight", values = wt_vals)