File tree Expand file tree Collapse file tree 3 files changed +21
-15
lines changed Expand file tree Collapse file tree 3 files changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,13 @@ var (
43
43
)
44
44
45
45
var (
46
- Green = Color ("2" )
47
- Red = Color ("1" )
48
- Yellow = Color ("3" )
49
- Blue = Color ("4" )
46
+ Red = Color ("1" )
47
+ Green = Color ("2" )
48
+ Yellow = Color ("3" )
49
+ Blue = Color ("4" )
50
+ Magenta = Color ("5" )
51
+ White = Color ("7" )
52
+ BrightMagenta = Color ("13" )
50
53
)
51
54
52
55
// Color returns a color for the given string.
@@ -138,27 +141,30 @@ func init() {
138
141
Code : pretty.Style {
139
142
ifTerm (pretty .XPad (1 , 1 )),
140
143
pretty .FgColor (color .Color ("#ED567A" )),
141
- pretty .BgColor (color .Color ("#2c2c2c " )),
144
+ pretty .BgColor (color .Color ("#2C2C2C " )),
142
145
},
143
146
DateTimeStamp : pretty.Style {
144
- pretty .FgColor (color . Color ( "#7571F9" ) ),
147
+ pretty .FgColor (Blue ),
145
148
},
146
149
Error : pretty.Style {
147
150
pretty .FgColor (Red ),
148
151
},
149
152
Field : pretty.Style {
150
153
pretty .XPad (1 , 1 ),
151
154
pretty .FgColor (color .Color ("#FFFFFF" )),
152
- pretty .BgColor (color .Color ("#2b2a2a" )),
155
+ pretty .BgColor (color .Color ("#2B2A2A" )),
156
+ },
157
+ Fuchsia : pretty.Style {
158
+ pretty .FgColor (BrightMagenta ),
153
159
},
154
160
Keyword : pretty.Style {
155
161
pretty .FgColor (Green ),
156
162
},
157
163
Placeholder : pretty.Style {
158
- pretty .FgColor (color . Color ( "#4d46b3" ) ),
164
+ pretty .FgColor (Magenta ),
159
165
},
160
166
Prompt : pretty.Style {
161
- pretty .FgColor (color . Color ( "#5C5C5C" ) ),
167
+ pretty .FgColor (White ),
162
168
pretty .Wrap ("> " , "" ),
163
169
},
164
170
Warn : pretty.Style {
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ func (m selectModel) View() string {
256
256
if m .cursor == start + i {
257
257
style = pretty.Style {
258
258
pretty .Wrap ("> " , "" ),
259
- pretty . FgColor ( Green ) ,
259
+ DefaultStyles . Keyword ,
260
260
}
261
261
}
262
262
@@ -481,13 +481,13 @@ func (m multiSelectModel) View() string {
481
481
o := option .option
482
482
483
483
if m .cursor == i {
484
- cursor = pretty .Sprint (pretty . FgColor ( Green ) , "> " )
485
- chosen = pretty .Sprint (pretty . FgColor ( Green ) , "[ ]" )
486
- o = pretty .Sprint (pretty . FgColor ( Green ) , o )
484
+ cursor = pretty .Sprint (DefaultStyles . Keyword , "> " )
485
+ chosen = pretty .Sprint (DefaultStyles . Keyword , "[ ]" )
486
+ o = pretty .Sprint (DefaultStyles . Keyword , o )
487
487
}
488
488
489
489
if option .chosen {
490
- chosen = pretty .Sprint (pretty . FgColor ( Green ) , "[x]" )
490
+ chosen = pretty .Sprint (DefaultStyles . Keyword , "[x]" )
491
491
}
492
492
493
493
_ , _ = s .WriteString (fmt .Sprintf (
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ func main() {
73
73
msg = pretty .Sprint (cliui .DefaultStyles .FocusedPrompt , "This is a focused prompt message" )
74
74
_ , _ = fmt .Fprintln (inv .Stdout , msg )
75
75
76
- msg = pretty .Sprint (cliui .DefaultStyles .Fuchsia , "This is a fuchsia prompt message" )
76
+ msg = pretty .Sprint (cliui .DefaultStyles .Fuchsia , "This is a fuchsia message" )
77
77
_ , _ = fmt .Fprintln (inv .Stdout , msg )
78
78
79
79
msg = pretty .Sprint (cliui .DefaultStyles .Warn , "This is a warning message" )
You can’t perform that action at this time.
0 commit comments