plotPatchesH | R Documentation |
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]", ... )
hue |
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.
|
space |
the name of an installed RGB space.
Spaces |
adapt |
method used to adapt xyY for Illuminant C to xyY for Illuminant D65.
It is passed to |
background |
background color for the plot.
It is passed to |
main |
a string used to set the main title of the plot.
The optional placeholder |
... |
other arguments passed to the function |
The discrete Values are always the same: integers from 0 to 10.
And so the plotting parameter ylim=c(0,11)
.
The discrete Chromas are contiguous even integers depending on the Hue,
and determined as follows.
For the closest discrete Hue in real.dat
,
the patches in real.dat
are transformed to xyY using simple lookup.
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 xlim
.
Patches inside the MacAdam Limits can still be outside the RGB cube.
Patches inside the cube are drawn in the usual way,
and those outside are drawn in outline only,
and with the clamped RGB coordinates printed inside.
TRUE
for success and FALSE
for failure.
Glenn Davis
MunsellToRGB()
,
HueNumberFromString()
,
IsWithinMacAdamLimits()
,
spacesRGB::installRGB()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.