colorVariation: Quantitative Description of Color Variation

View source: R/colorVariation.R

colorVariationR Documentation

Quantitative Description of Color Variation

Description

This function computes several measures of "color variation", typically associated with soil colors described in the Munsell system, using the CIE2000 dE (dE00) color contrast metric. The resulting dE00 summaries map closely to color differences as perceived by "average human vision".

Usage

colorVariation(m, method = c("frequency", "centroid", "reference"), ref = NULL)

Arguments

m

character vector of colors, described using the Munsell system e.g. c('10YR 3/3', '5YR 4/6')

method

character, one of c('frequency', 'centroid', 'reference'), see Details

ref

character, a reference color specified in the Munsell system when method = 'reference'

Details

dE00 values are computed according to method:

  • 'frequency': relative to most frequency color in m

  • 'centroid': relative to centroid (CIELAB coordinates) of colors specified in m

  • 'reference': relative to color specified in ref

Value

numeric dE00 summary of color variation

Examples


m <- c('10YR 3/3', '10YR 4/4', '10YR 4/4', '5GY 6/8')
colorVariation(m)


aqp documentation built on Jan. 17, 2026, 9:07 a.m.