-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
313 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,50 @@ | ||
package color | ||
|
||
import ( | ||
"github.com/fatih/color" | ||
"fmt" | ||
|
||
"github.com/charmbracelet/lipgloss" | ||
) | ||
|
||
var ( | ||
blue = color.New(color.FgBlue).SprintFunc() | ||
cyan = color.New(color.FgCyan).SprintFunc() | ||
green = color.New(color.FgGreen).SprintFunc() | ||
red = color.New(color.FgRed).SprintFunc() | ||
yellow = color.New(color.FgYellow).SprintFunc() | ||
purple = color.New(color.FgMagenta).SprintFunc() | ||
grey = color.New(color.FgHiWhite).SprintFunc() | ||
bold = lipgloss.NewStyle().Bold(true) | ||
red = lipgloss.NewStyle().Foreground(lipgloss.ANSIColor(1)) | ||
green = lipgloss.NewStyle().Foreground(lipgloss.ANSIColor(2)) | ||
yellow = lipgloss.NewStyle().Foreground(lipgloss.ANSIColor(3)) | ||
blue = lipgloss.NewStyle().Foreground(lipgloss.ANSIColor(4)) | ||
purple = lipgloss.NewStyle().Foreground(lipgloss.ANSIColor(5)) | ||
cyan = lipgloss.NewStyle().Foreground(lipgloss.ANSIColor(6)) | ||
grey = lipgloss.NewStyle().Foreground(lipgloss.ANSIColor(7)) | ||
) | ||
|
||
func Bold(a ...interface{}) string { | ||
return bold.Render(fmt.Sprint(a...)) | ||
} | ||
|
||
func Blue(a ...interface{}) string { | ||
return blue(a...) | ||
return blue.Render(fmt.Sprint(a...)) | ||
} | ||
|
||
func Cyan(a ...interface{}) string { | ||
return cyan(a...) | ||
return cyan.Render(fmt.Sprint(a...)) | ||
} | ||
|
||
func Green(a ...interface{}) string { | ||
return green(a...) | ||
return green.Render(fmt.Sprint(a...)) | ||
} | ||
|
||
func Red(a ...interface{}) string { | ||
return red(a...) | ||
return red.Render(fmt.Sprint(a...)) | ||
} | ||
|
||
func Yellow(a ...interface{}) string { | ||
return yellow(a...) | ||
return yellow.Render(fmt.Sprint(a...)) | ||
} | ||
|
||
func Purple(a ...interface{}) string { | ||
return purple(a...) | ||
return purple.Render(fmt.Sprint(a...)) | ||
} | ||
|
||
func Grey(a ...interface{}) string { | ||
return grey(a...) | ||
return grey.Render(fmt.Sprint(a...)) | ||
} |
Oops, something went wrong.