Set white color to DynamicTexture

when I set text color white, text disappears, how i can fix this?
Thanks.
https://playground.babylonjs.com/#WIR77Z#275

You write white on white canvas. Here it is fixed - https://playground.babylonjs.com/#WIR77Z#281
(changed diffuseTexture to emissiveTexture) and
sphereTexture.drawText("some text", null, null, font, "white", sphere.material.diffuseColor, true, true);

1 Like

Note that drawText is expecting colors as string, not Color3/Color4. You can pass “transparent” as the background color of the ADT:

https://playground.babylonjs.com/#WIR77Z#284

2 Likes

We can go even further and use “null” instead of transparent :slight_smile: - https://playground.babylonjs.com/#WIR77Z#285
sphereTexture.drawText("some text", null, null, font, "white", null, true, true);

1 Like

Thank You! :slight_smile: