github.com/blend/go-sdk@v1.20220411.3/ansi/color256.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package ansi 9 10 import ( 11 "fmt" 12 ) 13 14 // Color256 represents an `xterm-256color` ANSI color code. 15 type Color256 int 16 17 // For W3C color list, see: 18 // - https://jonasjacek.github.io/colors/ 19 // - https://en.wikipedia.org/wiki/X11_color_names#Clashes_between_web_and_X11_colors_in_the_CSS_color_scheme 20 21 const ( 22 // Color256Black is an `xterm-256color` representing `Black` (#000000). 23 Color256Black Color256 = 0 24 // Color256Maroon is an `xterm-256color` representing `Maroon` (#800000). 25 Color256Maroon Color256 = 1 26 // Color256Green is an `xterm-256color` representing `Green` (#008000). 27 Color256Green Color256 = 2 28 // Color256Olive is an `xterm-256color` representing `Olive` (#808000). 29 Color256Olive Color256 = 3 30 // Color256Navy is an `xterm-256color` representing `Navy` (#000080). 31 Color256Navy Color256 = 4 32 // Color256Purple is an `xterm-256color` representing `Purple` (#800080). 33 Color256Purple Color256 = 5 34 // Color256Teal is an `xterm-256color` representing `Teal` (#008080). 35 Color256Teal Color256 = 6 36 // Color256Silver is an `xterm-256color` representing `Silver` (#c0c0c0). 37 Color256Silver Color256 = 7 38 // Color256Grey is an `xterm-256color` representing `Grey` (#808080). 39 Color256Grey Color256 = 8 40 // Color256Red is an `xterm-256color` representing `Red` (#ff0000). 41 Color256Red Color256 = 9 42 // Color256Lime is an `xterm-256color` representing `Lime` (#00ff00). 43 Color256Lime Color256 = 10 44 // Color256Yellow is an `xterm-256color` representing `Yellow` (#ffff00). 45 Color256Yellow Color256 = 11 46 // Color256Blue is an `xterm-256color` representing `Blue` (#0000ff). 47 Color256Blue Color256 = 12 48 // Color256Fuchsia is an `xterm-256color` representing `Fuchsia` (#ff00ff). 49 Color256Fuchsia Color256 = 13 50 // Color256Aqua is an `xterm-256color` representing `Aqua` (#00ffff). 51 Color256Aqua Color256 = 14 52 // Color256White is an `xterm-256color` representing `White` (#ffffff). 53 Color256White Color256 = 15 54 // Color256Grey0 is an `xterm-256color` representing `Grey0` (#000000). 55 Color256Grey0 Color256 = 16 56 // Color256NavyBlue is an `xterm-256color` representing `NavyBlue` (#00005f). 57 Color256NavyBlue Color256 = 17 58 // Color256DarkBlue is an `xterm-256color` representing `DarkBlue` (#000087). 59 Color256DarkBlue Color256 = 18 60 // Color256Blue3 is an `xterm-256color` representing `Blue3` (#0000af). 61 Color256Blue3 Color256 = 19 62 // Color256Blue3Alt2 is an `xterm-256color` representing `Blue3` (#0000d7). 63 // The `Alt2` suffix was added because the name `Blue3` describes 64 // multiple colors in the W3C color list. 65 Color256Blue3Alt2 Color256 = 20 66 // Color256Blue1 is an `xterm-256color` representing `Blue1` (#0000ff). 67 Color256Blue1 Color256 = 21 68 // Color256DarkGreen is an `xterm-256color` representing `DarkGreen` (#005f00). 69 Color256DarkGreen Color256 = 22 70 // Color256DeepSkyBlue4 is an `xterm-256color` representing `DeepSkyBlue4` (#005f5f). 71 Color256DeepSkyBlue4 Color256 = 23 72 // Color256DeepSkyBlue4Alt2 is an `xterm-256color` representing `DeepSkyBlue4` (#005f87). 73 // The `Alt2` suffix was added because the name `DeepSkyBlue4` describes 74 // multiple colors in the W3C color list. 75 Color256DeepSkyBlue4Alt2 Color256 = 24 76 // Color256DeepSkyBlue4Alt3 is an `xterm-256color` representing `DeepSkyBlue4` (#005faf). 77 // The `Alt3` suffix was added because the name `DeepSkyBlue4` describes 78 // multiple colors in the W3C color list. 79 Color256DeepSkyBlue4Alt3 Color256 = 25 80 // Color256DodgerBlue3 is an `xterm-256color` representing `DodgerBlue3` (#005fd7). 81 Color256DodgerBlue3 Color256 = 26 82 // Color256DodgerBlue2 is an `xterm-256color` representing `DodgerBlue2` (#005fff). 83 Color256DodgerBlue2 Color256 = 27 84 // Color256Green4 is an `xterm-256color` representing `Green4` (#008700). 85 Color256Green4 Color256 = 28 86 // Color256SpringGreen4 is an `xterm-256color` representing `SpringGreen4` (#00875f). 87 Color256SpringGreen4 Color256 = 29 88 // Color256Turquoise4 is an `xterm-256color` representing `Turquoise4` (#008787). 89 Color256Turquoise4 Color256 = 30 90 // Color256DeepSkyBlue3 is an `xterm-256color` representing `DeepSkyBlue3` (#0087af). 91 Color256DeepSkyBlue3 Color256 = 31 92 // Color256DeepSkyBlue3Alt2 is an `xterm-256color` representing `DeepSkyBlue3` (#0087d7). 93 // The `Alt2` suffix was added because the name `DeepSkyBlue3` describes 94 // multiple colors in the W3C color list. 95 Color256DeepSkyBlue3Alt2 Color256 = 32 96 // Color256DodgerBlue1 is an `xterm-256color` representing `DodgerBlue1` (#0087ff). 97 Color256DodgerBlue1 Color256 = 33 98 // Color256Green3 is an `xterm-256color` representing `Green3` (#00af00). 99 Color256Green3 Color256 = 34 100 // Color256SpringGreen3 is an `xterm-256color` representing `SpringGreen3` (#00af5f). 101 Color256SpringGreen3 Color256 = 35 102 // Color256DarkCyan is an `xterm-256color` representing `DarkCyan` (#00af87). 103 Color256DarkCyan Color256 = 36 104 // Color256LightSeaGreen is an `xterm-256color` representing `LightSeaGreen` (#00afaf). 105 Color256LightSeaGreen Color256 = 37 106 // Color256DeepSkyBlue2 is an `xterm-256color` representing `DeepSkyBlue2` (#00afd7). 107 Color256DeepSkyBlue2 Color256 = 38 108 // Color256DeepSkyBlue1 is an `xterm-256color` representing `DeepSkyBlue1` (#00afff). 109 Color256DeepSkyBlue1 Color256 = 39 110 // Color256Green3Alt2 is an `xterm-256color` representing `Green3` (#00d700). 111 // The `Alt2` suffix was added because the name `Green3` describes 112 // multiple colors in the W3C color list. 113 Color256Green3Alt2 Color256 = 40 114 // Color256SpringGreen3Alt2 is an `xterm-256color` representing `SpringGreen3` (#00d75f). 115 // The `Alt2` suffix was added because the name `SpringGreen3` describes 116 // multiple colors in the W3C color list. 117 Color256SpringGreen3Alt2 Color256 = 41 118 // Color256SpringGreen2 is an `xterm-256color` representing `SpringGreen2` (#00d787). 119 Color256SpringGreen2 Color256 = 42 120 // Color256Cyan3 is an `xterm-256color` representing `Cyan3` (#00d7af). 121 Color256Cyan3 Color256 = 43 122 // Color256DarkTurquoise is an `xterm-256color` representing `DarkTurquoise` (#00d7d7). 123 Color256DarkTurquoise Color256 = 44 124 // Color256Turquoise2 is an `xterm-256color` representing `Turquoise2` (#00d7ff). 125 Color256Turquoise2 Color256 = 45 126 // Color256Green1 is an `xterm-256color` representing `Green1` (#00ff00). 127 Color256Green1 Color256 = 46 128 // Color256SpringGreen2Alt2 is an `xterm-256color` representing `SpringGreen2` (#00ff5f). 129 // The `Alt2` suffix was added because the name `SpringGreen2` describes 130 // multiple colors in the W3C color list. 131 Color256SpringGreen2Alt2 Color256 = 47 132 // Color256SpringGreen1 is an `xterm-256color` representing `SpringGreen1` (#00ff87). 133 Color256SpringGreen1 Color256 = 48 134 // Color256MediumSpringGreen is an `xterm-256color` representing `MediumSpringGreen` (#00ffaf). 135 Color256MediumSpringGreen Color256 = 49 136 // Color256Cyan2 is an `xterm-256color` representing `Cyan2` (#00ffd7). 137 Color256Cyan2 Color256 = 50 138 // Color256Cyan1 is an `xterm-256color` representing `Cyan1` (#00ffff). 139 Color256Cyan1 Color256 = 51 140 // Color256DarkRed is an `xterm-256color` representing `DarkRed` (#5f0000). 141 Color256DarkRed Color256 = 52 142 // Color256DeepPink4 is an `xterm-256color` representing `DeepPink4` (#5f005f). 143 Color256DeepPink4 Color256 = 53 144 // Color256Purple4 is an `xterm-256color` representing `Purple4` (#5f0087). 145 Color256Purple4 Color256 = 54 146 // Color256Purple4Alt2 is an `xterm-256color` representing `Purple4` (#5f00af). 147 // The `Alt2` suffix was added because the name `Purple4` describes 148 // multiple colors in the W3C color list. 149 Color256Purple4Alt2 Color256 = 55 150 // Color256Purple3 is an `xterm-256color` representing `Purple3` (#5f00d7). 151 Color256Purple3 Color256 = 56 152 // Color256BlueViolet is an `xterm-256color` representing `BlueViolet` (#5f00ff). 153 Color256BlueViolet Color256 = 57 154 // Color256Orange4 is an `xterm-256color` representing `Orange4` (#5f5f00). 155 Color256Orange4 Color256 = 58 156 // Color256Grey37 is an `xterm-256color` representing `Grey37` (#5f5f5f). 157 Color256Grey37 Color256 = 59 158 // Color256MediumPurple4 is an `xterm-256color` representing `MediumPurple4` (#5f5f87). 159 Color256MediumPurple4 Color256 = 60 160 // Color256SlateBlue3 is an `xterm-256color` representing `SlateBlue3` (#5f5faf). 161 Color256SlateBlue3 Color256 = 61 162 // Color256SlateBlue3Alt2 is an `xterm-256color` representing `SlateBlue3` (#5f5fd7). 163 // The `Alt2` suffix was added because the name `SlateBlue3` describes 164 // multiple colors in the W3C color list. 165 Color256SlateBlue3Alt2 Color256 = 62 166 // Color256RoyalBlue1 is an `xterm-256color` representing `RoyalBlue1` (#5f5fff). 167 Color256RoyalBlue1 Color256 = 63 168 // Color256Chartreuse4 is an `xterm-256color` representing `Chartreuse4` (#5f8700). 169 Color256Chartreuse4 Color256 = 64 170 // Color256DarkSeaGreen4 is an `xterm-256color` representing `DarkSeaGreen4` (#5f875f). 171 Color256DarkSeaGreen4 Color256 = 65 172 // Color256PaleTurquoise4 is an `xterm-256color` representing `PaleTurquoise4` (#5f8787). 173 Color256PaleTurquoise4 Color256 = 66 174 // Color256SteelBlue is an `xterm-256color` representing `SteelBlue` (#5f87af). 175 Color256SteelBlue Color256 = 67 176 // Color256SteelBlue3 is an `xterm-256color` representing `SteelBlue3` (#5f87d7). 177 Color256SteelBlue3 Color256 = 68 178 // Color256CornflowerBlue is an `xterm-256color` representing `CornflowerBlue` (#5f87ff). 179 Color256CornflowerBlue Color256 = 69 180 // Color256Chartreuse3 is an `xterm-256color` representing `Chartreuse3` (#5faf00). 181 Color256Chartreuse3 Color256 = 70 182 // Color256DarkSeaGreen4Alt2 is an `xterm-256color` representing `DarkSeaGreen4` (#5faf5f). 183 // The `Alt2` suffix was added because the name `DarkSeaGreen4` describes 184 // multiple colors in the W3C color list. 185 Color256DarkSeaGreen4Alt2 Color256 = 71 186 // Color256CadetBlue is an `xterm-256color` representing `CadetBlue` (#5faf87). 187 Color256CadetBlue Color256 = 72 188 // Color256CadetBlueAlt2 is an `xterm-256color` representing `CadetBlue` (#5fafaf). 189 // The `Alt2` suffix was added because the name `CadetBlue` describes 190 // multiple colors in the W3C color list. 191 Color256CadetBlueAlt2 Color256 = 73 192 // Color256SkyBlue3 is an `xterm-256color` representing `SkyBlue3` (#5fafd7). 193 Color256SkyBlue3 Color256 = 74 194 // Color256SteelBlue1 is an `xterm-256color` representing `SteelBlue1` (#5fafff). 195 Color256SteelBlue1 Color256 = 75 196 // Color256Chartreuse3Alt2 is an `xterm-256color` representing `Chartreuse3` (#5fd700). 197 // The `Alt2` suffix was added because the name `Chartreuse3` describes 198 // multiple colors in the W3C color list. 199 Color256Chartreuse3Alt2 Color256 = 76 200 // Color256PaleGreen3 is an `xterm-256color` representing `PaleGreen3` (#5fd75f). 201 Color256PaleGreen3 Color256 = 77 202 // Color256SeaGreen3 is an `xterm-256color` representing `SeaGreen3` (#5fd787). 203 Color256SeaGreen3 Color256 = 78 204 // Color256Aquamarine3 is an `xterm-256color` representing `Aquamarine3` (#5fd7af). 205 Color256Aquamarine3 Color256 = 79 206 // Color256MediumTurquoise is an `xterm-256color` representing `MediumTurquoise` (#5fd7d7). 207 Color256MediumTurquoise Color256 = 80 208 // Color256SteelBlue1Alt2 is an `xterm-256color` representing `SteelBlue1` (#5fd7ff). 209 // The `Alt2` suffix was added because the name `SteelBlue1` describes 210 // multiple colors in the W3C color list. 211 Color256SteelBlue1Alt2 Color256 = 81 212 // Color256Chartreuse2 is an `xterm-256color` representing `Chartreuse2` (#5fff00). 213 Color256Chartreuse2 Color256 = 82 214 // Color256SeaGreen2 is an `xterm-256color` representing `SeaGreen2` (#5fff5f). 215 Color256SeaGreen2 Color256 = 83 216 // Color256SeaGreen1 is an `xterm-256color` representing `SeaGreen1` (#5fff87). 217 Color256SeaGreen1 Color256 = 84 218 // Color256SeaGreen1Alt2 is an `xterm-256color` representing `SeaGreen1` (#5fffaf). 219 // The `Alt2` suffix was added because the name `SeaGreen1` describes 220 // multiple colors in the W3C color list. 221 Color256SeaGreen1Alt2 Color256 = 85 222 // Color256Aquamarine1 is an `xterm-256color` representing `Aquamarine1` (#5fffd7). 223 Color256Aquamarine1 Color256 = 86 224 // Color256DarkSlateGray2 is an `xterm-256color` representing `DarkSlateGray2` (#5fffff). 225 Color256DarkSlateGray2 Color256 = 87 226 // Color256DarkRedAlt2 is an `xterm-256color` representing `DarkRed` (#870000). 227 // The `Alt2` suffix was added because the name `DarkRed` describes 228 // multiple colors in the W3C color list. 229 Color256DarkRedAlt2 Color256 = 88 230 // Color256DeepPink4Alt2 is an `xterm-256color` representing `DeepPink4` (#87005f). 231 // The `Alt2` suffix was added because the name `DeepPink4` describes 232 // multiple colors in the W3C color list. 233 Color256DeepPink4Alt2 Color256 = 89 234 // Color256DarkMagenta is an `xterm-256color` representing `DarkMagenta` (#870087). 235 Color256DarkMagenta Color256 = 90 236 // Color256DarkMagentaAlt2 is an `xterm-256color` representing `DarkMagenta` (#8700af). 237 // The `Alt2` suffix was added because the name `DarkMagenta` describes 238 // multiple colors in the W3C color list. 239 Color256DarkMagentaAlt2 Color256 = 91 240 // Color256DarkViolet is an `xterm-256color` representing `DarkViolet` (#8700d7). 241 Color256DarkViolet Color256 = 92 242 // Color256PurpleAlt2 is an `xterm-256color` representing `Purple` (#8700ff). 243 // The `Alt2` suffix was added because the name `Purple` describes 244 // multiple colors in the W3C color list. 245 Color256PurpleAlt2 Color256 = 93 246 // Color256Orange4Alt2 is an `xterm-256color` representing `Orange4` (#875f00). 247 // The `Alt2` suffix was added because the name `Orange4` describes 248 // multiple colors in the W3C color list. 249 Color256Orange4Alt2 Color256 = 94 250 // Color256LightPink4 is an `xterm-256color` representing `LightPink4` (#875f5f). 251 Color256LightPink4 Color256 = 95 252 // Color256Plum4 is an `xterm-256color` representing `Plum4` (#875f87). 253 Color256Plum4 Color256 = 96 254 // Color256MediumPurple3 is an `xterm-256color` representing `MediumPurple3` (#875faf). 255 Color256MediumPurple3 Color256 = 97 256 // Color256MediumPurple3Alt2 is an `xterm-256color` representing `MediumPurple3` (#875fd7). 257 // The `Alt2` suffix was added because the name `MediumPurple3` describes 258 // multiple colors in the W3C color list. 259 Color256MediumPurple3Alt2 Color256 = 98 260 // Color256SlateBlue1 is an `xterm-256color` representing `SlateBlue1` (#875fff). 261 Color256SlateBlue1 Color256 = 99 262 // Color256Yellow4 is an `xterm-256color` representing `Yellow4` (#878700). 263 Color256Yellow4 Color256 = 100 264 // Color256Wheat4 is an `xterm-256color` representing `Wheat4` (#87875f). 265 Color256Wheat4 Color256 = 101 266 // Color256Grey53 is an `xterm-256color` representing `Grey53` (#878787). 267 Color256Grey53 Color256 = 102 268 // Color256LightSlateGrey is an `xterm-256color` representing `LightSlateGrey` (#8787af). 269 Color256LightSlateGrey Color256 = 103 270 // Color256MediumPurple is an `xterm-256color` representing `MediumPurple` (#8787d7). 271 Color256MediumPurple Color256 = 104 272 // Color256LightSlateBlue is an `xterm-256color` representing `LightSlateBlue` (#8787ff). 273 Color256LightSlateBlue Color256 = 105 274 // Color256Yellow4Alt2 is an `xterm-256color` representing `Yellow4` (#87af00). 275 // The `Alt2` suffix was added because the name `Yellow4` describes 276 // multiple colors in the W3C color list. 277 Color256Yellow4Alt2 Color256 = 106 278 // Color256DarkOliveGreen3 is an `xterm-256color` representing `DarkOliveGreen3` (#87af5f). 279 Color256DarkOliveGreen3 Color256 = 107 280 // Color256DarkSeaGreen is an `xterm-256color` representing `DarkSeaGreen` (#87af87). 281 Color256DarkSeaGreen Color256 = 108 282 // Color256LightSkyBlue3 is an `xterm-256color` representing `LightSkyBlue3` (#87afaf). 283 Color256LightSkyBlue3 Color256 = 109 284 // Color256LightSkyBlue3Alt2 is an `xterm-256color` representing `LightSkyBlue3` (#87afd7). 285 // The `Alt2` suffix was added because the name `LightSkyBlue3` describes 286 // multiple colors in the W3C color list. 287 Color256LightSkyBlue3Alt2 Color256 = 110 288 // Color256SkyBlue2 is an `xterm-256color` representing `SkyBlue2` (#87afff). 289 Color256SkyBlue2 Color256 = 111 290 // Color256Chartreuse2Alt2 is an `xterm-256color` representing `Chartreuse2` (#87d700). 291 // The `Alt2` suffix was added because the name `Chartreuse2` describes 292 // multiple colors in the W3C color list. 293 Color256Chartreuse2Alt2 Color256 = 112 294 // Color256DarkOliveGreen3Alt2 is an `xterm-256color` representing `DarkOliveGreen3` (#87d75f). 295 // The `Alt2` suffix was added because the name `DarkOliveGreen3` describes 296 // multiple colors in the W3C color list. 297 Color256DarkOliveGreen3Alt2 Color256 = 113 298 // Color256PaleGreen3Alt2 is an `xterm-256color` representing `PaleGreen3` (#87d787). 299 // The `Alt2` suffix was added because the name `PaleGreen3` describes 300 // multiple colors in the W3C color list. 301 Color256PaleGreen3Alt2 Color256 = 114 302 // Color256DarkSeaGreen3 is an `xterm-256color` representing `DarkSeaGreen3` (#87d7af). 303 Color256DarkSeaGreen3 Color256 = 115 304 // Color256DarkSlateGray3 is an `xterm-256color` representing `DarkSlateGray3` (#87d7d7). 305 Color256DarkSlateGray3 Color256 = 116 306 // Color256SkyBlue1 is an `xterm-256color` representing `SkyBlue1` (#87d7ff). 307 Color256SkyBlue1 Color256 = 117 308 // Color256Chartreuse1 is an `xterm-256color` representing `Chartreuse1` (#87ff00). 309 Color256Chartreuse1 Color256 = 118 310 // Color256LightGreen is an `xterm-256color` representing `LightGreen` (#87ff5f). 311 Color256LightGreen Color256 = 119 312 // Color256LightGreenAlt2 is an `xterm-256color` representing `LightGreen` (#87ff87). 313 // The `Alt2` suffix was added because the name `LightGreen` describes 314 // multiple colors in the W3C color list. 315 Color256LightGreenAlt2 Color256 = 120 316 // Color256PaleGreen1 is an `xterm-256color` representing `PaleGreen1` (#87ffaf). 317 Color256PaleGreen1 Color256 = 121 318 // Color256Aquamarine1Alt2 is an `xterm-256color` representing `Aquamarine1` (#87ffd7). 319 // The `Alt2` suffix was added because the name `Aquamarine1` describes 320 // multiple colors in the W3C color list. 321 Color256Aquamarine1Alt2 Color256 = 122 322 // Color256DarkSlateGray1 is an `xterm-256color` representing `DarkSlateGray1` (#87ffff). 323 Color256DarkSlateGray1 Color256 = 123 324 // Color256Red3 is an `xterm-256color` representing `Red3` (#af0000). 325 Color256Red3 Color256 = 124 326 // Color256DeepPink4Alt3 is an `xterm-256color` representing `DeepPink4` (#af005f). 327 // The `Alt3` suffix was added because the name `DeepPink4` describes 328 // multiple colors in the W3C color list. 329 Color256DeepPink4Alt3 Color256 = 125 330 // Color256MediumVioletRed is an `xterm-256color` representing `MediumVioletRed` (#af0087). 331 Color256MediumVioletRed Color256 = 126 332 // Color256Magenta3 is an `xterm-256color` representing `Magenta3` (#af00af). 333 Color256Magenta3 Color256 = 127 334 // Color256DarkVioletAlt2 is an `xterm-256color` representing `DarkViolet` (#af00d7). 335 // The `Alt2` suffix was added because the name `DarkViolet` describes 336 // multiple colors in the W3C color list. 337 Color256DarkVioletAlt2 Color256 = 128 338 // Color256PurpleAlt3 is an `xterm-256color` representing `Purple` (#af00ff). 339 // The `Alt3` suffix was added because the name `Purple` describes 340 // multiple colors in the W3C color list. 341 Color256PurpleAlt3 Color256 = 129 342 // Color256DarkOrange3 is an `xterm-256color` representing `DarkOrange3` (#af5f00). 343 Color256DarkOrange3 Color256 = 130 344 // Color256IndianRed is an `xterm-256color` representing `IndianRed` (#af5f5f). 345 Color256IndianRed Color256 = 131 346 // Color256HotPink3 is an `xterm-256color` representing `HotPink3` (#af5f87). 347 Color256HotPink3 Color256 = 132 348 // Color256MediumOrchid3 is an `xterm-256color` representing `MediumOrchid3` (#af5faf). 349 Color256MediumOrchid3 Color256 = 133 350 // Color256MediumOrchid is an `xterm-256color` representing `MediumOrchid` (#af5fd7). 351 Color256MediumOrchid Color256 = 134 352 // Color256MediumPurple2 is an `xterm-256color` representing `MediumPurple2` (#af5fff). 353 Color256MediumPurple2 Color256 = 135 354 // Color256DarkGoldenrod is an `xterm-256color` representing `DarkGoldenrod` (#af8700). 355 Color256DarkGoldenrod Color256 = 136 356 // Color256LightSalmon3 is an `xterm-256color` representing `LightSalmon3` (#af875f). 357 Color256LightSalmon3 Color256 = 137 358 // Color256RosyBrown is an `xterm-256color` representing `RosyBrown` (#af8787). 359 Color256RosyBrown Color256 = 138 360 // Color256Grey63 is an `xterm-256color` representing `Grey63` (#af87af). 361 Color256Grey63 Color256 = 139 362 // Color256MediumPurple2Alt2 is an `xterm-256color` representing `MediumPurple2` (#af87d7). 363 // The `Alt2` suffix was added because the name `MediumPurple2` describes 364 // multiple colors in the W3C color list. 365 Color256MediumPurple2Alt2 Color256 = 140 366 // Color256MediumPurple1 is an `xterm-256color` representing `MediumPurple1` (#af87ff). 367 Color256MediumPurple1 Color256 = 141 368 // Color256Gold3 is an `xterm-256color` representing `Gold3` (#afaf00). 369 Color256Gold3 Color256 = 142 370 // Color256DarkKhaki is an `xterm-256color` representing `DarkKhaki` (#afaf5f). 371 Color256DarkKhaki Color256 = 143 372 // Color256NavajoWhite3 is an `xterm-256color` representing `NavajoWhite3` (#afaf87). 373 Color256NavajoWhite3 Color256 = 144 374 // Color256Grey69 is an `xterm-256color` representing `Grey69` (#afafaf). 375 Color256Grey69 Color256 = 145 376 // Color256LightSteelBlue3 is an `xterm-256color` representing `LightSteelBlue3` (#afafd7). 377 Color256LightSteelBlue3 Color256 = 146 378 // Color256LightSteelBlue is an `xterm-256color` representing `LightSteelBlue` (#afafff). 379 Color256LightSteelBlue Color256 = 147 380 // Color256Yellow3 is an `xterm-256color` representing `Yellow3` (#afd700). 381 Color256Yellow3 Color256 = 148 382 // Color256DarkOliveGreen3Alt3 is an `xterm-256color` representing `DarkOliveGreen3` (#afd75f). 383 // The `Alt3` suffix was added because the name `DarkOliveGreen3` describes 384 // multiple colors in the W3C color list. 385 Color256DarkOliveGreen3Alt3 Color256 = 149 386 // Color256DarkSeaGreen3Alt2 is an `xterm-256color` representing `DarkSeaGreen3` (#afd787). 387 // The `Alt2` suffix was added because the name `DarkSeaGreen3` describes 388 // multiple colors in the W3C color list. 389 Color256DarkSeaGreen3Alt2 Color256 = 150 390 // Color256DarkSeaGreen2 is an `xterm-256color` representing `DarkSeaGreen2` (#afd7af). 391 Color256DarkSeaGreen2 Color256 = 151 392 // Color256LightCyan3 is an `xterm-256color` representing `LightCyan3` (#afd7d7). 393 Color256LightCyan3 Color256 = 152 394 // Color256LightSkyBlue1 is an `xterm-256color` representing `LightSkyBlue1` (#afd7ff). 395 Color256LightSkyBlue1 Color256 = 153 396 // Color256GreenYellow is an `xterm-256color` representing `GreenYellow` (#afff00). 397 Color256GreenYellow Color256 = 154 398 // Color256DarkOliveGreen2 is an `xterm-256color` representing `DarkOliveGreen2` (#afff5f). 399 Color256DarkOliveGreen2 Color256 = 155 400 // Color256PaleGreen1Alt2 is an `xterm-256color` representing `PaleGreen1` (#afff87). 401 // The `Alt2` suffix was added because the name `PaleGreen1` describes 402 // multiple colors in the W3C color list. 403 Color256PaleGreen1Alt2 Color256 = 156 404 // Color256DarkSeaGreen2Alt2 is an `xterm-256color` representing `DarkSeaGreen2` (#afffaf). 405 // The `Alt2` suffix was added because the name `DarkSeaGreen2` describes 406 // multiple colors in the W3C color list. 407 Color256DarkSeaGreen2Alt2 Color256 = 157 408 // Color256DarkSeaGreen1 is an `xterm-256color` representing `DarkSeaGreen1` (#afffd7). 409 Color256DarkSeaGreen1 Color256 = 158 410 // Color256PaleTurquoise1 is an `xterm-256color` representing `PaleTurquoise1` (#afffff). 411 Color256PaleTurquoise1 Color256 = 159 412 // Color256Red3Alt2 is an `xterm-256color` representing `Red3` (#d70000). 413 // The `Alt2` suffix was added because the name `Red3` describes 414 // multiple colors in the W3C color list. 415 Color256Red3Alt2 Color256 = 160 416 // Color256DeepPink3 is an `xterm-256color` representing `DeepPink3` (#d7005f). 417 Color256DeepPink3 Color256 = 161 418 // Color256DeepPink3Alt2 is an `xterm-256color` representing `DeepPink3` (#d70087). 419 // The `Alt2` suffix was added because the name `DeepPink3` describes 420 // multiple colors in the W3C color list. 421 Color256DeepPink3Alt2 Color256 = 162 422 // Color256Magenta3Alt2 is an `xterm-256color` representing `Magenta3` (#d700af). 423 // The `Alt2` suffix was added because the name `Magenta3` describes 424 // multiple colors in the W3C color list. 425 Color256Magenta3Alt2 Color256 = 163 426 // Color256Magenta3Alt3 is an `xterm-256color` representing `Magenta3` (#d700d7). 427 // The `Alt3` suffix was added because the name `Magenta3` describes 428 // multiple colors in the W3C color list. 429 Color256Magenta3Alt3 Color256 = 164 430 // Color256Magenta2 is an `xterm-256color` representing `Magenta2` (#d700ff). 431 Color256Magenta2 Color256 = 165 432 // Color256DarkOrange3Alt2 is an `xterm-256color` representing `DarkOrange3` (#d75f00). 433 // The `Alt2` suffix was added because the name `DarkOrange3` describes 434 // multiple colors in the W3C color list. 435 Color256DarkOrange3Alt2 Color256 = 166 436 // Color256IndianRedAlt2 is an `xterm-256color` representing `IndianRed` (#d75f5f). 437 // The `Alt2` suffix was added because the name `IndianRed` describes 438 // multiple colors in the W3C color list. 439 Color256IndianRedAlt2 Color256 = 167 440 // Color256HotPink3Alt2 is an `xterm-256color` representing `HotPink3` (#d75f87). 441 // The `Alt2` suffix was added because the name `HotPink3` describes 442 // multiple colors in the W3C color list. 443 Color256HotPink3Alt2 Color256 = 168 444 // Color256HotPink2 is an `xterm-256color` representing `HotPink2` (#d75faf). 445 Color256HotPink2 Color256 = 169 446 // Color256Orchid is an `xterm-256color` representing `Orchid` (#d75fd7). 447 Color256Orchid Color256 = 170 448 // Color256MediumOrchid1 is an `xterm-256color` representing `MediumOrchid1` (#d75fff). 449 Color256MediumOrchid1 Color256 = 171 450 // Color256Orange3 is an `xterm-256color` representing `Orange3` (#d78700). 451 Color256Orange3 Color256 = 172 452 // Color256LightSalmon3Alt2 is an `xterm-256color` representing `LightSalmon3` (#d7875f). 453 // The `Alt2` suffix was added because the name `LightSalmon3` describes 454 // multiple colors in the W3C color list. 455 Color256LightSalmon3Alt2 Color256 = 173 456 // Color256LightPink3 is an `xterm-256color` representing `LightPink3` (#d78787). 457 Color256LightPink3 Color256 = 174 458 // Color256Pink3 is an `xterm-256color` representing `Pink3` (#d787af). 459 Color256Pink3 Color256 = 175 460 // Color256Plum3 is an `xterm-256color` representing `Plum3` (#d787d7). 461 Color256Plum3 Color256 = 176 462 // Color256Violet is an `xterm-256color` representing `Violet` (#d787ff). 463 Color256Violet Color256 = 177 464 // Color256Gold3Alt2 is an `xterm-256color` representing `Gold3` (#d7af00). 465 // The `Alt2` suffix was added because the name `Gold3` describes 466 // multiple colors in the W3C color list. 467 Color256Gold3Alt2 Color256 = 178 468 // Color256LightGoldenrod3 is an `xterm-256color` representing `LightGoldenrod3` (#d7af5f). 469 Color256LightGoldenrod3 Color256 = 179 470 // Color256Tan is an `xterm-256color` representing `Tan` (#d7af87). 471 Color256Tan Color256 = 180 472 // Color256MistyRose3 is an `xterm-256color` representing `MistyRose3` (#d7afaf). 473 Color256MistyRose3 Color256 = 181 474 // Color256Thistle3 is an `xterm-256color` representing `Thistle3` (#d7afd7). 475 Color256Thistle3 Color256 = 182 476 // Color256Plum2 is an `xterm-256color` representing `Plum2` (#d7afff). 477 Color256Plum2 Color256 = 183 478 // Color256Yellow3Alt2 is an `xterm-256color` representing `Yellow3` (#d7d700). 479 // The `Alt2` suffix was added because the name `Yellow3` describes 480 // multiple colors in the W3C color list. 481 Color256Yellow3Alt2 Color256 = 184 482 // Color256Khaki3 is an `xterm-256color` representing `Khaki3` (#d7d75f). 483 Color256Khaki3 Color256 = 185 484 // Color256LightGoldenrod2 is an `xterm-256color` representing `LightGoldenrod2` (#d7d787). 485 Color256LightGoldenrod2 Color256 = 186 486 // Color256LightYellow3 is an `xterm-256color` representing `LightYellow3` (#d7d7af). 487 Color256LightYellow3 Color256 = 187 488 // Color256Grey84 is an `xterm-256color` representing `Grey84` (#d7d7d7). 489 Color256Grey84 Color256 = 188 490 // Color256LightSteelBlue1 is an `xterm-256color` representing `LightSteelBlue1` (#d7d7ff). 491 Color256LightSteelBlue1 Color256 = 189 492 // Color256Yellow2 is an `xterm-256color` representing `Yellow2` (#d7ff00). 493 Color256Yellow2 Color256 = 190 494 // Color256DarkOliveGreen1 is an `xterm-256color` representing `DarkOliveGreen1` (#d7ff5f). 495 Color256DarkOliveGreen1 Color256 = 191 496 // Color256DarkOliveGreen1Alt2 is an `xterm-256color` representing `DarkOliveGreen1` (#d7ff87). 497 // The `Alt2` suffix was added because the name `DarkOliveGreen1` describes 498 // multiple colors in the W3C color list. 499 Color256DarkOliveGreen1Alt2 Color256 = 192 500 // Color256DarkSeaGreen1Alt2 is an `xterm-256color` representing `DarkSeaGreen1` (#d7ffaf). 501 // The `Alt2` suffix was added because the name `DarkSeaGreen1` describes 502 // multiple colors in the W3C color list. 503 Color256DarkSeaGreen1Alt2 Color256 = 193 504 // Color256Honeydew2 is an `xterm-256color` representing `Honeydew2` (#d7ffd7). 505 Color256Honeydew2 Color256 = 194 506 // Color256LightCyan1 is an `xterm-256color` representing `LightCyan1` (#d7ffff). 507 Color256LightCyan1 Color256 = 195 508 // Color256Red1 is an `xterm-256color` representing `Red1` (#ff0000). 509 Color256Red1 Color256 = 196 510 // Color256DeepPink2 is an `xterm-256color` representing `DeepPink2` (#ff005f). 511 Color256DeepPink2 Color256 = 197 512 // Color256DeepPink1 is an `xterm-256color` representing `DeepPink1` (#ff0087). 513 Color256DeepPink1 Color256 = 198 514 // Color256DeepPink1Alt2 is an `xterm-256color` representing `DeepPink1` (#ff00af). 515 // The `Alt2` suffix was added because the name `DeepPink1` describes 516 // multiple colors in the W3C color list. 517 Color256DeepPink1Alt2 Color256 = 199 518 // Color256Magenta2Alt2 is an `xterm-256color` representing `Magenta2` (#ff00d7). 519 // The `Alt2` suffix was added because the name `Magenta2` describes 520 // multiple colors in the W3C color list. 521 Color256Magenta2Alt2 Color256 = 200 522 // Color256Magenta1 is an `xterm-256color` representing `Magenta1` (#ff00ff). 523 Color256Magenta1 Color256 = 201 524 // Color256OrangeRed1 is an `xterm-256color` representing `OrangeRed1` (#ff5f00). 525 Color256OrangeRed1 Color256 = 202 526 // Color256IndianRed1 is an `xterm-256color` representing `IndianRed1` (#ff5f5f). 527 Color256IndianRed1 Color256 = 203 528 // Color256IndianRed1Alt2 is an `xterm-256color` representing `IndianRed1` (#ff5f87). 529 // The `Alt2` suffix was added because the name `IndianRed1` describes 530 // multiple colors in the W3C color list. 531 Color256IndianRed1Alt2 Color256 = 204 532 // Color256HotPink is an `xterm-256color` representing `HotPink` (#ff5faf). 533 Color256HotPink Color256 = 205 534 // Color256HotPinkAlt2 is an `xterm-256color` representing `HotPink` (#ff5fd7). 535 // The `Alt2` suffix was added because the name `HotPink` describes 536 // multiple colors in the W3C color list. 537 Color256HotPinkAlt2 Color256 = 206 538 // Color256MediumOrchid1Alt2 is an `xterm-256color` representing `MediumOrchid1` (#ff5fff). 539 // The `Alt2` suffix was added because the name `MediumOrchid1` describes 540 // multiple colors in the W3C color list. 541 Color256MediumOrchid1Alt2 Color256 = 207 542 // Color256DarkOrange is an `xterm-256color` representing `DarkOrange` (#ff8700). 543 Color256DarkOrange Color256 = 208 544 // Color256Salmon1 is an `xterm-256color` representing `Salmon1` (#ff875f). 545 Color256Salmon1 Color256 = 209 546 // Color256LightCoral is an `xterm-256color` representing `LightCoral` (#ff8787). 547 Color256LightCoral Color256 = 210 548 // Color256PaleVioletRed1 is an `xterm-256color` representing `PaleVioletRed1` (#ff87af). 549 Color256PaleVioletRed1 Color256 = 211 550 // Color256Orchid2 is an `xterm-256color` representing `Orchid2` (#ff87d7). 551 Color256Orchid2 Color256 = 212 552 // Color256Orchid1 is an `xterm-256color` representing `Orchid1` (#ff87ff). 553 Color256Orchid1 Color256 = 213 554 // Color256Orange1 is an `xterm-256color` representing `Orange1` (#ffaf00). 555 Color256Orange1 Color256 = 214 556 // Color256SandyBrown is an `xterm-256color` representing `SandyBrown` (#ffaf5f). 557 Color256SandyBrown Color256 = 215 558 // Color256LightSalmon1 is an `xterm-256color` representing `LightSalmon1` (#ffaf87). 559 Color256LightSalmon1 Color256 = 216 560 // Color256LightPink1 is an `xterm-256color` representing `LightPink1` (#ffafaf). 561 Color256LightPink1 Color256 = 217 562 // Color256Pink1 is an `xterm-256color` representing `Pink1` (#ffafd7). 563 Color256Pink1 Color256 = 218 564 // Color256Plum1 is an `xterm-256color` representing `Plum1` (#ffafff). 565 Color256Plum1 Color256 = 219 566 // Color256Gold1 is an `xterm-256color` representing `Gold1` (#ffd700). 567 Color256Gold1 Color256 = 220 568 // Color256LightGoldenrod2Alt2 is an `xterm-256color` representing `LightGoldenrod2` (#ffd75f). 569 // The `Alt2` suffix was added because the name `LightGoldenrod2` describes 570 // multiple colors in the W3C color list. 571 Color256LightGoldenrod2Alt2 Color256 = 221 572 // Color256LightGoldenrod2Alt3 is an `xterm-256color` representing `LightGoldenrod2` (#ffd787). 573 // The `Alt3` suffix was added because the name `LightGoldenrod2` describes 574 // multiple colors in the W3C color list. 575 Color256LightGoldenrod2Alt3 Color256 = 222 576 // Color256NavajoWhite1 is an `xterm-256color` representing `NavajoWhite1` (#ffd7af). 577 Color256NavajoWhite1 Color256 = 223 578 // Color256MistyRose1 is an `xterm-256color` representing `MistyRose1` (#ffd7d7). 579 Color256MistyRose1 Color256 = 224 580 // Color256Thistle1 is an `xterm-256color` representing `Thistle1` (#ffd7ff). 581 Color256Thistle1 Color256 = 225 582 // Color256Yellow1 is an `xterm-256color` representing `Yellow1` (#ffff00). 583 Color256Yellow1 Color256 = 226 584 // Color256LightGoldenrod1 is an `xterm-256color` representing `LightGoldenrod1` (#ffff5f). 585 Color256LightGoldenrod1 Color256 = 227 586 // Color256Khaki1 is an `xterm-256color` representing `Khaki1` (#ffff87). 587 Color256Khaki1 Color256 = 228 588 // Color256Wheat1 is an `xterm-256color` representing `Wheat1` (#ffffaf). 589 Color256Wheat1 Color256 = 229 590 // Color256Cornsilk1 is an `xterm-256color` representing `Cornsilk1` (#ffffd7). 591 Color256Cornsilk1 Color256 = 230 592 // Color256Grey100 is an `xterm-256color` representing `Grey100` (#ffffff). 593 Color256Grey100 Color256 = 231 594 // Color256Grey3 is an `xterm-256color` representing `Grey3` (#080808). 595 Color256Grey3 Color256 = 232 596 // Color256Grey7 is an `xterm-256color` representing `Grey7` (#121212). 597 Color256Grey7 Color256 = 233 598 // Color256Grey11 is an `xterm-256color` representing `Grey11` (#1c1c1c). 599 Color256Grey11 Color256 = 234 600 // Color256Grey15 is an `xterm-256color` representing `Grey15` (#262626). 601 Color256Grey15 Color256 = 235 602 // Color256Grey19 is an `xterm-256color` representing `Grey19` (#303030). 603 Color256Grey19 Color256 = 236 604 // Color256Grey23 is an `xterm-256color` representing `Grey23` (#3a3a3a). 605 Color256Grey23 Color256 = 237 606 // Color256Grey27 is an `xterm-256color` representing `Grey27` (#444444). 607 Color256Grey27 Color256 = 238 608 // Color256Grey30 is an `xterm-256color` representing `Grey30` (#4e4e4e). 609 Color256Grey30 Color256 = 239 610 // Color256Grey35 is an `xterm-256color` representing `Grey35` (#585858). 611 Color256Grey35 Color256 = 240 612 // Color256Grey39 is an `xterm-256color` representing `Grey39` (#626262). 613 Color256Grey39 Color256 = 241 614 // Color256Grey42 is an `xterm-256color` representing `Grey42` (#6c6c6c). 615 Color256Grey42 Color256 = 242 616 // Color256Grey46 is an `xterm-256color` representing `Grey46` (#767676). 617 Color256Grey46 Color256 = 243 618 // Color256Grey50 is an `xterm-256color` representing `Grey50` (#808080). 619 Color256Grey50 Color256 = 244 620 // Color256Grey54 is an `xterm-256color` representing `Grey54` (#8a8a8a). 621 Color256Grey54 Color256 = 245 622 // Color256Grey58 is an `xterm-256color` representing `Grey58` (#949494). 623 Color256Grey58 Color256 = 246 624 // Color256Grey62 is an `xterm-256color` representing `Grey62` (#9e9e9e). 625 Color256Grey62 Color256 = 247 626 // Color256Grey66 is an `xterm-256color` representing `Grey66` (#a8a8a8). 627 Color256Grey66 Color256 = 248 628 // Color256Grey70 is an `xterm-256color` representing `Grey70` (#b2b2b2). 629 Color256Grey70 Color256 = 249 630 // Color256Grey74 is an `xterm-256color` representing `Grey74` (#bcbcbc). 631 Color256Grey74 Color256 = 250 632 // Color256Grey78 is an `xterm-256color` representing `Grey78` (#c6c6c6). 633 Color256Grey78 Color256 = 251 634 // Color256Grey82 is an `xterm-256color` representing `Grey82` (#d0d0d0). 635 Color256Grey82 Color256 = 252 636 // Color256Grey85 is an `xterm-256color` representing `Grey85` (#dadada). 637 Color256Grey85 Color256 = 253 638 // Color256Grey89 is an `xterm-256color` representing `Grey89` (#e4e4e4). 639 Color256Grey89 Color256 = 254 640 // Color256Grey93 is an `xterm-256color` representing `Grey93` (#eeeeee). 641 Color256Grey93 Color256 = 255 642 ) 643 644 // Apply applies a color256 to a given string. 645 func (c Color256) Apply(text string) string { 646 return fmt.Sprintf("\033[38;5;%dm%s%s", c, text, ColorReset) 647 }