Color.jl icon indicating copy to clipboard operation
Color.jl copied to clipboard

Cannot linspace xyY colors

Open jiahao opened this issue 11 years ago • 2 comments

In[1]: A=XYZ(1.0,0.0,0.0)
B=XYZ(0.0,1.0,0.0)
linspace(A,B,40)

Out[1]:

screen shot 2014-06-09 at 7 18 50 pm

In[2]: A=xyY(1.0,0.0,1.0)
B=xyY(0.0,1.0,1.0)
linspace(A,B,40)
Out[2]: no method weighted_color_mean(Float64, xyY, xyY)
while loading In[2], in expression starting on line 9
 in linspace at /Users/jiahao/.julia/v0.3/Color/src/utilities.jl:57

jiahao avatar Jun 09 '14 23:06 jiahao

Support for DIN99(d/o) is also missing with linspace as these spaces were added to Color.

glennsweeney avatar Jun 12 '14 18:06 glennsweeney

If you do a quick sanity check of the color coordinates of A and B in the first example you can see that none of of the colors exist. They are all outside of the human visual gamut. Even if you would compress the gamut to existing colors, A would be black because Y is zero. The second example uses the same colors, just in a different color space. I know that out of gamut colors are common, but they only make sense in terms of device color spaces, like sRGB or AdobeRGB. The difference is that their gamut boundaries still lie inside the visual gamut. They still describe existing colors, and out of gamut colors just can’t be displayed on said devices. Colors outside the human visual gamut just don’t exist at all and don’t make sense.

m-lohmann avatar Sep 30 '14 10:09 m-lohmann