canvas change line color code example Example: canvas change line color context.strokeStyle = '#ff0000';