chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] color egg


From: Erik Falor
Subject: Re: [Chicken-users] color egg
Date: Tue, 30 Aug 2016 08:51:13 -0600
User-agent: Mutt/1.6.1 (2016-04-27)

On Mon, Aug 29, 2016 at 11:21:14PM -0400, John J Foerch wrote:
> Hello,
> 
> Has anybody used the color egg to do colorspace conversions?  I'm
> getting some unexpected results, and wonder whether there are bugs in
> the egg, or whether I just misunderstand something about the colorspaces
> involved.
> 
> Here are the relevant links:
> 
>   http://wiki.call-cc.org/eggref/4/color
> 
>   http://people.csail.mit.edu/jaffer/slib/Color.html
> 
> This call gives the result I expect:
> 
>  (color->sRGB (color:RGB709 1 0 0))
>  => (255 0 0)
> 
> This one does not:
> 
>  (color->e-sRGB 16 (color:RGB709 1 0 0))
>  => (57216 24576 24576)
> 
> I would expect a result of (65535 0 0)
 
I just installed and used SLIB with Guile and got the exact result
you did.

> This result also puzzles me:
> 
>  (color->L*C*h (color:RGB709 1 0 0))
>  => (53.2405879437449 104.552006845446 39.997712561153)

I got the exact same result under Guile on my PC.

> I haven't worked with the L*C*h colorspace before, but from my reading,
> since I gave pure red to convert, I would have expected a hue angle of
> 0, a chroma of 100% and a luminosity of something like 50%.

I agree with you that a hue angle of 39.9˚ is unexpected, given that
you began with a pure red color. Have you noticed any other
discrepancies with any of the other color spaces? I only have
experience between L*C*h and sRGB.

> Unfortunately the egg has no unit tests, and I think that if some could
> be written, that would be very helpful.
> 
> Is there anybody familiar with the color egg who can show me where
> either it or I am going wrong?
> 
> Thank you,
> 
> --
> John Foerch

-- 
Erik Falor
Registered Linux User #445632                    http://unnovative.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]