munsell.js - library for handling Munsell Color System
API Reference provides the details beyond this README file.
$ npm install munsell
import * as munsell from 'munsell'; munsell.munsellToRgb255('2.3YR 6.7/4.22'); // => [ 201, 156, 135 ]
const munsell = require('munsell'); munsell.hexToMhvc('#ABCDEF'); // => [ 73.43648829473781, 8.05763439330249, 5.304123165279228 ]
munsell.js expresses the Munsell Color in two ways, a string or triplet of numbers, which can be identified by the name of method. The former is
munsell, the standard string specification of the Munsell Color: e.g.
"N 10". The latter is
mhvc, or Munsell HVC, its 3-number expression composed of [Hue, Value, Chroma]: e.g.
[94.2, 3, 11],
[0, 10 ,0].
The underlying data of this library is the Munsell Renotation Data. Since this data assume the illuminant to be the Standard Illuminant C, munsell.js uses the Bradford transformation as CAT to other illumnants (e.g. D65).
munsell.js inter- and extrapolates the data via LCHab space, the method of which is in common with dufy, my color library for Common Lisp. The inversion from LCHab to Munsell Color is based on the method suggested by Paul Centore. See the links and articles for more information.
- Centore, Paul. (2012). An open-source inversion algorithm for the Munsell renotation. Color Research & Application. 37. 10.1002/col.20715.
Copyright (c) 2018-2021 Hugo Sansaqua.