Hello,
I have what I believe is a simple question but I can’t figure it out. I am trying to modify the color element of a text components outline instead of just changing its color.
I tried this.object.element.outlineColor = new pc.Color(198,0,84);
but no change occured. I’m not sure what its supposed to look like. Can someone help me lol.
Hi @aperez440,
If that’s the issue: pc.Color expects color ranges from 0 to 1, so make sure to convert your RGB color to that.
this.object.element.outlineColor = new pc.Color(198 / 255,0,84 / 255);
Hey @Leonidas thanks for the reply. I actually have it working as I typed above, I had just forgotten to out an outline thickness that wasn’t 0 so I couldn’t see it lol.
Your help was appreciated.
1 Like