tvxwidgets/utils.go

19 lines
297 B
Go
Raw Normal View History

2021-12-21 18:13:01 +11:00
package tvxwidgets
import "github.com/gdamore/tcell/v2"
2021-12-21 19:57:34 +11:00
const (
// gauge cell
prgCell = "▉"
)
2021-12-21 18:13:01 +11:00
// getColorName returns convert tcell color to its name
func getColorName(color tcell.Color) string {
for name, c := range tcell.ColorNames {
if c == color {
return name
}
}
return ""
}