mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 02:01:43 +03:00
999e61224c
The rendering of color for 'No description provided' text is broken on bright terminals - it sets black background which together with default black forground color renders opaque rectangle. The GreyBold color alias is broken too - name suggests bold gray forground color, but actually sets bold default fg color with black bacground. First make color alias consistent. Rename it to BlackBold and have it set bold black fg color (same as similar *Bold aliases). Second, update all places which use it to render text to also use white background to prevent it from disappering in terminals with black background color.
25 lines
1.1 KiB
Go
25 lines
1.1 KiB
Go
package colors
|
|
|
|
import "github.com/fatih/color"
|
|
|
|
var (
|
|
Bold = color.New(color.Bold).SprintFunc()
|
|
Black = color.New(color.FgBlack).SprintFunc()
|
|
BlackBold = color.New(color.FgBlack, color.Bold).SprintfFunc()
|
|
BlackBg = color.New(color.BgBlack, color.FgWhite).SprintFunc()
|
|
White = color.New(color.FgWhite).SprintFunc()
|
|
WhiteBold = color.New(color.FgWhite, color.Bold).SprintFunc()
|
|
WhiteBg = color.New(color.BgWhite).SprintFunc()
|
|
Yellow = color.New(color.FgYellow).SprintFunc()
|
|
YellowBold = color.New(color.FgYellow, color.Bold).SprintFunc()
|
|
YellowBg = color.New(color.BgYellow, color.FgBlack).SprintFunc()
|
|
Green = color.New(color.FgGreen).SprintFunc()
|
|
GreenBg = color.New(color.BgGreen, color.FgBlack).SprintFunc()
|
|
Red = color.New(color.FgRed).SprintFunc()
|
|
Cyan = color.New(color.FgCyan).SprintFunc()
|
|
CyanBg = color.New(color.BgCyan, color.FgBlack).SprintFunc()
|
|
Blue = color.New(color.FgBlue).SprintFunc()
|
|
BlueBg = color.New(color.BgBlue).SprintFunc()
|
|
Magenta = color.New(color.FgMagenta).SprintFunc()
|
|
)
|