Skip to main content

role

Function role 

Source
pub fn role(caps: TerminalCaps, role: Role) -> Option<Color>
Expand description

Semantic colour role → concrete Color, honouring NO_COLOR etc. Returns None when colours are disabled OR when the role intentionally uses the terminal’s default foreground (so strong/tool-name text just gets SGR bold without a fixed colour).