Skip to main content

fg

Returns a formatted ANSI color sequence string based on the provided integer color code.

def fg(
s: int
) - > string

Formats a terminal color escape sequence using the provided color code.

Parameters

NameTypeDescription
sintThe ANSI color code integer used to define the foreground text color.

Returns

TypeDescription
stringAn ANSI escape sequence string that sets the foreground color in a terminal.