spiDEColours

The spiDE colours

Description

spiDE gives each role one colour and uses it in every plot: gold and violet for a slope that rises or falls with niche density (and for the diverging t scale), dark violet and pink for the first and second level of the condition, the viridis "magma" ramp for magnitudes (light to dark on the page), a brighter part of the same ramp (dark to bright) for plots in tissue coordinates, drawn on a dark panel, and the Okabe-Ito colours for a nuisance factor such as slide. The colours were checked under simulated deuteranopia, protanopia and tritanopia. Use them to make your own figures match, or pass others to a ggplot2 scale to override a spiDE plot’s.

Usage

spiDEColours(role = NULL, n = 9L)

Arguments

role NULL (the named fixed colours) or one of “direction”, “condition”, “magnitude” (the light-panel ramp, light to dark), “spatial” (the dark-panel ramp of tissue plots, dark to bright), “diverging” and “nuisance”.
n the number of colours of a ramp, or of nuisance levels.

Value

a character vector of colours.

See Also

theme_spiDE()

Examples

library("spiDE")

spiDEColours("condition")
    first    second 
"#3E1A78" "#E05A9E" 
spiDEColours("magnitude", 5)
[1] "#FDF9F3" "#FEA974" "#D3456C" "#6F1E80" "#0E0B2C"
spiDEColours("spatial", 5)
[1] "#51127B" "#9A2D7F" "#E24D65" "#FD9D6D" "#FCF3B6"