Implemented GetColorFnFromHex
This commit is contained in:
parent
e849959b6b
commit
b6eefeb0c8
1 changed files with 7 additions and 0 deletions
7
z/tui.go
7
z/tui.go
|
@ -108,3 +108,10 @@ func OutputAppendRight(leftStr string, rightStr string, pad int) (string) {
|
||||||
|
|
||||||
return output
|
return output
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetColorFnFromHex(colorHex string) (func(...interface {}) string) {
|
||||||
|
if colorHex == "" {
|
||||||
|
colorHex = "#dddddd"
|
||||||
|
}
|
||||||
|
return color.NewRGBStyle(color.HEX(colorHex)).Sprint
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue