HTML5 Canvas Line Color Tutorial

To set the color of an HTML5 Canvas line, we can use the strokeStyle property of the canvas context, which can be set to a color string such as red, green, or blue, a hex value such as #FF0000 or #555, or an RGB value such as rgb(255, 0, 0).

Open in new window

Code Editor

Modified on April 8th, 2013 by Eric Rowell
comments powered by Disqus