CanvasContext.setFillStyle

Set the color of the fill.

Parameters

It is Object type.

PropertyTypeDescription
colorColorThe color.

Sample Code

copy
const ctx = my.createCanvasContext('awesomeCanvas')
ctx.setFillStyle('blue')
ctx.fillRect(50, 50, 100, 175)
ctx.draw()