FUNCTION::ANSI_SET_COLOR(3stap)
π NAME
function::ansi_set_color β sets the ansi Select Graphic Rendition mode, bestie. that's the whole vibe.
this lil guy lives in the SystemTap Tapset Reference, section 3stap, under the "Utility functions for using ansi" umbrella π
β¨ SYNOPSIS β¨
three whole flavors, pick ur fighter:
1) ansi_set_color(fg:long)
2) ansi_set_color(fg:long,bg:long)
3) ansi_set_color(fg:long,bg:long,attr:long)
π¨ ARGUMENTS π¨
fgβ the foreground color you wanna set. the main character, literally.bgβ the background color you wanna set. the supporting cast π«Άattrβ the color attribute you wanna set. the lil je ne sais quoi β¨
π DESCRIPTION π
okay so there's three modes and they're all just sending ansi codes for Select Graphic Rendition, no cap:
- sends the ansi code for Select Graphic Rendition mode for the given foreground color. the lineup is: Black (30), Blue (34), Green (32), Cyan (36), Red (31), Purple (35), Brown (33), Light Gray (37). that's it, that's the palette π
- sends the ansi code for Select Graphic Rendition mode for the given foreground color β Black (30), Blue (34), Green (32), Cyan (36), Red (31), Purple (35), Brown (33), Light Gray (37) β and the given background color, which is: Black (40), Red (41), Green (42), Yellow (43), Blue (44), Magenta (45), Cyan (46), White (47). double the color, double the slay π
- sends the ansi code for Select Graphic Rendition mode for the given foreground color β Black (30), Blue (34), Green (32), Cyan (36), Red (31), Purple (35), Brown (33), Light Gray (37) β the given background color β Black (40), Red (41), Green (42), Yellow (43), Blue (44), Magenta (45), Cyan (46), White (47) β and the color attribute. the attributes on deck are: All attributes off (0), Intensity Bold (1), Underline Single (4), Blink Slow (5), Blink Rapid (6), Image Negative (7). full glow-up mode fr fr π₯
π SEE ALSO π
tapset::ansi(3stap) β go read that one next, iykyk π¦
and that's the whole page, babes π this was the SystemTap Tapset Reference, Version 3stap vibes, dated September 2026 β periodt, go make ur terminal pretty πβ¨
π¦ where this page comes from
- centos-stream 10: systemtap-client 5.6-3.el10 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- centos-stream 9: systemtap-client 5.6-3.el9 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- fedora 43: systemtap-client 5.6-1.fc43 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- fedora 44: systemtap-client 5.6-1.fc44 Β· GPL-2.0-or-later AND GPL-2.0-only AND BSD-3-Clause AND LGPL-2.1-only AND GFDL-1.2-or-later AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms