// Simple Fills
new TextStyle({ fill: 'red' }); // Color string
new TextStyle({ fill: 0x00ff00 }); // Hex color
new TextStyle({ fill: 'rgb(255,0,0)' }); // RGB string
// Gradients
new TextStyle({
fill: new FillGradient({
end: { x: 1, y: 1 },
stops: [
{ color: 0xff0000, offset: 0 }, // Red at start
{ color: 0x0000ff, offset: 1 }, // Blue at end
]
}),
});
// Patterns
new TextStyle({
fill: new FillPattern(Assets.get('pattern.png'))
});
The fill style input for text styles.
This can be: