diff --git a/internal/config/styles.go b/internal/config/styles.go index 5ae172e3..e20e8383 100644 --- a/internal/config/styles.go +++ b/internal/config/styles.go @@ -61,9 +61,13 @@ type ( // Body tracks body styles. Body struct { - FgColor Color `yaml:"fgColor"` - BgColor Color `yaml:"bgColor"` - LogoColor Color `yaml:"logoColor"` + FgColor Color `yaml:"fgColor"` + BgColor Color `yaml:"bgColor"` + LogoColor Color `yaml:"logoColor"` + LogoColorMsg Color `yaml:"logoColorMsg"` + LogoColorInfo Color `yaml:"logoColorInfo"` + LogoColorWarn Color `yaml:"logoColorWarn"` + LogoColorError Color `yaml:"logoColorError"` } // Dialog tracks dialog styles. @@ -330,9 +334,13 @@ func newHelp() Help { func newBody() Body { return Body{ - FgColor: "cadetblue", - BgColor: "black", - LogoColor: "orange", + FgColor: "cadetblue", + BgColor: "black", + LogoColor: "orange", + LogoColorMsg: "white", + LogoColorInfo: "green", + LogoColorWarn: "mediumvioletred", + LogoColorError: "red", } } diff --git a/internal/ui/logo.go b/internal/ui/logo.go index 80c63199..a8cddad0 100644 --- a/internal/ui/logo.go +++ b/internal/ui/logo.go @@ -67,17 +67,17 @@ func (l *Logo) Reset() { // Err displays a log error state. func (l *Logo) Err(msg string) { - l.update(msg, config.NewColor("red")) + l.update(msg, l.styles.Body().LogoColorError) } // Warn displays a log warning state. func (l *Logo) Warn(msg string) { - l.update(msg, config.NewColor("mediumvioletred")) + l.update(msg, l.styles.Body().LogoColorWarn) } // Info displays a log info state. func (l *Logo) Info(msg string) { - l.update(msg, config.NewColor("green")) + l.update(msg, l.styles.Body().LogoColorInfo) } func (l *Logo) update(msg string, c config.Color) { @@ -87,7 +87,9 @@ func (l *Logo) update(msg string, c config.Color) { func (l *Logo) refreshStatus(msg string, c config.Color) { l.status.SetBackgroundColor(c.Color()) - l.status.SetText(fmt.Sprintf("[white::b]%s", msg)) + l.status.SetText( + fmt.Sprintf("[%s::b]%s", l.styles.Body().LogoColorMsg, msg), + ) } func (l *Logo) refreshLogo(c config.Color) { diff --git a/internal/ui/logo_test.go b/internal/ui/logo_test.go index 7a42c1d3..2e3c053c 100644 --- a/internal/ui/logo_test.go +++ b/internal/ui/logo_test.go @@ -24,17 +24,17 @@ func TestLogoStatus(t *testing.T) { "info": { "[#008000::b] ____ __.________ \n[#008000::b]| |/ _/ __ \\______\n[#008000::b]| < \\____ / ___/\n[#008000::b]| | \\ / /\\___ \\ \n[#008000::b]|____|__ \\ /____//____ >\n[#008000::b] \\/ \\/ \n", "blee", - "[white::b]blee\n", + "[#ffffff::b]blee\n", }, "warn": { "[#c71585::b] ____ __.________ \n[#c71585::b]| |/ _/ __ \\______\n[#c71585::b]| < \\____ / ___/\n[#c71585::b]| | \\ / /\\___ \\ \n[#c71585::b]|____|__ \\ /____//____ >\n[#c71585::b] \\/ \\/ \n", "blee", - "[white::b]blee\n", + "[#ffffff::b]blee\n", }, "err": { "[#ff0000::b] ____ __.________ \n[#ff0000::b]| |/ _/ __ \\______\n[#ff0000::b]| < \\____ / ___/\n[#ff0000::b]| | \\ / /\\___ \\ \n[#ff0000::b]|____|__ \\ /____//____ >\n[#ff0000::b] \\/ \\/ \n", "blee", - "[white::b]blee\n", + "[#ffffff::b]blee\n", }, }