This plot simulates a page from the Munsell Book of Color. The colors are best viewed on a display calibrated for the RGB space given as the second argument.
plotPatchesH( hue, space='sRGB', adapt='Bradford', background='gray50',
main="Hue %s (H=%g) [%s adapt=%s]",
value=NULL, chroma=NULL, ... )
TRUE
for success and FALSE
for failure.
a Munsell hue for which the plot is created.
It is automatically wrapped to the interval (0,100].
It does not have to be a multiple of 2.5.
hue
can also be a numeric vector of such numbers,
and then a separate plot is made for each element of the vector.
hue
can also be a character vector of Hue Names,
which is then converted to a numeric vector using
HueNumberFromString()
.
the name of an installed RGB space.
Spaces 'sRGB'
and 'AdobeRGB'
are pre-installed,
and others can be installed using spacesRGB::installRGB()
method used to adapt xyY for Illuminant C to xyY for Illuminant D65.
It is passed to MunsellToRGB()
.
background color for the plot.
It is passed to par()
as argument bg
.
a string used to set the main title of the plot.
The optional placeholder '%s'
is replaced by the Hue Name,
'%g'
is replaced by the Hue Number,
the next '%s'
is replaced by space
, and
the last '%s'
is replaced by adapt
.
a vector of Munsell Values to use for the plot.
Values must be in the interval [0,10], and in strictly increasing order.
Non-integers, such as 2.5 and 8.5, are valid.
If value=NULL
, then it is set to 0:10
.
a vector of Munsell Chromas to use for the plot.
Chromas must be non-negative and in strictly increasing order.
Odd integers and non-integers are valid.
If chroma=NULL
, then a sequence of even numbers is chosen,
starting at 0 and ending at the Chroma limit for the given Hue page, see Details.
other arguments passed to the function MunsellToRGB()
.
This includes hcinterp
, vinterp
, and xyC
.
Glenn Davis
If chroma=NULL
,
for the closest discrete Hue in real.dat
,
the patches in real.dat
are transformed to xyY using simple lookup with no interpolation.
These are then tested against the MacAdam Limits for Illuminant C
using IsWithinMacAdamLimits()
.
The patches outside the limits are discarded,
and the maximum Chroma of the remaining patches,
which is always an even integer, determines chroma
.
Patches inside the MacAdam Limits can still be outside the RGB cube;
those patches are drawn in outline only, and with the clamped RGB coordinates printed inside.
MunsellToRGB()
,
HueNumberFromString()
,
IsWithinMacAdamLimits()
,
spacesRGB::installRGB()