Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

contrastChart

Color Contrast Chart


Description

Compare one or more pages from a simulated Munsell book of soil colors to a reference color.

Usage

contrastChart(
  m,
  hues,
  ccAbbreviate = 1,
  style = "hue",
  gridLines = FALSE,
  thresh = NULL,
  returnData = FALSE
)

Arguments

m

Munsell representation of a single color for comparison e.g. '10YR 4/3'

hues

vector of one or more Munsell hue pages to display

ccAbbreviate

length of abbreviated contrast classes, use 0 to suppress labels

style

'hue' or 'CC', see details

gridLines

logical, add grid lines to the color contrast chart

thresh

threshold (<) applied to pair-wise comparisons and resulting color chips

returnData

logical, return lattice figure + data used to generate the figure

Details

A simulated Munsell color book page or pages are used to demonstrate color contrast between all chips and the reference color m (highlighted in red). NCSS color contrast class and CIE delta-E00 values are printed below all other color chips. Munsell color chips for chroma 5 and 7 are omitted, but axis labels are retained as a reminder of this fact.

Setting style='hue' emphasizes the contrast classes and CIE delta-E00 of chips adjacent to m. Setting style='CC' emphasizes adjacent chips according to respective contrast class via lattice panels.

Two-way panels are used when multiple hues are provided and style='CC'. The default output can be greatly enhanced via:

latticeExtra::useOuterStrips(..., strip = strip.custom(bg=grey(0.85)), strip.left = strip.custom(bg=grey(0.85)) )

Author(s)

D.E. Beaudette

Examples

# single hue page
contrastChart(m = '10YR 3/3', hues = '10YR')

# multiple hue pages
contrastChart(m = '10YR 3/3', hues = c('10YR', '2.5Y'))

# contrast class, single hue
contrastChart(m = '10YR 3/3', hues = '10YR', style='CC')

# contrast class, multiple hues
# consider latticeExtra::useOuterStrips()
contrastChart(m = '10YR 5/6', hues = c('10YR', '2.5Y'), style='CC')

aqp

Algorithms for Quantitative Pedology

v1.29
GPL (>= 3)
Authors
Dylan Beaudette [aut, cre], Pierre Roudier [aut, ctb], Andrew Brown [aut, ctb]
Initial release
2021-04-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.