Table of Contents

Class NickColorHelper

Namespace
EchoHub.Client.UI.Helpers
Assembly
EchoHub.Client.dll

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

nick string

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)

Parameters

nick string
paletteSize int

Returns

int