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,whitebrblack,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:
-for--foreground COLORβ Sets the foreground color. This is equivalent to callingset_color COLORwith the exception that the keywordnormalwill only reset the foreground color to its default, instead of all colors and modes. It cannot be used withVALUEor--print-colors. π«-bor--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.-cor--print-colorsβ Prints the given colors or a colored list of the 16 named colors. It cannot be used with--foreground. π-oor--boldβ Sets bold mode. thick. πͺ-dor--dimβ Sets dim mode. mysterious, lowkey. π-ior--italics, or-iSTATEor--italics=STATEβ Sets italics mode. The state can beon(default), oroff.-ror--reverse, or-rSTATEor--reverse=STATEβ Sets reverse mode. The state can beon(default), oroff.-sor--strikethrough, or-sSTATEor--strikethrough=STATEβ Sets strikethrough mode. The state can beon(default), oroff.-uor--underline, or-uSTYLEor--underline=STYLEβ Set the underline mode; supported styles aresingle(default),double,curly,dotted,dashedandoff. 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 callingset_color normalexcept 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 chooseerases 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 wheneverfish_terminal_color_themechanges. it's a little bookmark, iykyk. π-hor--helpβ Displays help about using this command. our fave. π«Ά
π NOTES π
- Using
set_color normalwill reset all colors and modes to the terminal's default. everything. gone. reset. π - In contrast,
set_color --foreground normalwill only reset the foreground color and leave all the other colors and modes unchanged. surgical. π― - Because of the risk of confusion,
set_color --resetis recommended overset_color normal. trust the process. π«‘ - 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.)
- Some terminals use the
--boldescape sequence to switch to a brighter color set rather than increasing the weight of text. so--boldmight not even look bold in your terminal. rude but true. π - If you use
set_colorin a command substitution or a pipe, these characters will also be captured. This may or may not be desirable. Checking the exit status ofisatty stdoutbefore usingset_colorcan 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
π§ Copyright π§
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