File tree Expand file tree Collapse file tree 1 file changed +28
-9
lines changed Expand file tree Collapse file tree 1 file changed +28
-9
lines changed Original file line number Diff line number Diff line change 11
11
class Color (StrEnum ):
12
12
"""An enumeration of all color names supported by the Rich library.
13
13
14
- Using this enum allows for autocompletion and prevents typos when
15
- referencing color names. The members can be used for both foreground
16
- and background styling.
14
+ Using this enum allows for autocompletion and prevents typos when referencing
15
+ color names. The members can be used for both foreground and background colors.
16
+
17
+ Aside from DEFAULT, these colors come from the rich.color.ANSI_COLOR_NAMES dictionary.
18
+
19
+ The following colors are the 16 whose appearance is determined by the terminal.
20
+ - BLACK
21
+ - BLUE
22
+ - BRIGHT_BLACK
23
+ - BRIGHT_BLUE
24
+ - BRIGHT_CYAN
25
+ - BRIGHT_GREEN
26
+ - BRIGHT_MAGENTA
27
+ - BRIGHT_RED
28
+ - BRIGHT_WHITE
29
+ - BRIGHT_YELLOW
30
+ - CYAN
31
+ - GREEN
32
+ - MAGENTA
33
+ - RED
34
+ - WHITE
35
+ - YELLOW
17
36
"""
18
37
19
38
DEFAULT = "default" # Represents the terminal's default foreground or background color.
@@ -79,13 +98,13 @@ class Color(StrEnum):
79
98
GOLD1 = "gold1"
80
99
GOLD3 = "gold3"
81
100
GRAY0 = "gray0"
82
- GRAY100 = "gray100"
101
+ GRAY3 = "gray3"
102
+ GRAY7 = "gray7"
83
103
GRAY11 = "gray11"
84
104
GRAY15 = "gray15"
85
105
GRAY19 = "gray19"
86
106
GRAY23 = "gray23"
87
107
GRAY27 = "gray27"
88
- GRAY3 = "gray3"
89
108
GRAY30 = "gray30"
90
109
GRAY35 = "gray35"
91
110
GRAY37 = "gray37"
@@ -100,7 +119,6 @@ class Color(StrEnum):
100
119
GRAY63 = "gray63"
101
120
GRAY66 = "gray66"
102
121
GRAY69 = "gray69"
103
- GRAY7 = "gray7"
104
122
GRAY70 = "gray70"
105
123
GRAY74 = "gray74"
106
124
GRAY78 = "gray78"
@@ -109,19 +127,20 @@ class Color(StrEnum):
109
127
GRAY85 = "gray85"
110
128
GRAY89 = "gray89"
111
129
GRAY93 = "gray93"
130
+ GRAY100 = "gray100"
112
131
GREEN = "green"
113
132
GREEN1 = "green1"
114
133
GREEN3 = "green3"
115
134
GREEN4 = "green4"
116
135
GREEN_YELLOW = "green_yellow"
117
136
GREY0 = "grey0"
118
- GREY100 = "grey100"
137
+ GREY3 = "grey3"
138
+ GREY7 = "grey7"
119
139
GREY11 = "grey11"
120
140
GREY15 = "grey15"
121
141
GREY19 = "grey19"
122
142
GREY23 = "grey23"
123
143
GREY27 = "grey27"
124
- GREY3 = "grey3"
125
144
GREY30 = "grey30"
126
145
GREY35 = "grey35"
127
146
GREY37 = "grey37"
@@ -136,7 +155,6 @@ class Color(StrEnum):
136
155
GREY63 = "grey63"
137
156
GREY66 = "grey66"
138
157
GREY69 = "grey69"
139
- GREY7 = "grey7"
140
158
GREY70 = "grey70"
141
159
GREY74 = "grey74"
142
160
GREY78 = "grey78"
@@ -145,6 +163,7 @@ class Color(StrEnum):
145
163
GREY85 = "grey85"
146
164
GREY89 = "grey89"
147
165
GREY93 = "grey93"
166
+ GREY100 = "grey100"
148
167
HONEYDEW2 = "honeydew2"
149
168
HOT_PINK = "hot_pink"
150
169
HOT_PINK2 = "hot_pink2"
You can’t perform that action at this time.
0 commit comments