DrawText with Transparent Background

Hi All, it’s been awhile (last post at HTMLDevs).
I want text with transparent background in my next BIG project (to be posted real-soon-now).
My method: playground

  • Works in Chrome.
  • Works in Firefox.
  • Fails in Microsoft Edge.

Can you offer correction or work-a-round?



Maybe this can help you

Oh sorry, didn’t see it properly. It’s not the same thing. Probably will not help you :slight_smile:

Hi @Coolroar perhaps something along these lines may help https://www.babylonjs-playground.com/#TMHF80#10

1 Like

Interesting, seems as though Edge cannot handle 8-digit hex codes for canvas fillStyle.


Seems to default to whatever the last valid fillStyle was.

1 Like

Hey! Thanks for quick replies :sunglasses:.

Devin_Write: yes, interesting – spot-on demo.

JohnK: that’s it! "transparent" in drawText bg param instead of "#0000" fixes it.