MunsellSpecToColorlabFormat | R Documentation |
Convert Munsell Specification to Colorlab Format
MunsellSpecToColorlabFormat( MunsellSpec )
MunsellSpec |
a numeric Nx3 matrix, or a vector that can be converted to such a matrix, by row.
Each row of the matrix contains an HVC vector.
H is automatically wrapped to the interval (0,100]. |
Colorlab Munsell format uses 4 numbers.
Hue Step, in the interval (0,10], or 0 for neutrals. In Colorlab documentation it is called the hue shade. It is also the Hue Number H mod 10 (unless H is an exact multiple of 10).
Munsell Value, in the interval [0,10]
Munsell Chroma, non-negative
Hue Index, an integer from 1 to 10, or 0 for neutrals. This index defines the principal hue, see Details.
an Nx4 matrix, with rows as described in Details.
Value and Chroma are simply copied unchanged.
The complex part is conversion of Hue Number to Colorlab Hue Step and Hue Index.
If Chroma is 0, both the Hue Step and Hue Index are set to 0.
Invalid input values are converted to NA
s.
If the input is a character vector,
the rownames of the returned matrix are set to that vector.
The Colorlab format is closer to the
Munsell Book of Color (1929) than HVC.
In the book the hue circle is divided into 10
principal hues - 5 simple and 5 compound.
The 10 hue labels are: R, YR, Y, GY G, BG, B, PB, P
(simple are 1 letter and compound are 2 letters).
In Colorlab these labels are replaced by the Hue Index.
WARNING: In the Munsell System, see Cleland, there is a different Hue Index -
R is 1, YR is 2, ..., P is 10.
The Colorlab index has a different origin, and goes around the circle in a different
direction !
Each one of these major hues corresponds to an arc on the circle,
with a 10-point hue scale.
The midpoint of the arc has hue step = 5.
Fortunately this 10-point hue scale is exactly the same as the Colorlab Hue Step.
Jose Gama and Glenn Davis
Color Processing Toolbox. Colorlab 1.0. https://www.uv.es/vista/vistavalencia/software/colorlab.html
Cleland, T. M. A Practical description of the Munsell Color System with Suggestions for its Use. (1921)
HVCfromMunsellName()
,
ColorlabFormatToMunsellSpec()
MunsellSpecToColorlabFormat( c(100,5,5, 10,3,4, 90,4,3, 77,1,2, 66,2,0, 0,1,2 ) ) ## HN V C HI ## 10.00RP 5.00/5.00 10 5 5 8 ## 10.00R 3.00/4.00 10 3 4 7 ## 10.00P 4.00/3.00 10 4 3 9 ## 7.00PB 1.00/2.00 7 1 2 10 ## N 2.00/ 0 2 0 0 ## 10.00RP 1.00/2.00 10 1 2 8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.