Fix chat name colors (#46109)

* actual name color

* doc update
This commit is contained in:
cashew 2026-09-21 18:09:30 +00:00 • committed by GitHub
parent 0f2eb1f329
commit cc588dc278
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -52,7 +52,7 @@ public sealed partial class TextLinkTag
return null;
if (!_entity.TryGetComponent<GrammarComponent>(uid, out var grammar) || grammar.ProperNoun != true)
return null;
return Color.LightGray; // return default name color
var name = _entity.GetComponent<MetaDataComponent>(uid.Value).EntityName;
return Color.FromHex(chatUi.GetNameColor(name));

View file

@ -13,7 +13,7 @@ namespace Content.Client.UserInterface.RichText;
/// <summary>
/// Markup tag handler for <c>[textlink="LinkText"]</c> nodes. Renders a link
/// <see cref="Label"/> in rich text, covering two link types:
/// <see cref="TextLinkLabel"/> in rich text, covering two link types:
/// <list type="bullet">
/// <item><description>link="GuideEntryPrototypeID" — a plain link.</description></item>
/// <item><description>entity="NetEntity" — an entity link.</description></item>