back to Colorimetry

RGB and CIE and Munsell Color Calculator    (v 1.0, Feb 28, 2020)
Instructions  |  Notes  |  How it Works  |  Learn More  |  Session Info  |  (based on Bruce Lindbloom's CIE Color Calculator)


RGB space: (1)
optical linear RGB: (2)


Y scale:
ISCC-NBS Block:  
  1. Each color space has a corresponding button. To the right of the button are 3 boxes corresponding to the 3 coordinates of the space (except for Munsell which has only 1 box and a customized notation for 3 parameters). In each box the coordinate name is displayed in light gray (the placeholder).
  2. Pick one of the color spaces and enter appropriate numbers in the 3 boxes (only 1 box for Munsell).
  3. Press the corresponding button. The selected color space becomes the source space and the button is colored orange. The entered values for the source space are converted to each of the other color spaces, along the unique path from the source space to the other space. For example, if the Lab button is pressed, Lab becomes the source space and the button looks like this: .
  4. The coordinates are computed in double-precision and converted to text with a fixed number of digits after the decimal point. Hover the cursor over the textbox to see the full precision in a tooltip.
  5. Some of the coordinates have optional scale factors. These scale factors only affect the displayed text and not the underlying number (with scale factor 1).
  6. The HTML color-picker control is linked to Signal RGB. If you pick a color from the control, it is copied to the Signal RGB textboxes. Conversely, when the textboxes change, the values are copied to the color-picker, after rounding to 8 bits.
  7. The ISCC-NBS Block select control is linked to the Munsell specification. If you select a block, the centroid of that block is copied to the Munsell textbox. Conversely, when the Munsell textbox changes, the ISCC-NBS Block that contains that Munsell color is automatically selected.
  1. WARNING: The displayed color-picker color is not guaranteed to have the displayed XYZ, etc. There is no hope of being accurate unless your display has been calibrated for the current RGB space, for example by using DisplayCAL.
  2. RGB values that are outside the current RGB space gamut are simply clamped to the interval [0,1]; there is no gamut compression.
  3. The 5 spaces on the right side do double-duty, and correspond to either Display RGB (the default) or Scene RGB. For the most common RGB spaces, such as the default sRGB, scene and display are the same and are displayed with a white background. When an RGB space has different scene and display, it is displayed with a yellow background, as in the image on the right. Most of these more complex spaces are from ACES Color. The choice between scene and display is called the optical linear RGB. Use the 2 radio buttons to toggle between Scene mode and Display mode; the value of optical linear RGB will change. The reference white (labeled by X,Y,Z) is determined by the RGB space and the optical linear RGB, and it might change too. Hover the cursor over the XYZ button to see a tooltip and whether the space is Scene XYZ or Display XYZ, and similarly for the other buttons on the right.
  4. Some of the conversion arrows are labeled with numbers: (1), (2), or (3). These refer to conversion parameters which affect the corresponding conversion. (1) is for the RGB Space, (2) is for the optical RGB mode, and (3) is for the reference white (which is determined by (1) and (2)). These labels appear on the right of the parameter. If (1) or (2) are changed, all conversions are redone, starting with the current source space (with the orange button).
  5. The xyYMunsell conversion arrow is labeled with (3) because xyY under the current reference white (display white or scene white) is chromatically adapted to xyY under the white point of Illuminant C (or vice-versa). The Munsell system was developed with Illuminant C. The widely-used Bradford chromatic adaptation method is used here. The xyY adapted to Illuminant C is not shown.
  6. The centroids of 3 ISCC-NBS Blocks are tweaked slightly here. The Chromas of "white", "light gray", and "medium gray" are changed from 0.06 to 0, to create exact neutrals.
How it works:
  1. The calculations are done on the server side, in my R packages: spacesRGB, spacesXYZ, and munsellinterpol (coauthor on the last one).
  2. The bridge between R and JavaScript is in packages jrc and jsonlite.
  3. The low-level socket and protocol support for handling HTTP is in package httpuv; Apache is not used here.
  4. This calculator is based on Bruce Lindbloom's excellent CIE Color Calculator, but in his calculator the calculations are on the client side using JavaScript.

Learn More: See these R vignettes and the references there:
  1. spacesRGB User Guide
  2. munsellinterpol User Guide
  3. spacesXYZ Chromatic Adaptation
     Also see these pages by Paul Centore:
  1. Colour Tools for Painters
  2. The ISCC-NBS Colour System
     and these pages by Bruce Lindbloom:
  1. How the CIE Color Calculator Works
  2. Useful Color Equations

Session Info: