Learn R Programming

colorSpec

colorSpec is an R package providing an S3 class with methods for color spectra. It supports the standard calculations with spectral properties of light sources, materials, cameras, eyes, scanners, etc. And it works well with the more general action spectra.

When a spectrum is contructed, a quantity is required, though it can be changed after contruction. The colorSpec quantities are typically not the same as the SI quantities; they are more general. There are 14 quantities, which then defined the 4 basic spectrum types, as given in this table from the User Guide.

The quantity is used to label plots, and to make sense out of the arguments in the function product().

The function invert() implements a method in

Copy Link

Version

Install

install.packages('colorSpec')

Monthly Downloads

646

Version

1.6-0

License

GPL (>= 3)

Maintainer

Glenn Davis

Last Published

January 15th, 2025

Functions in colorSpec (1.6-0)

chop

chop spectra into low and high parts
as.data.frame

Convert a colorSpec Object to a data.frame
colorSpec

constructing and testing colorSpec Objects
calibrate

make a linear modification to a colorSpec responder
canonicalOptimalColors

compute the Canonical Optimal Colors
colorSpec-package

Package colorSpec - Color Calculations with Emphasis on Spectral Data
atmosphere

atmospheric transmittance along a horizontal path
computeADL

compute ADL coordinates by ray tracing
bind

Combine colorSpec Objects
bandSpectra

Compute Band-based Material Spectra, and Bands for Existing Material Spectra
extradata

extradata of a colorSpec object
coredata

Extract the Core Data of a colorSpec Object
computeCCT

Compute Correlated Color Temperature (CCT) of Light Spectra
computeSSI

Compute the Spectrum Similarity Index of light spectra
interpolate

interpolate spectra
convolvewith

Convolve each spectrum in a colorSpec object with a kernel
emulate

modify a colorSpec responder to emulate (approximate) another responder
DisplayRGB

Compute Display RGB from Linear RGB
computeCRI

Compute Color Rendering Index (CRI) of Light Spectra
daylight

Standard Daylight Components
lms1971

Cone Fundamentals - 2-degree (1971)
materialSpectra

compute standard material spectra
lms2000

Cone Fundamentals - 2-degree (2000)
linearize

linearize a colorSpec object - to make it ready for colorimetric calculations
mean

calculate mean of multiple spectra
LightSpectra

compute standard light spectra
logging

Logging in colorSpec package
invert

estimate spectra from responses, effectively inverting the operator from spectrum to response
luminsivity

Luminous Efficiency Functions (photopic and scotopic)
lightResponsivitySpectra

compute standard light responsivity spectra
organization

organization of a colorSpec object
photometric

convert illuminant spectra to photometric units
plot

plot spectra
print

Convert colorSpec object to readable text
probeOptimalColors

compute optimal colors by ray tracing
multiply

multiply a colorSpec object by scalar, vector, or matrix
metadata

metadata of a colorSpec object
cs.options

Functions to set and retrieve colorSpec package options
plotOptimals

Plot Optimal Colors
officialXYZ

Query the Official XYZ values for Standard Illuminants
resample

resample a colorSpec Object to new wavelengths
product

Compute the product of colorSpec objects
ptransform

make a linear transformation to a colorSpec responder
scanner

standard RGB scanners
sectionOptimalColors

compute sections of an optimal color surface by hyperplanes
quantity

quantity of a colorSpec object
responsivityMetrics

Compute Metrics for a Light Responder (e.g. a camera) or a Material Responder (e.g. a scanner)
readCGATS

read tables from files in ANSI/CGATS.17 format
radiometric

convert a colorSpec object from actinometric to radiometric
readSpectra

read colorSpec objects from files
standardRGB

Convert from XYZ to some standard RGB spaces
theoreticalRGB

Theoretical RGB Cameras - BT.709.RGB, Adobe.RGB, and ACES.RGB
xyz1931

CIE Color Matching Functions - 2-degree (1931)
subset

extract a subset of a colorSpec Object
xyz1964

CIE Color Matching Functions - 10-degree (1964)
wavelength

wavelength vector of a colorSpec object
specnames

specnames of a colorSpec object
solar.irradiance

Standard Solar Irradiance - Extraterrestrial and Terrestrial
ABC

Standard Illuminants A, B, and C (1931)
Hoya

standard Hoya filters
applyspec

apply a function to each spectrum in a colorSpec object
Fluorescents

Standard series F Illuminants F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, and F12
actinometric

convert a colorSpec object to be actinometric
HigherPasserines

Cone Fundamentals for the Higher Passerines
D50

Standard Illuminant D50 (1964)
Flea2.RGB

Flea2 Camera FL2-14S3C from Point Grey
D65

Standard Illuminant D65 (1964)
F96T12

Photon Irradiance of F96T12 Fluorescent Bulb