Skip to content

Commit

Permalink
Add helper function file
Browse files Browse the repository at this point in the history
  • Loading branch information
zmnpl committed May 24, 2021
1 parent 47aa786 commit d4a3c08
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tui/helper.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package tui

import (
"fmt"

"github.com/gdamore/tcell/v2"
)

func hexStringFromColor(c tcell.Color) string {
r, g, b := c.RGB()
return fmt.Sprintf("[#%02x%02x%02x]", r, g, b)
}

0 comments on commit d4a3c08

Please sign in to comment.