*Published April 29, 2015 by Scott Allen Burns, last updated May 26, 2021*

**Change Log**

9/19/2017 Updated symbols to reflect common colormetric usage: instead of , instead of , instead of , instead of .

9/20/2017 Added explicit formula for in LSS method.

9/26/2018 Added link to a fast reflectance reconstruction method.

10/2/2018 Changed matrix to be called , which matches established usage.

10/10/2018 Changed to the more correct non-italic form .

10/18/2018 Added a line-by-line explanation of how to read the Matlab code for ILSS.

11/1/2018 Did some minor editing for clarification of some points.

5/23/2019 Added attribution to earlier work related to the LSS method. Added notice of upcoming publication in the

*Color Research and Application*journal.

6/4/2019 Added new LHTSS (Least Hyperbolic Tangent Slope Squared) method that gives best quality reflectances of all six methods. It appears at the end of the article.

12/25/2019 Added link to short note on implementing the Rec.BT.2020 RGB primaries.

1/9/20 Added notifications in the body pointing out that LHTSS is a better option than ILLSS in general.

1/18/20 Added link to CR&A paper.

3/29/20 Added preface and reference to TLSS.

4/13/20 Updated the preface.

5/11/20 Corrected a typo in the F expression for the LHTSS method. (Thanks Marnix!)

5/15/20 Added links to Excel spreadsheets that implement the LLSS and LHTSS methods.

5/25/20 Added link to the Wiley Online Library for the CR&A journal paper.

5/26/21 Divided the web page into a series of pages for faster loading.

By Spigget [CC BY-SA 3.0], via Wikimedia Commons (edited)

##### Preface

**A note to those working in the color science field:** This presentation is aimed at a general audience and will cover much background material with which you are already familiar. A much more concise version of the methods presented below is available in the journal article “Numerical Methods for Smoothest Reflectance Reconstruction,” which has been published in Color Research and Application (Vol 45, No 1, 2020, pp 8-21, DOI: 10.1002/col.22437). Please contact me for publication requests. Additional development is also available online at the supplementary documentation web page that accompanies the CR&A paper. Note that the three methods presented in the journal paper (called simply methods 1, 2, and 3) correspond to the methods below called LSS, LLSS, and LHTSS, respectively.

#### Overview

I present several algorithms for generating a reflectance curve from a specified sRGB triplet, written for a general audience. Although there are an infinite number of reflectance curves that can give rise to the specific color sensation associated with an sRGB triplet, the algorithms presented here are designed to generate reflectance curves that are similar to those found with naturally occurring colored objects. My hypothesis is that the reflectance curve with the least sum of slope squared (or in the continuous case, the integral of the squared first derivative) will do this. After presenting the algorithms, I examine the quality of the computed reflectance curves compared to thousands of documented reflectance curves measured from paints and pigments available commercially or in nature. Being able to generate reflectance curves from three-dimensional color information is useful in computer graphics, particularly when modeling color transformations that are wavelength specific.

#### Introduction

There are many different 3D color space models, such as XYZ, RGB, HSV, L*a*b*, etc., and one thing they all have in common is that they require only three quantities to describe a unique color sensation. This reflects the “trichromatic” nature of human color perception. The space of *color stimuli*, however, is not three dimensional. To specify a unique color stimulus that enters the eye, the power level at every wavelength over the visible range (e.g., 380 nm to 730 nm) must be specified. Numerically, this is accomplished by discretizing the spectrum into narrow wavelength bands (e.g., 10 nm bands), and specifying the total power in each band. In the case of 10 nm bands between 380 and 730 nm, the space of color stimuli is 36 dimensional. As a result, there are many different color stimuli that give rise to the same color sensation (infinitely many, in fact).

For most color-related applications, the three-dimensional representation of color is efficient and appropriate. But it is sometimes necessary to have the full wavelength-based description of a color, for example, when modeling color transformations that are wavelength specific, such as dispersion or scattering of light, or the subtractive mixture of colors, for example, when mixing paints or illuminating colored objects with various illuminants. In fact, this web page was developed in support of another page on this site, concerning how to compute the RGB color produced by subtractive mixture of two RGB colors.

I present several algorithms for converting a three-dimensional color specifier (sRGB) into a wavelength-based color specifier, expressed in the form of a reflectance curve. When quantifying object colors, the reflectance curve describes the fraction of light that is reflected from the object by wavelength, across the visible spectrum. This provides a convenient, dimensionless color specification, a curve that varies between zero and one (although fluorescent objects can have reflectance values >1). The motivating idea behind these algorithms is that the one reflectance curve that has the least sum of slope squared (integral of the first derivative squared, in the continuous case) seems to match reasonably well the reflectance curves measured from real paints and pigments available commercially and in nature. After presenting the algorithms, I compare the computed reflectance curves to thousands of documented reflectance measurements of paints and pigments to demonstrate the quality of the match.

#### Navigation

The presentation is spread over several web pages. Click the Next Page or Previous Page links to move sequentially. To access a page directly, use these links:

1. Introduction (this page)

2. Computing an sRGB triplet from a Reflectance Curve

3. Linear Least Squares (LLS) Method

4. Least Slope Squared (LSS) Method

5. Least Log Slope Squared (LLSS) Method

6. Iterative Least Log Slope Squared (ILLSS) Method

7. Iterative Least Slope Squared (ILSS) Method

8. Comparison of Methods

9. Conclusions (pre-6/4/19)

10. Update 6/4/19: Least Hyperbolic Tangent Slope Squared (LHTSS) Method