from spidepy.pl import spide_colours
spide_colours("direction", 2)['#C99A16', '#5B2C9E']
The spiDE colours (R spiDEColours).
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.
| Name | Type | Description | Default |
|---|---|---|---|
| role | ('direction', 'condition', 'magnitude', 'spatial', 'diverging', 'nuisance') | None returns the named fixed colours. |
"direction" |
| n | int | The number of colours of a ramp, or of nuisance levels. | 9 |
| Name | Type | Description |
|---|---|---|
| dict or list of str | {name: colour} for role=None, else a list of colours (hex, or R’s greyNN names for the fixed ones). |
style : The matplotlib style that goes with these colours.