rezoner / CanvasQuery

Canvas for 2d gamedevelopers. Out of box canvas, keyboard, mouse, events.
http://canvasquery.com
586 stars 52 forks source link

Are colors broken right now? #19

Closed bwiklund closed 10 years ago

bwiklund commented 11 years ago

I'm seeing that this cq.color(0,0,0,1) creates a color with undefined for r, g, and b, while wrapping the values in an array cq.color([0,0,0,1]) creates the color correctly. Is this broken, or is #color changing? If so, I can make a PR.

rezoner commented 11 years ago

Yeah I have changed the syntax in order to implement parsing from various formats - for example

cq.color([255, 0, 0], "rgb") cq.color([0.5, 0.2, 0.7], "hsl")

also it now parses strings

cq.color("rgb(0, 128, 64)")

same for hsl, hsv, hsla, hsva, rgba

Sorry for the mess.

rezoner commented 10 years ago

See color object reference

http://canvasquery.com/color