.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "SET_COLOR" "1" "Nov 13, 2025" "4.2" "fish-shell" .SH NAME set_color \- set the terminal color .SH SYNOPSIS .nf \fBset_color\fP [\fIOPTIONS\fP] \fIVALUE\fP .fi .sp .SH DESCRIPTION .sp \fBset_color\fP is used to control the color and styling of text in the terminal. \fIVALUE\fP describes that styling. \fIVALUE\fP can be a reserved color name like \fBred\fP or an RGB color value given as 3 or 6 hexadecimal digits (\(dqF27\(dq or \(dqFF2277\(dq). A special keyword \fBnormal\fP resets text formatting to terminal defaults. .sp Valid colors include: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 \fBblack\fP, \fBred\fP, \fBgreen\fP, \fByellow\fP, \fBblue\fP, \fBmagenta\fP, \fBcyan\fP, \fBwhite\fP .IP \(bu 2 \fBbrblack\fP, \fBbrred\fP, \fBbrgreen\fP, \fBbryellow\fP, \fBbrblue\fP, \fBbrmagenta\fP, \fBbrcyan\fP, \fBbrwhite\fP .UNINDENT .UNINDENT .UNINDENT .sp The \fIbr\fP\- (as in \(aqbright\(aq) forms are full\-brightness variants of the 8 standard\-brightness colors on many terminals. \fBbrblack\fP has higher brightness than \fBblack\fP \- towards gray. .sp 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., \fBset_color 2BC\fP is the same as \fBset_color 22BBCC\fP\&. Hexadecimal RGB values can be in lower or uppercase. .sp If \fI\%fish_term24bit\fP is set to 0, fish will translate RGB values to the nearest color on the 256\-color palette. If \fI\%fish_term256\fP is also set to 0, fish will translate them to the 16\-color palette instead. Fish launched as \fBfish \-d term_support\fP will include diagnostic messages that indicate the color support mode in use. .sp If multiple colors are specified, fish prefers the first RGB one. However if \fI\%fish_term256\fP is set to 0, fish prefers the first named color specified. .sp The following options are available: .INDENT 0.0 .TP \fB\-b\fP or \fB\-\-background\fP \fICOLOR\fP Sets the background color. .TP \fB\-\-underline\-color\fP \fICOLOR\fP Set the underline color. .TP \fB\-c\fP or \fB\-\-print\-colors\fP Prints the given colors or a colored list of the 16 named colors. .TP \fB\-o\fP or \fB\-\-bold\fP Sets bold mode. .TP \fB\-d\fP or \fB\-\-dim\fP Sets dim mode. .TP \fB\-i\fP or \fB\-\-italics\fP Sets italics mode. .TP \fB\-r\fP or \fB\-\-reverse\fP Sets reverse mode. .TP \fB\-u\fP or \fB\-\-underline\fP, or \fB\-uSTYLE\fP or \fB\-\-underline=STYLE\fP Set the underline mode; supported styles are \fBsingle\fP (default), \fBdouble\fP, \fBcurly\fP, \fBdotted\fP and \fBdashed\fP\&. .TP \fB\-h\fP or \fB\-\-help\fP Displays help about using this command. .UNINDENT .SH NOTES .INDENT 0.0 .IP 1. 3 Using \fBset_color normal\fP will reset all colors and modes to the terminal\(aqs default. .IP 2. 3 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. .IP 3. 3 Some terminals use the \fB\-\-bold\fP escape sequence to switch to a brighter color set rather than increasing the weight of text. .IP 4. 3 \fBset_color\fP works by printing sequences of characters to standard output. If used in command substitution or a pipe, these characters will also be captured. This may or may not be desirable. Checking the exit status of \fBisatty stdout\fP before using \fBset_color\fP can be useful to decide not to colorize output in a script. .UNINDENT .SH EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .EX set_color red; echo \(dqRoses are red\(dq set_color blue; echo \(dqViolets are blue\(dq set_color 62A; echo \(dqEggplants are dark purple\(dq set_color normal; echo \(dqNormal is nice\(dq # Resets the background too .EE .UNINDENT .UNINDENT .SH COPYRIGHT fish-shell developers .\" Generated by docutils manpage writer. .