Class NickColorHelper
Deterministic per-nick colors for users who haven't picked a nickname color. The same nick always maps to the same palette entry (classic IRC client behavior), so a busy channel stays scannable without any configuration.
public static class NickColorHelper
- Inheritance
-
NickColorHelper
- Inherited Members
Methods
GetAttribute(string)
The color attribute for a nick. Used as a fallback when the user has no explicit nickname color set.
public static Attribute GetAttribute(string nick)
Parameters
nickstring
Returns
- Attribute
GetPaletteIndex(string, int)
Stable palette index for a nick: case-insensitive FNV-1a over the nick,
reduced modulo paletteSize. Pure function (no Terminal.Gui
types) so it is unit-testable without a display driver.
public static int GetPaletteIndex(string nick, int paletteSize)