Skip to main content

user_color

Function user_color 

pub fn user_color(user_id: &str) -> (u8, u8, u8)
Expand description

Stable identity colour for a collaborator who has not chosen one: the presence hue crate::tokens::PresenceHue::of_identity derives from their id, as the sRGB colour in PEER_PALETTE. A pure function of the id alone: two hosts painting the same room see different peer sets (everyone but themselves), so a colour derived from who’s present couldn’t agree across machines.

This is the identity as it travels; paint it through theme.tokens.colors.presence.of_rgb(..), which carries the hue at the active theme’s presence lightness and chroma.