I\'m looking at at document that describes the standard colors used in dentistry to describe the color of a tooth. They quote hue, value, chroma v
Colour, our open source Python colour science package allows to perform that conversion.
The following two definitions based on Centore (2012) method converts between Munsell Renotation System and CIE xyY colourspace:
Converting from CIE xyY colourspace to sRGB colourspace is done by first converting to CIE XYZ tristimulus values and then to sRGB colourspace using the following definitions:
Here is an annotated complete example using the above definitions:
import colour
# The *Munsell Renotation System* colour we would like to convert
# to *sRGB* colourspace.
MRS_c = '4.2YR 8.1/5.3'
# The first step is to convert the *MRS* colour to *CIE xyY*
# colourspace.
xyY = colour.munsell_colour_to_xyY(MRS_c)
# We then perform conversion to *CIE xyY* tristimulus values.
XYZ = colour.xyY_to_XYZ(xyY)
# The last step will involve using the *Munsell Renotation System*
# illuminant which is *CIE Illuminant C*:
# http://nbviewer.ipython.org/github/colour-science/colour-ipython/blob/master/notebooks/colorimetry/illuminants.ipynb#CIE-Illuminant-C
# It is necessary in order to ensure white stays white when
# converting to *sRGB* colourspace and its different whitepoint
# (*CIE Standard Illuminant D65*) by performing chromatic
# adaptation between the two different illuminant.
C = colour.ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['C']
RGB = colour.XYZ_to_sRGB(XYZ, C)
print(RGB)
[ 0.96820063 0.74966853 0.60617991]
You can also perform the reverse conversion from sRGB colourspace to Munsell Renotation System:
import colour
C = colour.ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['C']
RGB = (0.96820063, 0.74966853, 0.60617991)
print(colour.xyY_to_munsell_colour(colour.XYZ_to_xyY(colour.sRGB_to_XYZ(RGB, C))))
4.2YR 8.1/5.3