JuliaAttic / Color.jl

Basic color manipulation utilities.
Other
47 stars 21 forks source link

Cannot linspace xyY colors #39

Open jiahao opened 10 years ago

jiahao commented 10 years ago
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
glennsweeney commented 10 years ago

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

m-lohmann commented 9 years ago

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.