<static> setBackgroundColor(canvas, color) → {HTMLCanvasElement}
Sets the background color behind the canvas. This changes the canvas style property.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
canvas | HTMLCanvasElement | The canvas to set the background color on. | ||
color | string | <optional> | 'rgb(0,0,0)' | The color to set. Can be in the format 'rgb(r,g,b)', or '#RRGGBB' or any valid CSS color. |
Returns
HTMLCanvasElement -
Returns the source canvas.
- Source code: utils/Canvas.js (Line 47)
Please login to continue.