diff --git a/z/tui.go b/z/tui.go index 8d0c533..0b9dfdd 100644 --- a/z/tui.go +++ b/z/tui.go @@ -108,3 +108,10 @@ func OutputAppendRight(leftStr string, rightStr string, pad int) (string) { return output } + +func GetColorFnFromHex(colorHex string) (func(...interface {}) string) { + if colorHex == "" { + colorHex = "#dddddd" + } + return color.NewRGBStyle(color.HEX(colorHex)).Sprint +}