ui/richtext/RichTextLegendary.cs

A RichText rule class for the UI that styles occurrences of the word "Legendary" (case-insensitive) in rich text. It sets a green color, enables italics, and applies a font weight of 600.

using Sandbox.UI;

[RichTextPanel( @"\b[Ll]egendary\b" )]
public class RichTextLegendary : RichTextBase
{
	public override Color Color => new Color( 0.3f, 0.8f, 0.3f );
	public override bool Italic => true;
	public override int? FontWeight => 600;
}