Re: [Haskell-cafe] Colour tutorial (Was: AC-Vector, AC-Colour and AC-EasyRaster-GTK)

2009-07-11 Thread Derek Elkins
On Fri, Jul 10, 2009 at 12:42 AM, rocon...@theorem.ca wrote:
 On Thu, 9 Jul 2009, rocon...@theorem.ca wrote:

 You can use by lib without worrying about the CIE.  You can use my library
 without ever importing or using the word CIE.  However, the CIE stuff is
 there for those who need it.

 Perhaps I (maybe with some help) need to make a tutorial on the haskell
 wiki to try to make it less intimidating.

 Okay, I threw together a quick introduction at
 http://www.haskell.org/haskellwiki/Colour.  Any changes, comments,
 corrections, and addtions are welcome.  It's a wiki!

 The word CIE does occur at all in the document.

I read this and it irks me that opaque is not a monoid homomorphism
despite being the natural injection of non-transparent colours into
semi-transparent colours with pureColour being the projection back.
[Incidentally, you have a typo in pureColour, ac `over` mempty should
be ac `over` black or opaque black presumably, or even opaque mempty,
which I think was what you were going for, illustrating my point.]
It's like defining mappend on Integers as (+) and on Reals as (*);
actually, I think this is very close to what is actually happening.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Colour tutorial (Was: AC-Vector, AC-Colour and AC-EasyRaster-GTK)

2009-07-11 Thread Derek Elkins
On Sat, Jul 11, 2009 at 12:54 PM, Derek Elkinsderek.a.elk...@gmail.com wrote:
 On Fri, Jul 10, 2009 at 12:42 AM, rocon...@theorem.ca wrote:
 On Thu, 9 Jul 2009, rocon...@theorem.ca wrote:

 You can use by lib without worrying about the CIE.  You can use my library
 without ever importing or using the word CIE.  However, the CIE stuff is
 there for those who need it.

 Perhaps I (maybe with some help) need to make a tutorial on the haskell
 wiki to try to make it less intimidating.

 Okay, I threw together a quick introduction at
 http://www.haskell.org/haskellwiki/Colour.  Any changes, comments,
 corrections, and addtions are welcome.  It's a wiki!

 The word CIE does occur at all in the document.

 I read this and it irks me that opaque is not a monoid homomorphism
 despite being the natural injection of non-transparent colours into
 semi-transparent colours with pureColour being the projection back.
 [Incidentally, you have a typo in pureColour, ac `over` mempty should
 be ac `over` black or opaque black presumably, or even opaque mempty,
 which I think was what you were going for, illustrating my point.]
 It's like defining mappend on Integers as (+) and on Reals as (*);
 actually, I think this is very close to what is actually happening.

I'm mistaken about the typo in pureColour, but luckily the mistake
just further illustrates my point.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Colour tutorial (Was: AC-Vector, AC-Colour and AC-EasyRaster-GTK)

2009-07-10 Thread Dougal Stanton
On Fri, Jul 10, 2009 at 6:42 AM, rocon...@theorem.ca wrote:
 On Thu, 9 Jul 2009, rocon...@theorem.ca wrote:

 You can use by lib without worrying about the CIE.  You can use my library
 without ever importing or using the word CIE.  However, the CIE stuff is
 there for those who need it.

 Perhaps I (maybe with some help) need to make a tutorial on the haskell
 wiki to try to make it less intimidating.

 Okay, I threw together a quick introduction at
 http://www.haskell.org/haskellwiki/Colour.  Any changes, comments,
 corrections, and addtions are welcome.  It's a wiki!

Excellent!

I admit to being Quite Baffled by the new terminology when I tried
using this library a few months ago. Spent a lot of time on WP trying
to find out what everything was! Even something as simple as stating
yes, just use Colour Double makes the library seem a lot easier to
plumb in to other things.

A couple of notes:

Section 4.2: Out of gamut channels be clamped to either to the range
0 to 255 -- some kind of mix-up here

Section 5: Note that\n\nOne should avoid dissolving has a spurious
line break, or an unfinished sentence.

Cheers,

D


-- 
Dougal Stanton
dou...@dougalstanton.net // http://www.dougalstanton.net
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Colour tutorial (Was: AC-Vector, AC-Colour and AC-EasyRaster-GTK)

2009-07-09 Thread roconnor

On Thu, 9 Jul 2009, rocon...@theorem.ca wrote:

You can use by lib without worrying about the CIE.  You can use my library 
without ever importing or using the word CIE.  However, the CIE stuff is 
there for those who need it.


Perhaps I (maybe with some help) need to make a tutorial on the haskell wiki 
to try to make it less intimidating.


Okay, I threw together a quick introduction at 
http://www.haskell.org/haskellwiki/Colour.  Any changes, comments, 
corrections, and addtions are welcome.  It's a wiki!


The word CIE does occur at all in the document.

--
Russell O'Connor  http://r6.ca/
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe