Skip to content

colour names using WeeChat's own nick colours - #3

Merged
l5yth merged 2 commits into
mainfrom
l5y-weechat-nick-color-name
Sep 3, 2026
Merged

l5yth merged 2 commits into
mainfrom
l5y-weechat-nick-color-name

Conversation

@l5yth

@l5yth l5yth commented Sep 3, 2026

Copy link
Copy Markdown
Owner

WeeChat already assigns a colour per nick from the user's weechat.color.chat_nick_colors palette via weechat.look.nick_color_hash, and exposes it as info_get("nick_color") and info_get("nick_color_name"). Use those rather than growing a palette and a hash here: a user who has tuned their IRC nick colours gets the same treatment in RRC, and any future change to either setting follows for free.

The key is the identity hash, not the advisory nickname. Colour then follows the person through a /nick, and somebody taking another's nickname does not take their colour with it -- the opposite of what keying on the name would give. Colours still repeat, so a shared colour proves nothing and the short hash stays the authoritative tell.

Names are coloured in the nicklist, on message and action lines, on join and part lines, and in private buffers. The body is never coloured: a reset closes the name, because the body is hub-supplied text that must carry no formatting the plugin did not choose.

@l5yth
l5yth merged commit 417c0df into main Sep 3, 2026
2 of 3 checks passed
@l5yth
l5yth deleted the l5y-weechat-nick-color-name branch September 3, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant