Color

text_COLOR_FG_random

Generate a random foreground color code from the allowed (visible) set. Excludes colors that are hard to see on black or white terminal backgrounds.

Exit codes

  • 0: Always

Output on stdout

  • A 256-color terminal color number (integer)

text_COLOR_FG_rgb

Emit a 24-bit (true color) ANSI foreground color escape sequence.

Arguments

  • $1 (integer): Red value (0-255)
  • $2 (integer): Green value (0-255)
  • $3 (integer): Blue value (0-255)

Exit codes

  • 0: Always

Output on stdout

  • ANSI foreground color escape sequence

text_COLOR_BG_rgb

Emit a 24-bit (true color) ANSI background color escape sequence.

Arguments

  • $1 (integer): Red value (0-255)
  • $2 (integer): Green value (0-255)
  • $3 (integer): Blue value (0-255)

Exit codes

  • 0: Always

Output on stdout

  • ANSI background color escape sequence