[whatwg] Canvas performance issue: setting colors

Anne van Kesteren annevk at opera.com
Sat Oct 4 03:09:39 PDT 2008


On Sat, 04 Oct 2008 02:55:36 +0200, Greg Houston  
<gregory.houston at gmail.com> wrote:
> Note that also like your example the Mootools color plugin does not
> have separate rgb and rgba methods. It is smart enough to recognize
> that if there is a fourth value in the array it refers to the alpha. I
> never quite grasped why there is both an rgb() and rgba() in canvas.
> It seems like rgb is all that would have been necessary, and if a
> fourth value is passed it obviously refers to the alpha.

That's because canvas "simply" takes a CSS <color> value.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>



More information about the whatwg mailing list