mirror of
https://github.com/navidys/tvxwidgets.git
synced 2025-04-30 13:48:57 +08:00
19 lines
297 B
Go
19 lines
297 B
Go
package tvxwidgets
|
|
|
|
import "github.com/gdamore/tcell/v2"
|
|
|
|
const (
|
|
// gauge cell
|
|
prgCell = "▉"
|
|
)
|
|
|
|
// 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 ""
|
|
}
|