November 2011
Intermediate to advanced
384 pages
13h 23m
English
You can customize what color is used when drawing on the canvas. Earlier sections of this chapter have shown shapes, paths, and text drawn in black, which is the default if the fillStyle and strokeStyle attributes are undefined.
context.fillStyle = 'color';context.strokeStyle = 'color';
The color value can be one of four string formats:
Read now
Unlock full access