soil_color {OxSR} | R Documentation |
Soil color by diffuse reflectance
Description
The function converts the visible soil spectrum to three-dimensional color systems, such as Munsell and RGB, using the CIE tristimulus values for the conversion. This allows for the standardized representation of colors and facilitates visual and comparative analysis.
Usage
soil_color(data = data,
name_wave = "wave",
tri_values = "std",
plot = FALSE)
Arguments
data |
A data.frame containing the wavelength and reflectance values. |
name_wave |
Character indicating the name of the column with the wavelength. It can be only the initial characters. |
tri_values |
Tristimulus Values. Values from the |
plot |
Logical, if TRUE, the plot with the colors is generated, the default is FALSE |
Value
A data.frame
with color values in Munsell
, HVC
, RGB
, and hexadecimal code
.
Examples
# example code
data(soil_refle)
soil_color(soil_refle)
# tristimulus values {colorSpec}
soil_color(soil_refle, tri_values = "xyz1931.1nm", plot = TRUE)
[Package OxSR version 1.0.1 Index]