UIStroke
For more details on the UIStroke object, see here.
An instance that applies an outline to text or a UI border. Key features include:
- Adjust the color and thickness of the stroke outline.
- Change the stroke transparency independently from the text or UI object.
- Choose the corner style of the stroke (round, bevel, or miter).
- Add a gradient to the stroke via the UIGradient instance.
- Use rich text tags to add stroke to inline text segments.
Rich Text
If your text object has rich text enabled, you can control stroke properties on segments of the string via the <stroke> tag.
Property | Description | Default |
---|---|---|
color | Sets the stroke color. | rgb(0, 0, 0) |
joins | Sets the corner style. Can be set to round, bevel, or miter. | round |
thickness | Sets the stroke thickness. | 1 |
transparency | Sets the stroke transparency. | 0 |
The <font color="#c80032"><mark><stroke color="#fcc633" thickness="4">dragon</stroke></mark></font> is hungry.

Summary
Properties
Determines whether to apply the stroke to the object's border instead of the text itself.
Determines how corners are interpreted.
Sets the stroke opacity independently of the parent object's BackgroundTransparency or TextTransparency.
Methods
Events
Properties
ApplyStrokeMode
When a UIStroke instance is applied to a text object, this property determines whether to apply the stroke to the object's border instead of the text itself.


For more details on the UIStroke object, see here.
Color
Determines the UIStroke stroke color. You can also insert a UIGradient instance as a child of the UIStroke to create gradient strokes.


Note that both the parent object and UIStroke can have child UIGradients, letting you set gradients on both the stroke and fill independently.
For more details on the UIStroke object, see here.
Enabled
This property determines whether the UIStroke is visible. When set to false, the stroke will not be rendered. The value defaults to true.
For more details on the UIStroke object, see here.
LineJoinMode
This property determines how corners are interpreted. It accepts a value of either Round, Bevel, or Miter. Default is Round.



For more details on the UIStroke object, see here.
Thickness
This property determines the stroke's thickness, measured in pixels from the parent's outer edges.


Be mindful of tweening the Thickness property of a UIStroke applied to text objects. This renders and stores many glyph sizes each frame, potentially causing performance issues or text flickering.
For more details on the UIStroke object, see here.
Transparency
The Transparency property sets the stroke opacity independently of the parent object's BackgroundTransparency or TextTransparency. This allows you to render text and borders that are "hollow" (consisting of only an outline).


For more details on the UIStroke object, see here.