Page 1 of 1

XTerm Color Cheat Sheet

XTerm Color Cheat Sheet
   0

For those who need a cheat sheet on XTerm colors, here a quick and short reference overview.
These colors should work for anything that supports the XTerm color-scheme, so this includes several Terminal emulators and several Shell variants like Z-Shell.

I needed this while customizing my Z-Shell prompt, and I hope this is useful to others as well as a reference sheet.
I’ve split it up in the 16 basic colors, 24 greyscale “colors”, and 256 colors.




XTerm Colors

There is not much to say about this. XTerm supports certain color-schemes – if this doesn’t ring a bell, then you probably do not need it.

Below you’ll find the 16 color, 24 “color” greyscale, and the 256 color palette.
Besides the code number used in XTerm, I’ve added the RGB Hexadecimal code as well, which can be used in applications or websites (CSS).

To find out how you can apply these colors for the Z-Shell prompt see also this article: How to Customize Z-Shell Prompt.

16 Colors

From my understanding, any XTerm that supports colors, ate least supports these 16 base colors.

XTerm 16 Colors Set
000
#000000
001
#800000
002
#008000
003
#808000
004
#000080
005
#800080
006
#008080
007
#c0c0c0
008
#808080
009
#ff0000
010
#00ff00
011
#ffff00
012
#0000ff
013
#ff00ff
014
#00ffff
015
#ffffff

24 Greyscale Colors

XTerm does support greyscale colors as well.

24 Greyscale Colors
232
#080808
233
#121212
234
#1c1c1c
235
#262626
236
#303030
237
#3a3a3a
238
#444444
239
#4e4e4e
240
#585858
241
#626262
242
#6c6c6c
243
#767676
255
#eeeeee
254
#e4e4e4
253
#dadada
252
#d0d0d0
251
#c6c6c6
250
#bcbcbc
249
#b2b2b2
248
#a8a8a8
247
#9e9e9e
246
#949494
245
#8a8a8a
244
#808080

256 Colors Color-Scheme

Modern XTerm applications and Shells do support the 256 color palette as well.

256 Colors Color-Scheme
016
#000000
022
#005f00
028
#008700
034
#00af00
040
#00d700
046
#00ff00
082
#5fff00
076
#5fd700
070
#5faf00
064
#5f8700
058
#5f5f00
052
#5f0000
017
#00005f
023
#005f5f
029
#00875f
035
#00af5f
041
#00d75f
047
#00ff5f
083
#5fff5f
077
#5fd75f
071
#5faf5f
065
#5f875f
059
#5f5f5f
053
#5f005f
018
#000087
024
#005f87
030
#008787
036
#00af87
042
#00d787
048
#00ff87
084
#5fff87
078
#5fd787
072
#5faf87
066
#5f8787
060
#5f5f87
054
#5f0087
019
#0000af
025
#005faf
031
#0087af
037
#00afaf
043
#00d7af
049
#00ffaf
085
#5fffaf
079
#5fd7af
073
#5fafaf
067
#5f87af
061
#5f5faf
055
#5f00af
020
#0000d7
026
#005fd7
032
#0087d7
038
#00afd7
044
#00d7d7
050
#00ffd7
086
#5fffd7
080
#5fd7d7
074
#5fafd7
068
#5f87d7
062
#5f5fd7
056
#5f00d7
021
#0000ff
027
#005fff
033
#0087ff
039
#00afff
045
#00d7ff
051
#00ffff
087
#5fffff
081
#5fd7ff
075
#5fafff
069
#5f87ff
063
#5f5fff
057
#5f00ff
093
#8700ff
099
#875fff
105
#8787ff
111
#87afff
117
#87d7ff
123
#87ffff
159
#afffff
153
#afd7ff
147
#afafff
141
#af87ff
135
#af5fff
129
#af00ff
092
#8700d7
098
#875fd7
104
#8787d7
110
#87afd7
116
#87d7d7
122
#87ffd7
158
#afffd7
152
#afd7d7
146
#afafd7
140
#af87d7
134
#af5fd7
128
#af00d7
091
#8700af
097
#875faf
103
#8787af
109
#87afaf
115
#87d7af
121
#87ffaf
157
#afffaf
151
#afd7af
145
#afafaf
139
#af87af
133
#af5faf
127
#af00af
090
#870087
096
#875f87
102
#878787
108
#87af87
114
#87d787
120
#87ff87
156
#afff87
150
#afd787
144
#afaf87
138
#af8787
132
#af5f87
126
#af0087
089
#87005f
095
#875f5f
101
#87875f
107
#87af5f
113
#87d75f
119
#87ff5f
155
#afff5f
149
#afd75f
143
#afaf5f
137
#af875f
131
#af5f5f
125
#af005f
088
#870000
094
#875f00
100
#878700
106
#87af00
112
#87d700
118
#87ff00
154
#afff00
148
#afd700
142
#afaf00
136
#af8700
130
#af5f00
124
#af0000
160
#d70000
166
#d75f00
172
#d78700
178
#dfaf00
184
#dfdf00
190
#dfff00
226
#ffff00
220
#ffdf00
214
#ffaf00
208
#ff8700
202
#ff5f00
196
#ff0000
161
#d7005f
167
#d75f5f
173
#d7875f
179
#dfaf5f
185
#dfdf5f
191
#dfff5f
227
#ffff5f
221
#ffdf5f
215
#ffaf5f
209
#ff875f
203
#ff5f5f
197
#ff005f
162
#d70087
168
#d75f87
174
#d78787
180
#dfaf87
186
#dfdf87
192
#dfff87
228
#ffff87
222
#ffdf87
216
#ffaf87
210
#ff8787
204
#ff5f87
198
#ff0087
163
#d700af
169
#d75faf
175
#d787af
181
#dfafaf
187
#dfdfaf
193
#dfffaf
229
#ffffaf
223
#ffdfaf
217
#ffafaf
211
#ff87af
205
#ff5faf
199
#ff00af
164
#d700d7
170
#d75fd7
176
#d787d7
182
#dfafdf
188
#dfdfdf
194
#dfffdf
230
#ffffdf
224
#ffdfdf
218
#ffafdf
212
#ff87df
206
#ff5fdf
200
#ff00df
165
#d700ff
171
#d75fff
177
#d787ff
183
#dfafff
189
#dfdfff
195
#dfffff
231
#ffffff
225
#ffdfff
219
#ffafff
213
#ff87ff
207
#ff5fff
201
#ff00ff

Support Us ...


Your support is very much appreciated, and can be as easy as sharing a link to my website with others, or on social media.

Support can also be done by sponsoring me, and even that can be free (e.g. shop at Amazon).
Any funds received from your support will be used for web-hosting expenses, project hardware and software, coffee, etc.

Thank you very much for those that have shown support already!
It's truly amazing to see that folks like my articles and small applications.

Please note that clicking affiliate links, like the ones from Amazon, may result in a small commission for us - which we highly appreciate as well.

Comments


There are no comments yet.
You can post your own comments by using the form below, or reply to existing comments by using the "Reply" button.



Your Comment …

Do not post large files here (like source codes, log files or config files). Please use the Forum for that purpose.

Please share:
*
*
Notify me about new comments (email).
       You can also use your RSS reader to track comments.


Tweaking4All uses the free Gravatar service for Avatar display.
Tweaking4All will never share your email address with others.