Cocos Creator
Fill Color
The fillColor
property represents the color used for the fill
function.
Example
ts
const ctx = node.getComponent(Graphics);
ctx.fillColor = new Color().fromHEX('#0000ff');
ctx.rect(20,20,250,200);
ctx.stroke();
Return to the Graphics Component Reference documentation.