Functions / color
color(color)
color( )
color(string color)

color( )
return: array: color of object
Code
<script type="text/javascript">
	function start_1(idCanvas)
	{
		var myColor=jc('#myCircle').color();
		alert('R: '+myColor[0]+
		' G:'+myColor[1]+
		' B:'+myColor[2]+
		' A:'+myColor[3]);
	}
	function onload_1(idCanvas)
	{
		jc.start(idCanvas);
		jc.clear(idCanvas);
		jc.circle(100,120,50,'rgba(255,0,0,0.5)')
			.id('myCircle');
		jc.start(idCanvas);
	}
</script>
<canvas id="canvas_1" width="250px" height="265px">
</canvas>
View
color(string color)
return: object
Allow to set color of object.
Code
<script type="text/javascript">
	function start_2(idCanvas)
	{
		jc('#circle_21')
			.color('#0000ff');
		jc('#circle_22')
			.color('rgba(255,0,0,0.5)');
		jc('#circle_23')
			.color('rgb(0,255,0)');
		jc('#circle_24')
			.color({r:15,g:50,b:200,a:0.2});
		jc('#circle_25')
			.color('#f00');
		jc.start(idCanvas);
	}
	function onload_2(idCanvas)
	{
		jc.start(idCanvas);
		jc.circle(100,120,50,'rgba(255,0,0,0.5)',1)
			.id('circle_21');
		jc.circle(150,120,50,'rgb(0,255,0)',1)
			.id('circle_22');
		jc.circle(125,140,50,'#0000ff',1)
			.id('circle_23');
		jc.circle(125,100,50,{r:15,g:50,b:200},1)
			.id('circle_24');
		jc.circle(170,170,50,{r:15,g:50,b:200},1)
			.id('circle_25');
		jc.start(idCanvas);
	}
	function stop_2(idCanvas)
	{
		jc.clear(idCanvas);
		onload_2(idCanvas);
	}
</script>
<canvas id="canvas_2" width="250px" height="265px"></canvas>
View