Learn R Programming

pavo

An R package for the spectral and spatial analysis of color patterns

Currently maintained by Thomas White and Hugo Gruson.

About

pavo is an R package developed with the goal of establishing a flexible and integrated workflow for working with spectral and spatial colour data. It includes functions that take advantage of new data classes to work seamlessly from importing raw spectra and images, to visualisation and analysis. It provides flexible ways to input spectral data from a variety of equipment manufacturers, process these data, extract variables, and produce publication-quality figures.

pavo was written with the following workflow in mind:

  • Organise data by importing and processing spectra and images (e.g., to remove noise, negative values, smooth curves, etc.).
  • Analyse the resulting files, using spectral analyses of shape (hue, saturation, brightness), visual models based on perceptual data, and/or spatial adjacency and boundary strength analyses.
  • Visualise the output, with multiple options provided for exploration, presentation, and analysis.

Need more information, or help with the package?

  • Take a look at the package documentation for detailed examples and discussion.
  • Check out the latest news for changes and updates.
  • Need help or advice and can’t find what you’re looking for? Head over to the colRverse discussion board and feel free to post a message.
  • If all else fails (or you don’t have a GitHub account), email Tom!

Citing pavo

pavo went through several major revisions since its first release in 2013, and two publications describe this work.

When citing the package pavo in publications, please include both citations:

Maia R, Eliason C, Bitton P, Doucet S, Shawkey M (2013). “pavo: an R Package for the analysis, visualization and organization of spectral data.” Methods in Ecology and Evolution, 4, 609-613. doi:10.1111/2041-210X.12069 https://doi.org/10.1111/2041-210X.12069.

Maia R, Gruson H, Endler J, White T (2019). “pavo 2: new tools for the spectral and spatial analysis of colour in R.” Methods in Ecology and Evolution, 10(7). doi:10.1111/2041-210X.13174 https://doi.org/10.1111/2041-210X.13174.

Install

This is the development page for pavo. The stable release is available from CRAN. Simply use install.packages("pavo") to install.

If you want to install the bleeding edge version of pavo, you can:

# install.packages("remotes")
remotes::install_github("rmaia/pavo")
  • download files from GitHub and install using $R CMD INSTALL or, from within R:
install.packages(path, type = "source", repos = NULL)

Copy Link

Version

Install

install.packages('pavo')

Monthly Downloads

651

Version

2.10.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Thomas White

Last Published

September 14th, 2026

Functions in pavo (2.10.0)

diplot

Plot a dichromat segment
coldist

Colour distances
cie

CIE colour spaces
classify

Identify colour classes in an image for adjacency analyses
cocplot

Plot the colour opponent coding diagram
colspace

Model spectra in a colorspace
coc

Color opponent coding model
dispace

Dichromatic colour space
cieplot

CIE plot
coldist2mat

Convert coldist to distance matrix
irrad2flux

Converts between irradiance and photon (quantum) flux
flowers

Reflectance spectra from a suite of native Australian flowers, collected around Cairns, Queensland.
explorespec

Plot spectral curves
img_conversion

Convert images between class rimg and cimg or magick-image
getimg

Import image data
getspec

Import spectra files
is.colspace

Test if object is of class 'colspace'
find_astar

Compute the \(\alpha^*\) value
hexplot

Plot a colour hexagon
hexagon

Colour hexagon
is.vismodel

Test if object is of class 'vismodel'
jndrot

Rotate Cartesian coordinates obtained from jnd2xyz()
peakshape

Peak shape descriptors
jnd2xyz

Convert JND distances into perceptually-corrected Cartesian coordinates
legendtetra

Add legend to a static tetrahedral colourspace
plot.rimg

Plot unprocessed or colour-classified images
merge.rspec

Merge two rspec objects
plot.colspace

Plot spectra in a colourspace
pavo-package

pavo: Perceptual Analysis, Visualization and Organization of Spectral Colour Data
jndplot

Perceptually-corrected chromaticity diagrams
sensdata

Retrieve or plot in-built spectral sensitivity data
plot.sensmod

Plot absorbance spectra from sensmodel()
procimg

Process images
plotsmooth

Plot loess smoothed curves
segplot

Plot the segment-analysis model
procspec

Process spectra
points.colspace

Plot points in a colourspace
plot.rspec

Plot spectra
projplot

2D projection of a tetrahedral colourspace
segspace

Segment classification
sensmodel

Modeling spectral sensitivity
summary.colspace

Colourspace data summary
simulate_spec

Simulate a spectrum
spec2rgb

Spectrum to rgb colour conversion
tcspace

Tetrahedral colourspace
summary.rimg

Image summary
subset.rspec

Subset rspec, vismodel, and colspace objects
summary.rspec

Colourimetric variables
summary.vismodel

Visual model summary
sicalis

Spectral curves from three body regions of stripe-tailed yellow finch (Sicalis citrina) males
trispace

Trichromatic colour space
teal

Angle-resolved reflectance data for the iridescent wing patch of a male green-winged teal (Anas carolinensis)
vismodel

Visual models
tcsplot

Interactive plot of a tetrahedral colourspace
vol

Plot a tetrahedral colour space
triplot

Plot a Maxwell triangle
tetraplot

Plot a static tetrahedral colorspace
vissyst

Animal visual systems data
ttvertex

vertex for the tetrahedral color space
transmissiondata

Default ocular transmission data
voloverlap

Colour volume overlap
axistetra

Plot reference axes in a static tetrahedral colourspace
bgandilum

Default background and illuminant data
aggspec

Aggregate reflectance spectra
bootcoldist

Bootstrap colour distance confidence intervals
adjacent

Run an adjacency and boundary strength analysis
aggplot

Plot aggregated reflectance spectra
as.rspec

Convert data to an rspec object
as.rimg

Convert data to an rimg object
categorical

Categorical fly-visual model
catplot

Plot the categorical colour vision model