Applying color to text doesn't seem to work. In my case, I was trying to set my text color to white using the fill attribute, with the value either "0xfff" or "white".
Another issue is that when fill is an array, it only accepts numbers
Work around for me:
<Text text={Some text} x={10} y={10} style={ new PIXI.TextStyle({ fontSize: 24, fill: 'white', // doesnt work // @ts-ignore _fill: ['#ffffff', '#00ff99'], // work pretty well }) } />
Current Behavior
Applying color to text doesn't seem to work. In my case, I was trying to set my text color to white using the
fill
attribute, with the value either "0xfff" or "white". Another issue is that whenfill
is an array, it only accepts numbersExpected Behavior
Text should render color as the setting
Steps to Reproduce
Here is my sample code written in Typescript:
Here is the result:
Environment
@pixi/react
version: ^7.1.2pixi.js
version: ^8.1.0React
version: 18.0.0ReactDOM
version: 18.0.0Possible Solution
No response
Additional Information
No response