Enum AnsiColor

Source
#[repr(u8)]
pub enum AnsiColor {
Show 256 variants Black = 0, Red = 1, Green = 2, Yellow = 3, Blue = 4, Magenta = 5, Cyan = 6, LightGrey = 7, DarkGrey = 8, LightRed = 9, LightGreen = 10, LightYellow = 11, LightBlue = 12, LightMagenta = 13, LightCyan = 14, White = 15, Misc016 = 16, NavyBlue = 17, DarkBlue = 18, Misc019 = 19, Misc020 = 20, Misc021 = 21, DarkGreen = 22, Misc023 = 23, Misc024 = 24, Misc025 = 25, Misc026 = 26, Misc027 = 27, Misc028 = 28, Misc029 = 29, Misc030 = 30, Misc031 = 31, Misc032 = 32, Misc033 = 33, Misc034 = 34, Misc035 = 35, DarkCyan = 36, LightSeaGreen = 37, Misc038 = 38, Misc039 = 39, Misc040 = 40, Misc041 = 41, Misc042 = 42, Misc043 = 43, DarkTurquoise = 44, Misc045 = 45, Misc046 = 46, Misc047 = 47, Misc048 = 48, MediumSpringGreen = 49, Misc050 = 50, Misc051 = 51, Misc052 = 52, Misc053 = 53, Misc054 = 54, Misc055 = 55, Misc056 = 56, BlueViolet = 57, Misc058 = 58, Misc059 = 59, Misc060 = 60, Misc061 = 61, Misc062 = 62, Misc063 = 63, Misc064 = 64, Misc065 = 65, Misc066 = 66, SteelBlue = 67, Misc068 = 68, CornflowerBlue = 69, Misc070 = 70, Misc071 = 71, Misc072 = 72, Misc073 = 73, Misc074 = 74, Misc075 = 75, Misc076 = 76, Misc077 = 77, Misc078 = 78, Misc079 = 79, MediumTurquoise = 80, Misc081 = 81, Misc082 = 82, Misc083 = 83, Misc084 = 84, Misc085 = 85, Misc086 = 86, Misc087 = 87, Misc088 = 88, Misc089 = 89, Misc090 = 90, Misc091 = 91, Misc092 = 92, Misc093 = 93, Misc094 = 94, Misc095 = 95, Misc096 = 96, Misc097 = 97, Misc098 = 98, Misc099 = 99, Misc100 = 100, Misc101 = 101, Misc102 = 102, LightSlateGrey = 103, MediumPurple = 104, LightSlateBlue = 105, Misc106 = 106, Misc107 = 107, DarkSeaGreen = 108, Misc109 = 109, Misc110 = 110, Misc111 = 111, Misc112 = 112, Misc113 = 113, Misc114 = 114, Misc115 = 115, Misc116 = 116, Misc117 = 117, Misc118 = 118, Misc119 = 119, Misc120 = 120, Misc121 = 121, Misc122 = 122, Misc123 = 123, Misc124 = 124, Misc125 = 125, MediumVioletRed = 126, Misc127 = 127, Misc128 = 128, Misc129 = 129, Misc130 = 130, Misc131 = 131, Misc132 = 132, Misc133 = 133, Misc134 = 134, Misc135 = 135, DarkGoldenrod = 136, Misc137 = 137, RosyBrown = 138, Misc139 = 139, Misc140 = 140, Misc141 = 141, Misc142 = 142, DarkKhaki = 143, Misc144 = 144, Misc145 = 145, Misc146 = 146, LightSteelBlue = 147, Misc148 = 148, Misc149 = 149, Misc150 = 150, Misc151 = 151, Misc152 = 152, Misc153 = 153, GreenYellow = 154, Misc155 = 155, Misc156 = 156, Misc157 = 157, Misc158 = 158, Misc159 = 159, Misc160 = 160, Misc161 = 161, Misc162 = 162, Misc163 = 163, Misc164 = 164, Misc165 = 165, Misc166 = 166, Misc167 = 167, Misc168 = 168, Misc169 = 169, Orchid = 170, Misc171 = 171, Misc172 = 172, Misc173 = 173, Misc174 = 174, Misc175 = 175, Misc176 = 176, Violet = 177, Misc178 = 178, Misc179 = 179, Tan = 180, Misc181 = 181, Misc182 = 182, Misc183 = 183, Misc184 = 184, Misc185 = 185, Misc186 = 186, Misc187 = 187, Misc188 = 188, Misc189 = 189, Misc190 = 190, Misc191 = 191, Misc192 = 192, Misc193 = 193, Misc194 = 194, Misc195 = 195, Misc196 = 196, Misc197 = 197, Misc198 = 198, Misc199 = 199, Misc200 = 200, Misc201 = 201, Misc202 = 202, Misc203 = 203, Misc204 = 204, Misc205 = 205, Misc206 = 206, Misc207 = 207, DarkOrange = 208, Misc209 = 209, LightCoral = 210, Misc211 = 211, Misc212 = 212, Misc213 = 213, Misc214 = 214, SandyBrown = 215, Misc216 = 216, Misc217 = 217, Misc218 = 218, Misc219 = 219, Misc220 = 220, Misc221 = 221, Misc222 = 222, Misc223 = 223, Misc224 = 224, Misc225 = 225, Misc226 = 226, Misc227 = 227, Misc228 = 228, Misc229 = 229, Misc230 = 230, Misc231 = 231, Misc232 = 232, Misc233 = 233, Misc234 = 234, Misc235 = 235, Misc236 = 236, Misc237 = 237, Misc238 = 238, Misc239 = 239, Misc240 = 240, Misc241 = 241, Misc242 = 242, Misc243 = 243, Misc244 = 244, Misc245 = 245, Misc246 = 246, Misc247 = 247, Misc248 = 248, Misc249 = 249, Misc250 = 250, Misc251 = 251, Misc252 = 252, Misc253 = 253, Misc254 = 254, Misc255 = 255,
}
Expand description

§ANSI Colors (8/16/256).

This enum is used to print colored text to ANSI-capable1 terminals.

Owing to deviations from proper standards, only some variants have nice names; the rest are simply designated by code (e.g. AnsiColor::Misc217 for #217, a sort of mortician’s blush).

§Reference

The actual color rendered will vary by software, but should look something like the following:

000
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255

  1. Most modern software will happily render the full range, but if (ancient) backward compatibility is a concern, stick with the first sixteen choices, as they’ve been around forever

Variants§

§

Black = 0

§Black (8).

This is roughly equivalent to the RGB #000000.

§

Red = 1

§Red (8).

This is roughly equivalent to the RGB #800000.

§

Green = 2

§Green (8).

This is roughly equivalent to the RGB #008000.

§

Yellow = 3

§Yellow (8).

This is roughly equivalent to the RGB #808000.

§

Blue = 4

§Blue (8).

This is roughly equivalent to the RGB #000080.

§

Magenta = 5

§Magenta (8).

This is roughly equivalent to the RGB #800080.

§

Cyan = 6

§Cyan (8).

This is roughly equivalent to the RGB #008080.

§

LightGrey = 7

§Light Grey (8).

This is roughly equivalent to the RGB #c0c0c0.

§

DarkGrey = 8

§Dark Grey (16).

This is roughly equivalent to the RGB #808080.

§

LightRed = 9

§Light Red (16).

This is roughly equivalent to the RGB #ff0000.

§

LightGreen = 10

§Light Green (16).

This is roughly equivalent to the RGB #00ff00.

§

LightYellow = 11

§Light Yellow (16).

This is roughly equivalent to the RGB #ffff00.

§

LightBlue = 12

§Light Blue (16).

This is roughly equivalent to the RGB #0000ff.

§

LightMagenta = 13

§Light Magenta (16).

This is roughly equivalent to the RGB #ff00ff.

§

LightCyan = 14

§Light Cyan (16).

This is roughly equivalent to the RGB #00ffff.

§

White = 15

§White (16).

This is roughly equivalent to the RGB #ffffff.

§

Misc016 = 16

§Color #16.

This is roughly equivalent to the RGB #000000.

§

NavyBlue = 17

This is roughly equivalent to the RGB #00005f.

§

DarkBlue = 18

§Dark Blue.

This is roughly equivalent to the RGB #000087.

§

Misc019 = 19

§Color #19.

This is roughly equivalent to the RGB #0000af.

§

Misc020 = 20

§Color #20.

This is roughly equivalent to the RGB #0000d7.

§

Misc021 = 21

§Color #21.

This is roughly equivalent to the RGB #0000ff.

§

DarkGreen = 22

§Dark Green.

This is roughly equivalent to the RGB #005f00.

§

Misc023 = 23

§Color #23.

This is roughly equivalent to the RGB #005f5f.

§

Misc024 = 24

§Color #24.

This is roughly equivalent to the RGB #005f87.

§

Misc025 = 25

§Color #25.

This is roughly equivalent to the RGB #005faf.

§

Misc026 = 26

§Color #26.

This is roughly equivalent to the RGB #005fd7.

§

Misc027 = 27

§Color #27.

This is roughly equivalent to the RGB #005fff.

§

Misc028 = 28

§Color #28.

This is roughly equivalent to the RGB #008700.

§

Misc029 = 29

§Color #29.

This is roughly equivalent to the RGB #00875f.

§

Misc030 = 30

§Color #30.

This is roughly equivalent to the RGB #008787.

§

Misc031 = 31

§Color #31.

This is roughly equivalent to the RGB #0087af.

§

Misc032 = 32

§Color #32.

This is roughly equivalent to the RGB #0087d7.

§

Misc033 = 33

§Color #33.

This is roughly equivalent to the RGB #0087ff.

§

Misc034 = 34

§Color #34.

This is roughly equivalent to the RGB #00af00.

§

Misc035 = 35

§Color #35.

This is roughly equivalent to the RGB #00af5f.

§

DarkCyan = 36

§Dark Cyan.

This is roughly equivalent to the RGB #00af87.

§

LightSeaGreen = 37

§Light Sea Green.

This is roughly equivalent to the RGB #00afaf.

§

Misc038 = 38

§Color #38.

This is roughly equivalent to the RGB #00afd7.

§

Misc039 = 39

§Color #39.

This is roughly equivalent to the RGB #00afff.

§

Misc040 = 40

§Color #40.

This is roughly equivalent to the RGB #00d700.

§

Misc041 = 41

§Color #41.

This is roughly equivalent to the RGB #00d75f.

§

Misc042 = 42

§Color #42.

This is roughly equivalent to the RGB #00d787.

§

Misc043 = 43

§Color #43.

This is roughly equivalent to the RGB #00d7af.

§

DarkTurquoise = 44

§Dark Turquoise.

This is roughly equivalent to the RGB #00d7d7.

§

Misc045 = 45

§Color #45.

This is roughly equivalent to the RGB #00d7ff.

§

Misc046 = 46

§Color #46.

This is roughly equivalent to the RGB #00ff00.

§

Misc047 = 47

§Color #47.

This is roughly equivalent to the RGB #00ff5f.

§

Misc048 = 48

§Color #48.

This is roughly equivalent to the RGB #00ff87.

§

MediumSpringGreen = 49

§Medium Spring Green.

This is roughly equivalent to the RGB #00ffaf.

§

Misc050 = 50

§Color #50.

This is roughly equivalent to the RGB #00ffd7.

§

Misc051 = 51

§Color #51.

This is roughly equivalent to the RGB #00ffff.

§

Misc052 = 52

§Color #52.

This is roughly equivalent to the RGB #5f0000.

§

Misc053 = 53

§Color #53.

This is roughly equivalent to the RGB #5f005f.

§

Misc054 = 54

§Color #54.

This is roughly equivalent to the RGB #5f0087.

§

Misc055 = 55

§Color #55.

This is roughly equivalent to the RGB #5f00af.

§

Misc056 = 56

§Color #56.

This is roughly equivalent to the RGB #5f00d7.

§

BlueViolet = 57

§Blue Violet.

This is roughly equivalent to the RGB #5f00ff.

§

Misc058 = 58

§Color #58.

This is roughly equivalent to the RGB #5f5f00.

§

Misc059 = 59

§Color #59.

This is roughly equivalent to the RGB #5f5f5f.

§

Misc060 = 60

§Color #60.

This is roughly equivalent to the RGB #5f5f87.

§

Misc061 = 61

§Color #61.

This is roughly equivalent to the RGB #5f5faf.

§

Misc062 = 62

§Color #62.

This is roughly equivalent to the RGB #5f5fd7.

§

Misc063 = 63

§Color #63.

This is roughly equivalent to the RGB #5f5fff.

§

Misc064 = 64

§Color #64.

This is roughly equivalent to the RGB #5f8700.

§

Misc065 = 65

§Color #65.

This is roughly equivalent to the RGB #5f875f.

§

Misc066 = 66

§Color #66.

This is roughly equivalent to the RGB #5f8787.

§

SteelBlue = 67

§Steel Blue.

This is roughly equivalent to the RGB #5f87af.

§

Misc068 = 68

§Color #68.

This is roughly equivalent to the RGB #5f87d7.

§

CornflowerBlue = 69

§Cornflower Blue.

This is roughly equivalent to the RGB #5f87ff.

§

Misc070 = 70

§Color #70.

This is roughly equivalent to the RGB #5faf00.

§

Misc071 = 71

§Color #71.

This is roughly equivalent to the RGB #5faf5f.

§

Misc072 = 72

§Color #72.

This is roughly equivalent to the RGB #5faf87.

§

Misc073 = 73

§Color #73.

This is roughly equivalent to the RGB #5fafaf.

§

Misc074 = 74

§Color #74.

This is roughly equivalent to the RGB #5fafd7.

§

Misc075 = 75

§Color #75.

This is roughly equivalent to the RGB #5fafff.

§

Misc076 = 76

§Color #76.

This is roughly equivalent to the RGB #5fd700.

§

Misc077 = 77

§Color #77.

This is roughly equivalent to the RGB #5fd75f.

§

Misc078 = 78

§Color #78.

This is roughly equivalent to the RGB #5fd787.

§

Misc079 = 79

§Color #79.

This is roughly equivalent to the RGB #5fd7af.

§

MediumTurquoise = 80

§Medium Turquoise.

This is roughly equivalent to the RGB #5fd7d7.

§

Misc081 = 81

§Color #81.

This is roughly equivalent to the RGB #5fd7ff.

§

Misc082 = 82

§Color #82.

This is roughly equivalent to the RGB #5fff00.

§

Misc083 = 83

§Color #83.

This is roughly equivalent to the RGB #5fff5f.

§

Misc084 = 84

§Color #84.

This is roughly equivalent to the RGB #5fff87.

§

Misc085 = 85

§Color #85.

This is roughly equivalent to the RGB #5fffaf.

§

Misc086 = 86

§Color #86.

This is roughly equivalent to the RGB #5fffd7.

§

Misc087 = 87

§Color #87.

This is roughly equivalent to the RGB #5fffff.

§

Misc088 = 88

§Color #88.

This is roughly equivalent to the RGB #870000.

§

Misc089 = 89

§Color #89.

This is roughly equivalent to the RGB #87005f.

§

Misc090 = 90

§Color #90.

This is roughly equivalent to the RGB #870087.

§

Misc091 = 91

§Color #91.

This is roughly equivalent to the RGB #8700af.

§

Misc092 = 92

§Color #92.

This is roughly equivalent to the RGB #8700d7.

§

Misc093 = 93

§Color #93.

This is roughly equivalent to the RGB #8700ff.

§

Misc094 = 94

§Color #94.

This is roughly equivalent to the RGB #875f00.

§

Misc095 = 95

§Color #95.

This is roughly equivalent to the RGB #875f5f.

§

Misc096 = 96

§Color #96.

This is roughly equivalent to the RGB #875f87.

§

Misc097 = 97

§Color #97.

This is roughly equivalent to the RGB #875faf.

§

Misc098 = 98

§Color #98.

This is roughly equivalent to the RGB #875fd7.

§

Misc099 = 99

§Color #99.

This is roughly equivalent to the RGB #875fff.

§

Misc100 = 100

§Color #100.

This is roughly equivalent to the RGB #878700.

§

Misc101 = 101

§Color #101.

This is roughly equivalent to the RGB #87875f.

§

Misc102 = 102

§Color #102.

This is roughly equivalent to the RGB #878787.

§

LightSlateGrey = 103

§Light Slate Grey.

This is roughly equivalent to the RGB #8787af.

§

MediumPurple = 104

§Medium Purple.

This is roughly equivalent to the RGB #8787d7.

§

LightSlateBlue = 105

§Light Slate Blue.

This is roughly equivalent to the RGB #8787ff.

§

Misc106 = 106

§Color #106.

This is roughly equivalent to the RGB #87af00.

§

Misc107 = 107

§Color #107.

This is roughly equivalent to the RGB #87af5f.

§

DarkSeaGreen = 108

§Dark Sea Green.

This is roughly equivalent to the RGB #87af87.

§

Misc109 = 109

§Color #109.

This is roughly equivalent to the RGB #87afaf.

§

Misc110 = 110

§Color #110.

This is roughly equivalent to the RGB #87afd7.

§

Misc111 = 111

§Color #111.

This is roughly equivalent to the RGB #87afff.

§

Misc112 = 112

§Color #112.

This is roughly equivalent to the RGB #87d700.

§

Misc113 = 113

§Color #113.

This is roughly equivalent to the RGB #87d75f.

§

Misc114 = 114

§Color #114.

This is roughly equivalent to the RGB #87d787.

§

Misc115 = 115

§Color #115.

This is roughly equivalent to the RGB #87d7af.

§

Misc116 = 116

§Color #116.

This is roughly equivalent to the RGB #87d7d7.

§

Misc117 = 117

§Color #117.

This is roughly equivalent to the RGB #87d7ff.

§

Misc118 = 118

§Color #118.

This is roughly equivalent to the RGB #87ff00.

§

Misc119 = 119

§Color #119.

This is roughly equivalent to the RGB #87ff5f.

§

Misc120 = 120

§Color #120.

This is roughly equivalent to the RGB #87ff87.

§

Misc121 = 121

§Color #121.

This is roughly equivalent to the RGB #87ffaf.

§

Misc122 = 122

§Color #122.

This is roughly equivalent to the RGB #87ffd7.

§

Misc123 = 123

§Color #123.

This is roughly equivalent to the RGB #87ffff.

§

Misc124 = 124

§Color #124.

This is roughly equivalent to the RGB #af0000.

§

Misc125 = 125

§Color #125.

This is roughly equivalent to the RGB #af005f.

§

MediumVioletRed = 126

§Medium Violet Red.

This is roughly equivalent to the RGB #af0087.

§

Misc127 = 127

§Color #127.

This is roughly equivalent to the RGB #af00af.

§

Misc128 = 128

§Color #128.

This is roughly equivalent to the RGB #af00d7.

§

Misc129 = 129

§Color #129.

This is roughly equivalent to the RGB #af00ff.

§

Misc130 = 130

§Color #130.

This is roughly equivalent to the RGB #af5f00.

§

Misc131 = 131

§Color #131.

This is roughly equivalent to the RGB #af5f5f.

§

Misc132 = 132

§Color #132.

This is roughly equivalent to the RGB #af5f87.

§

Misc133 = 133

§Color #133.

This is roughly equivalent to the RGB #af5faf.

§

Misc134 = 134

§Color #134.

This is roughly equivalent to the RGB #af5fd7.

§

Misc135 = 135

§Color #135.

This is roughly equivalent to the RGB #af5fff.

§

DarkGoldenrod = 136

§Dark Goldenrod.

This is roughly equivalent to the RGB #af8700.

§

Misc137 = 137

§Color #137.

This is roughly equivalent to the RGB #af875f.

§

RosyBrown = 138

§Rosy Brown.

This is roughly equivalent to the RGB #af8787.

§

Misc139 = 139

§Color #139.

This is roughly equivalent to the RGB #af87af.

§

Misc140 = 140

§Color #140.

This is roughly equivalent to the RGB #af87d7.

§

Misc141 = 141

§Color #141.

This is roughly equivalent to the RGB #af87ff.

§

Misc142 = 142

§Color #142.

This is roughly equivalent to the RGB #afaf00.

§

DarkKhaki = 143

§Dark Khaki.

This is roughly equivalent to the RGB #afaf5f.

§

Misc144 = 144

§Color #144.

This is roughly equivalent to the RGB #afaf87.

§

Misc145 = 145

§Color #145.

This is roughly equivalent to the RGB #afafaf.

§

Misc146 = 146

§Color #146.

This is roughly equivalent to the RGB #afafd7.

§

LightSteelBlue = 147

§Light Steel Blue.

This is roughly equivalent to the RGB #afafff.

§

Misc148 = 148

§Color #148.

This is roughly equivalent to the RGB #afd700.

§

Misc149 = 149

§Color #149.

This is roughly equivalent to the RGB #afd75f.

§

Misc150 = 150

§Color #150.

This is roughly equivalent to the RGB #afd787.

§

Misc151 = 151

§Color #151.

This is roughly equivalent to the RGB #afd7af.

§

Misc152 = 152

§Color #152.

This is roughly equivalent to the RGB #afd7d7.

§

Misc153 = 153

§Color #153.

This is roughly equivalent to the RGB #afd7ff.

§

GreenYellow = 154

§Green Yellow.

This is roughly equivalent to the RGB #afff00.

§

Misc155 = 155

§Color #155.

This is roughly equivalent to the RGB #afff5f.

§

Misc156 = 156

§Color #156.

This is roughly equivalent to the RGB #afff87.

§

Misc157 = 157

§Color #157.

This is roughly equivalent to the RGB #afffaf.

§

Misc158 = 158

§Color #158.

This is roughly equivalent to the RGB #afffd7.

§

Misc159 = 159

§Color #159.

This is roughly equivalent to the RGB #afffff.

§

Misc160 = 160

§Color #160.

This is roughly equivalent to the RGB #d70000.

§

Misc161 = 161

§Color #161.

This is roughly equivalent to the RGB #d7005f.

§

Misc162 = 162

§Color #162.

This is roughly equivalent to the RGB #d70087.

§

Misc163 = 163

§Color #163.

This is roughly equivalent to the RGB #d700af.

§

Misc164 = 164

§Color #164.

This is roughly equivalent to the RGB #d700d7.

§

Misc165 = 165

§Color #165.

This is roughly equivalent to the RGB #d700ff.

§

Misc166 = 166

§Color #166.

This is roughly equivalent to the RGB #d75f00.

§

Misc167 = 167

§Color #167.

This is roughly equivalent to the RGB #d75f5f.

§

Misc168 = 168

§Color #168.

This is roughly equivalent to the RGB #d75f87.

§

Misc169 = 169

§Color #169.

This is roughly equivalent to the RGB #d75faf.

§

Orchid = 170

§Orchid.

This is roughly equivalent to the RGB #d75fd7.

§

Misc171 = 171

§Color #171.

This is roughly equivalent to the RGB #d75fff.

§

Misc172 = 172

§Color #172.

This is roughly equivalent to the RGB #d78700.

§

Misc173 = 173

§Color #173.

This is roughly equivalent to the RGB #d7875f.

§

Misc174 = 174

§Color #174.

This is roughly equivalent to the RGB #d78787.

§

Misc175 = 175

§Color #175.

This is roughly equivalent to the RGB #d787af.

§

Misc176 = 176

§Color #176.

This is roughly equivalent to the RGB #d787d7.

§

Violet = 177

§Violet.

This is roughly equivalent to the RGB #d787ff.

§

Misc178 = 178

§Color #178.

This is roughly equivalent to the RGB #d7af00.

§

Misc179 = 179

§Color #179.

This is roughly equivalent to the RGB #d7af5f.

§

Tan = 180

§Tan.

This is roughly equivalent to the RGB #d7af87.

§

Misc181 = 181

§Color #181.

This is roughly equivalent to the RGB #d7afaf.

§

Misc182 = 182

§Color #182.

This is roughly equivalent to the RGB #d7afd7.

§

Misc183 = 183

§Color #183.

This is roughly equivalent to the RGB #d7afff.

§

Misc184 = 184

§Color #184.

This is roughly equivalent to the RGB #d7d700.

§

Misc185 = 185

§Color #185.

This is roughly equivalent to the RGB #d7d75f.

§

Misc186 = 186

§Color #186.

This is roughly equivalent to the RGB #d7d787.

§

Misc187 = 187

§Color #187.

This is roughly equivalent to the RGB #d7d7af.

§

Misc188 = 188

§Color #188.

This is roughly equivalent to the RGB #d7d7d7.

§

Misc189 = 189

§Color #189.

This is roughly equivalent to the RGB #d7d7ff.

§

Misc190 = 190

§Color #190.

This is roughly equivalent to the RGB #d7ff00.

§

Misc191 = 191

§Color #191.

This is roughly equivalent to the RGB #d7ff5f.

§

Misc192 = 192

§Color #192.

This is roughly equivalent to the RGB #d7ff87.

§

Misc193 = 193

§Color #193.

This is roughly equivalent to the RGB #d7ffaf.

§

Misc194 = 194

§Color #194.

This is roughly equivalent to the RGB #d7ffd7.

§

Misc195 = 195

§Color #195.

This is roughly equivalent to the RGB #d7ffff.

§

Misc196 = 196

§Color #196.

This is roughly equivalent to the RGB #ff0000.

§

Misc197 = 197

§Color #197.

This is roughly equivalent to the RGB #ff005f.

§

Misc198 = 198

§Color #198.

This is roughly equivalent to the RGB #ff0087.

§

Misc199 = 199

§Color #199.

This is roughly equivalent to the RGB #ff00af.

§

Misc200 = 200

§Color #200.

This is roughly equivalent to the RGB #ff00d7.

§

Misc201 = 201

§Color #201.

This is roughly equivalent to the RGB #ff00ff.

§

Misc202 = 202

§Color #202.

This is roughly equivalent to the RGB #ff5f00.

§

Misc203 = 203

§Color #203.

This is roughly equivalent to the RGB #ff5f5f.

§

Misc204 = 204

§Color #204.

This is roughly equivalent to the RGB #ff5f87.

§

Misc205 = 205

§Color #205.

This is roughly equivalent to the RGB #ff5faf.

§

Misc206 = 206

§Color #206.

This is roughly equivalent to the RGB #ff5fd7.

§

Misc207 = 207

§Color #207.

This is roughly equivalent to the RGB #ff5fff.

§

DarkOrange = 208

§Dark Orange.

This is roughly equivalent to the RGB #ff8700.

§

Misc209 = 209

§Color #209.

This is roughly equivalent to the RGB #ff875f.

§

LightCoral = 210

§Light Coral.

This is roughly equivalent to the RGB #ff8787.

§

Misc211 = 211

§Color #211.

This is roughly equivalent to the RGB #ff87af.

§

Misc212 = 212

§Color #212.

This is roughly equivalent to the RGB #ff87d7.

§

Misc213 = 213

§Color #213.

This is roughly equivalent to the RGB #ff87ff.

§

Misc214 = 214

§Color #214.

This is roughly equivalent to the RGB #ffaf00.

§

SandyBrown = 215

§Sandy Brown.

This is roughly equivalent to the RGB #ffaf5f.

§

Misc216 = 216

§Color #216.

This is roughly equivalent to the RGB #ffaf87.

§

Misc217 = 217

§Color #217.

This is roughly equivalent to the RGB #ffafaf.

§

Misc218 = 218

§Color #218.

This is roughly equivalent to the RGB #ffafd7.

§

Misc219 = 219

§Color #219.

This is roughly equivalent to the RGB #ffafff.

§

Misc220 = 220

§Color #220.

This is roughly equivalent to the RGB #ffd700.

§

Misc221 = 221

§Color #221.

This is roughly equivalent to the RGB #ffd75f.

§

Misc222 = 222

§Color #222.

This is roughly equivalent to the RGB #ffd787.

§

Misc223 = 223

§Color #223.

This is roughly equivalent to the RGB #ffd7af.

§

Misc224 = 224

§Color #224.

This is roughly equivalent to the RGB #ffd7d7.

§

Misc225 = 225

§Color #225.

This is roughly equivalent to the RGB #ffd7ff.

§

Misc226 = 226

§Color #226.

This is roughly equivalent to the RGB #ffff00.

§

Misc227 = 227

§Color #227.

This is roughly equivalent to the RGB #ffff5f.

§

Misc228 = 228

§Color #228.

This is roughly equivalent to the RGB #ffff87.

§

Misc229 = 229

§Color #229.

This is roughly equivalent to the RGB #ffffaf.

§

Misc230 = 230

§Color #230.

This is roughly equivalent to the RGB #ffffd7.

§

Misc231 = 231

§Color #231.

This is roughly equivalent to the RGB #ffffff.

§

Misc232 = 232

§Color #232.

This is roughly equivalent to the RGB #080808.

§

Misc233 = 233

§Color #233.

This is roughly equivalent to the RGB #121212.

§

Misc234 = 234

§Color #234.

This is roughly equivalent to the RGB #1c1c1c.

§

Misc235 = 235

§Color #235.

This is roughly equivalent to the RGB #262626.

§

Misc236 = 236

§Color #236.

This is roughly equivalent to the RGB #303030.

§

Misc237 = 237

§Color #237.

This is roughly equivalent to the RGB #3a3a3a.

§

Misc238 = 238

§Color #238.

This is roughly equivalent to the RGB #444444.

§

Misc239 = 239

§Color #239.

This is roughly equivalent to the RGB #4e4e4e.

§

Misc240 = 240

§Color #240.

This is roughly equivalent to the RGB #585858.

§

Misc241 = 241

§Color #241.

This is roughly equivalent to the RGB #626262.

§

Misc242 = 242

§Color #242.

This is roughly equivalent to the RGB #6c6c6c.

§

Misc243 = 243

§Color #243.

This is roughly equivalent to the RGB #767676.

§

Misc244 = 244

§Color #244.

This is roughly equivalent to the RGB #808080.

§

Misc245 = 245

§Color #245.

This is roughly equivalent to the RGB #8a8a8a.

§

Misc246 = 246

§Color #246.

This is roughly equivalent to the RGB #949494.

§

Misc247 = 247

§Color #247.

This is roughly equivalent to the RGB #9e9e9e.

§

Misc248 = 248

§Color #248.

This is roughly equivalent to the RGB #a8a8a8.

§

Misc249 = 249

§Color #249.

This is roughly equivalent to the RGB #b2b2b2.

§

Misc250 = 250

§Color #250.

This is roughly equivalent to the RGB #bcbcbc.

§

Misc251 = 251

§Color #251.

This is roughly equivalent to the RGB #c6c6c6.

§

Misc252 = 252

§Color #252.

This is roughly equivalent to the RGB #d0d0d0.

§

Misc253 = 253

§Color #253.

This is roughly equivalent to the RGB #dadada.

§

Misc254 = 254

§Color #254.

This is roughly equivalent to the RGB #e4e4e4.

§

Misc255 = 255

§Color #255.

This is roughly equivalent to the RGB #eeeeee.

Implementations§

Source§

impl AnsiColor

Source

pub const fn from_u8(num: u8) -> Self

§From u8.

Convert a u8 to the corresponding AnsiColor.

§Examples
use fyi_msg::AnsiColor;

assert_eq!(
    AnsiColor::from_u8(5),
    AnsiColor::Magenta,
);
Source

pub const fn as_str(self) -> &'static str

§As String Slice.

Return the full ANSI sequence for the selected color as a string slice.

§Examples
use fyi_msg::AnsiColor;

assert_eq!(
    AnsiColor::DarkOrange.as_str(),
    "\x1b[38;5;208m",
);
Source§

impl AnsiColor

Source

pub const RESET: &'static str = "\x1b[0m"

§ANSI Reset Sequence.

This tiny sequence resets all style/color attributes back to the terminal defaults.

§Examples
use fyi_msg::AnsiColor;

// Only "Blue" prints, well, blue.
println!(
    "{}Blue{} is the warmest color.",
    AnsiColor::Blue,
    AnsiColor::RESET,
);

Trait Implementations§

Source§

impl Clone for AnsiColor

Source§

fn clone(&self) -> AnsiColor

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AnsiColor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for AnsiColor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Print the full ANSI sequence for the selected color, e.g. "\x1b[38;5;199m".

§Examples
use fyi_msg::AnsiColor;

assert_eq!(
    AnsiColor::LightMagenta.to_string(),
    "\x1b[95m",
);

// Note the same thing can be obtained without allocation:
assert_eq!(
    AnsiColor::LightMagenta.as_str(),
    "\x1b[95m",
);
Source§

impl From<u8> for AnsiColor

Source§

fn from(num: u8) -> Self

§From u8.

Note this can also be achieved using the const AnsiColor::from_u8 method.

use fyi_msg::AnsiColor;

// All the colors of the termbow!
for i in u8::MIN..=u8::MAX {
    assert_eq!(
        AnsiColor::from(i),
        AnsiColor::from_u8(i),
    );
}
Source§

impl Hash for AnsiColor

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for AnsiColor

Source§

fn cmp(&self, other: &AnsiColor) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<AnsiColor> for u8

Source§

fn eq(&self, other: &AnsiColor) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<u8> for AnsiColor

Source§

fn eq(&self, other: &u8) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for AnsiColor

Source§

fn eq(&self, other: &AnsiColor) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for AnsiColor

Source§

fn partial_cmp(&self, other: &AnsiColor) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for AnsiColor

Source§

impl Eq for AnsiColor

Source§

impl StructuralPartialEq for AnsiColor

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.