Dale
2015-09-21 21:08:01 UTC
I am using octave and gnuplot to do chromaticity diagrams
both my sRGB. xy and uv, have mis-matches between the forward and
reverse methods from wikipedia, the reverse method seems "right", the
forward method does not reach full on sRGB at primary corners and
neutral axes
I'll use xy for instance
https://en.wikipedia.org/wiki/CIE_1931_color_space
https://en.wikipedia.org/wiki/SRGB
the plots of interest are the last two on this link
http://www.dalekelly.org/octave_gnuplot_xy.html
I used Y=1 on both forward/reverse methods
the forward method I used a range of 0:1 xy and found the xy points in
the sRGB polynomial, converted to xyY, converted to XYZ, converted to
linear_sRGB, converted to gamma_RGB, converted to 0:255 RGB. converted
to sRGBhex
the reverse method I started with 0:255 RGB, converted to RGBhex and
gammaRGB, converted to linearRGB, converted to XYZ, converted to xyY
I remember reading on http://www.brucelindbloom.com/ that
"If the input XYZ color is not relative to the same reference white as
the RGB system, you must first apply a chromatic adaptation transform to
the XYZ color to convert it from its own reference white to the
reference white of the RGB system."
I'll hack at the reference white, my first guess is the forward method
needs it, any assistance appreciated
both my sRGB. xy and uv, have mis-matches between the forward and
reverse methods from wikipedia, the reverse method seems "right", the
forward method does not reach full on sRGB at primary corners and
neutral axes
I'll use xy for instance
https://en.wikipedia.org/wiki/CIE_1931_color_space
https://en.wikipedia.org/wiki/SRGB
the plots of interest are the last two on this link
http://www.dalekelly.org/octave_gnuplot_xy.html
I used Y=1 on both forward/reverse methods
the forward method I used a range of 0:1 xy and found the xy points in
the sRGB polynomial, converted to xyY, converted to XYZ, converted to
linear_sRGB, converted to gamma_RGB, converted to 0:255 RGB. converted
to sRGBhex
the reverse method I started with 0:255 RGB, converted to RGBhex and
gammaRGB, converted to linearRGB, converted to XYZ, converted to xyY
I remember reading on http://www.brucelindbloom.com/ that
"If the input XYZ color is not relative to the same reference white as
the RGB system, you must first apply a chromatic adaptation transform to
the XYZ color to convert it from its own reference white to the
reference white of the RGB system."
I'll hack at the reference white, my first guess is the forward method
needs it, any assistance appreciated
--
Dale
http://www.dalekelly.org
Dale
http://www.dalekelly.org