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

472

Version

1.5-0

License

GPL (>= 3)

Maintainer

Last Published

January 28th, 2024

Functions in colorSpec (1.5-0)

canonicalOptimalColors

compute the Canonical Optimal Colors
chop

chop spectra into low and high parts
colorSpec

constructing and testing colorSpec Objects
colorSpec-package

Package colorSpec - Color Calculations with Emphasis on Spectral Data
calibrate

make a linear modification to a colorSpec responder
computeADL

compute ADL coordinates by ray tracing
as.data.frame

Convert a colorSpec Object to a data.frame
atmosphere

atmospheric transmittance along a horizontal path
extradata

extradata of a colorSpec object
interpolate

interpolate spectra
DisplayRGB

Compute Display RGB from Linear RGB
bind

Combine colorSpec Objects
emulate

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

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

Compute the Spectrum Similarity Index of light spectra
coredata

Extract the Core Data of a colorSpec Object
daylight

Standard Daylight Components
convolvewith

Convolve each spectrum in a colorSpec object with a kernel
computeCCT

Compute Correlated Color Temperature (CCT) of Light Spectra
computeCRI

Compute Color Rendering Index (CRI) of Light Spectra
materialSpectra

compute standard material spectra
logging

Logging in colorSpec package
invert

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

compute standard light spectra
lightResponsivitySpectra

compute standard light responsivity spectra
lms1971

Cone Fundamentals - 2-degree (1971)
linearize

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

calculate mean of multiple spectra
lms2000

Cone Fundamentals - 2-degree (2000)
organization

organization of a colorSpec object
cs.options

Functions to set and retrieve colorSpec package options
photometric

convert illuminant spectra to photometric units
officialXYZ

Query the Official XYZ values for Standard Illuminants
luminsivity

Luminous Efficiency Functions (photopic and scotopic)
metadata

metadata of a colorSpec object
print

Convert colorSpec object to readable text
multiply

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

compute optimal colors by ray tracing
plot

plot spectra
plotOptimals

Plot Optimal Colors
quantity

quantity of a colorSpec object
product

Compute the product of colorSpec objects
sectionOptimalColors

compute sections of an optimal color surface by hyperplanes
scanner

standard RGB scanners
resample

resample a colorSpec Object to new wavelengths
ptransform

make a linear transformation to a colorSpec responder
radiometric

convert a colorSpec object from actinometric to radiometric
readCGATS

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

read colorSpec objects from files
solar.irradiance

Standard Solar Irradiance - Extraterrestrial and Terrestrial
specnames

specnames of a colorSpec object
responsivityMetrics

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

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

Convert from XYZ to some standard RGB spaces
subset

extract a subset of a colorSpec Object
xyz1931

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

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

wavelength vector of a colorSpec object
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
ABC

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

Photon Irradiance of F96T12 Fluorescent Bulb
Flea2.RGB

Flea2 Camera FL2-14S3C from Point Grey
D65

Standard Illuminant D65 (1964)
D50

Standard Illuminant D50 (1964)
actinometric

convert a colorSpec object to be actinometric
HigherPasserines

Cone Fundamentals for the Higher Passerines