A RichText panel class that matches words related to explosions and styles them. It sets text color, shadow, stroke and font weight for matched text.
using Sandbox;
[RichTextPanel( @"\b([Ee]xplod(e|es|ing)|[Ee]xplosi(ons?|ves?))\b" )]
public class RichTextExplosion : RichTextBase
{
public override Color Color => new Color( 1f, 0.55f, 0f, 0.9f );
public override float? TextShadowBlur => 3f;
public override Color? TextShadowColor => (new Color( 0.85f, 0.65f, 0f )).Saturate( 2f ).WithAlpha( 2f );
public override float? TextShadowOffsetY => -2f;
public override int? FontWeight => 900;
public override float? TextStrokeWidth => 3f;
public override Color? TextStrokeColor => Color.Black;
}