• Shaarli
  • Tag cloud
  • Picture wall
  • Daily
  • RSS
  • Login
4287 shaares
Filters

Terminal Colors | Chris Yeh

QRCode

We put these pieces together to create a SGR command. Thus, ESC[1m specifies bold (or bright) text, and ESC[31m specifies red foreground text. We can chain together parameters; for example, ESC[32;47m specifies green foreground text on a white background.

The following diagram shows a complete example for rendering the word “text” in red with a single underline.

CSI Final Byte
\x1b[31;4mtext

https://chrisyeh96.github.io/2020/03/28/terminal-colors.html
October 28, 2025 at 10:20:36 AM EDT *
colorscheme ansi terminal
FILLER
Shaarli · The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community · Documentation
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community