SET_COLOR(1)

πŸ’… SET_COLOR(1) β€” the fish-shell glow-up era

okay so bestie, we're talking about set_color, one of the fish-shell icons πŸ‘‘ (that's the manual name, btw β€” fish-shell, periodt). this little cutie is your terminal's personal stylist and honestly? it ate. πŸŽ€


✨ NAME ✨

set_color β€” set the terminal color. that's it. that's the job. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

set_color [OPTIONS] [VALUE]

🌸 DESCRIPTION 🌸

so set_color controls the color and styling of text in the terminal β€” literally the main character of your prompt aesthetic. ✨ It writes non-printing color and text style escape sequences to standard output. (non-printing, bestie β€” they don't take up space on your screen, they just vibe.)

VALUE describes the styling. VALUE can be a reserved color name like red, or an RGB color value given as 3 or 6 hexadecimal digits ("F27" or "FF2277"). There's also a special keyword normal that resets text formatting to terminal defaults, however it is not recommended and the --reset option is preferred as it is less confusing and more future-proof. πŸ™ˆ

Valid colors include:

  • black, red, green, yellow, blue, magenta, cyan, white
  • brblack, brred, brgreen, bryellow, brblue, brmagenta, brcyan, brwhite

The br- (as in 'bright') forms are full-brightness variants of the 8 standard-brightness colors on many terminals. Heads up: brblack has higher brightness than black β€” it's leaning towards gray. 🩢

An RGB value with three or six hex digits, such as A0FF33 or f2f, can be used. A three digit value is equivalent to specifying each digit twice; e.g., set_color 2BC is the same as set_color 22BBCC. Hexadecimal RGB values can be in lower or uppercase β€” she's flexible like that. πŸ’β€β™€οΈ

If fish_term24bit is set to 0, fish will translate RGB values to the nearest color on the 256-color palette. If fish_term256 is also set to 0, fish will translate them to the 16-color palette instead. And if you launch fish as fish -d term_support, it'll include diagnostic messages that indicate the color support mode in use. 🩺 like a little vibe check for your terminal.

If multiple colors are specified, fish prefers the first RGB one. However if fish_term256 is set to 0, fish prefers the first named color specified. noted. πŸ“

The following options are available:

  • -f or --foreground COLOR β€” Sets the foreground color. This is equivalent to calling set_color COLOR with the exception that the keyword normal will only reset the foreground color to its default, instead of all colors and modes. It cannot be used with VALUE or --print-colors. 🚫
  • -b or --background COLOR β€” Sets the background color. the behind-the-scenes queen. πŸ‘‘
  • --underline-color COLOR β€” Set the underline color. yes, the underline gets its own color now. slay.
  • -c or --print-colors β€” Prints the given colors or a colored list of the 16 named colors. It cannot be used with --foreground. 🌈
  • -o or --bold β€” Sets bold mode. thick. πŸ’ͺ
  • -d or --dim β€” Sets dim mode. mysterious, lowkey. πŸŒ™
  • -i or --italics, or -iSTATE or --italics=STATE β€” Sets italics mode. The state can be on (default), or off.
  • -r or --reverse, or -rSTATE or --reverse=STATE β€” Sets reverse mode. The state can be on (default), or off.
  • -s or --strikethrough, or -sSTATE or --strikethrough=STATE β€” Sets strikethrough mode. The state can be on (default), or off.
  • -u or --underline, or -uSTYLE or --underline=STYLE β€” Set the underline mode; supported styles are single (default), double, curly, dotted, dashed and off. curly underline is genuinely iconic, no notes. πŸŒ€
  • --reset β€” Reset the text formatting to the terminal defaults before applying the new colors and modes. This is equivalent to calling set_color normal except that it is possible to set the foreground color in the same call (e.g. set_color --reset green). the glow-up before the glow-up. ✨
  • --theme=THEME β€” Ignored. Color variables that contain only this option are treated like missing / empty color variables, i.e. fish will use the fallback color instead. fish_config theme choose erases all color variables whose value includes this option, and adds this option to all color variables it sets. This allows identifying variables set by a theme, and it allows fish to update color variables whenever fish_terminal_color_theme changes. it's a little bookmark, iykyk. πŸ”–
  • -h or --help β€” Displays help about using this command. our fave. 🫢

πŸ’€ NOTES πŸ’€

  1. Using set_color normal will reset all colors and modes to the terminal's default. everything. gone. reset. πŸ’€
  2. In contrast, set_color --foreground normal will only reset the foreground color and leave all the other colors and modes unchanged. surgical. 🎯
  3. Because of the risk of confusion, set_color --reset is recommended over set_color normal. trust the process. 🫑
  4. Setting the background color only affects subsequently written characters. fish provides no way to set the background color for the entire terminal window. Configuring the window background color (and other attributes such as its opacity) has to be done using whatever mechanisms the terminal provides. Look for a config option. πŸ‘€ (like, in your terminal's settings, not here β€” fish can't do it, bestie, don't come for her.)
  5. Some terminals use the --bold escape sequence to switch to a brighter color set rather than increasing the weight of text. so --bold might not even look bold in your terminal. rude but true. 😭
  6. If you use set_color in a command substitution or a pipe, these characters will also be captured. This may or may not be desirable. Checking the exit status of isatty stdout before using set_color can be useful to decide not to colorize output in a script. ngl this is the number one gotcha, save yourself. 🚩

πŸ“ EXAMPLES πŸ“

set_color red; echo "Roses are red"
set_color blue; echo "Violets are blue"
set_color 62A; echo "Eggplants are dark purple"
set_color normal; echo "Normal is nice" # Resets the background too

fish-shell developers β€” kings. πŸ’œ


okay and that's the whole page, bestie! πŸŽ€ this beauty is version 4.9, dated Sep 08, 2026, and it's a fish-shell production. now go colorize something and make it a moment. βœ¨πŸ’…πŸ¦‹πŸŒΈπŸ”₯πŸ‘‘πŸŒˆβ­πŸ’–

πŸ“¦ where this page comes from
  • arch rolling: fish 4.9.3-1 Β· GPL-2.0-only AND BSD-3-Clause AND ISC AND MIT AND PSF-2.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms