Skip to main content
4 of 5
made the image clickable
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375

One hypothesis:

If mathematica's using this set of formulae to convert from XYZ to RGB:

//This is coming from www.easyrgb.com

var_X = X / 100        //X from 0 to  95.047      (Observer = 2°, Illuminant = D65)
var_Y = Y / 100        //Y from 0 to 100.000
var_Z = Z / 100        //Z from 0 to 108.883

var_R = var_X *  3.2406 + var_Y * -1.5372 + var_Z * -0.4986
var_G = var_X * -0.9689 + var_Y *  1.8758 + var_Z *  0.0415
var_B = var_X *  0.0557 + var_Y * -0.2040 + var_Z *  1.0570

if ( var_R > 0.0031308 ) var_R = 1.055 * ( var_R ^ ( 1 / 2.4 ) ) - 0.055
else                     var_R = 12.92 * var_R
if ( var_G > 0.0031308 ) var_G = 1.055 * ( var_G ^ ( 1 / 2.4 ) ) - 0.055
else                     var_G = 12.92 * var_G
if ( var_B > 0.0031308 ) var_B = 1.055 * ( var_B ^ ( 1 / 2.4 ) ) - 0.055
else                     var_B = 12.92 * var_B

R = var_R * 255
G = var_G * 255
B = var_B * 255 

AND, if their algorithm tries to normalize the result to have the highest R or G or B value to be equal to 255

AND, if any RGB value below 0 is simply ignored and set to 0

THEN, 570 nm having the CIE xy coordinates:

x = 0.4441
y = 0.5547

Should give, after following these rules, the XYZ values:

X = 72.77  // this is proportionnal to Y
Y = 90.89  // this is to give the value 255 to the G value
Z = 0.2    // this is proportionnal to Y (and extremely low!)

These values give the following rounded RGB values at gamma = 2.4

R = 230
G = 255
B = - 471

Of course, if you cut the - 471 and replace it with 0, that makes quite a difference, let's see what CIE L*a*b* basic delta E color difference formulae will say (the delta E is just the Cartesian distance between 2 points in the CIE L*a*b* colorspace)

We call C the original conversion an C' the 'minus-cut' value

C    L*= 96.367
     a*= -26.924
     b*= 163.337

C'   L*= 95.305
     a*= -31.712
     b*= 92.307

The delta E is:

D = sqrt((96.367-95.305)^2+(-26.924+31.712)^2+(163.337-92.307)^2)

D = -71.199   (!!!!)

Knowing that a delta E superior to 1~2 is supposed to be perceptible, we see that here the color difference is supposed to be HUGE

One can argue that a color difference formula applied in this context might not be appropriated, and be right thinking so, but it is still a good illustration of what cutting negative values will produce...

Strangely, the software from EasyRGB is giving the following values, which are more yellowish:

R = 250.46
G = 255
B = 0

Couldn't find why...

**

EDIT:

Anyway,

Never forget that fact that it is simply impossible to display any spectral color on a screen!

Spectral colors in RGB will produce Red/Green/Blue values above 255 or below 0, When it's RED = 380 or -600, the difference between what's displayed and what it should be is SIGNIFICANT.

A better way I know to render the color spectra on a computer screen is to compute a mixture of white light + spectral colors, like this guy Nick Spiker did:

spectra avg with white light

The principle is: white light is added until the negative values become positive or 0 and until the RGB values are below or equal to 255

This rendering gives you a visual result which is close to what spectral lights viewed in daylight conditions look like, and it is more exact than anything else I.M.Opinion.