Skip to content

Commit

Permalink
Define additional colors and styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mkchoi212 committed Dec 29, 2017
1 parent 2cc0fd2 commit f617cdb
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion color.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ const (
Purple = 5
)

const (
Regular = 1
Light = 2
Highlight = 3
Underline = 4
)

func Colorize(s string, c int) string {
return fmt.Sprintf("\033[3%d;%dm%s\033[0m", c, 1, s)
return fmt.Sprintf("\033[3%d;%dm%s\033[0m", c, Regular, s)
}

func ColorizeLight(s string, c int) string {
return fmt.Sprintf("\033[3%d;%dm%s\033[0m", c, Light, s)
}

0 comments on commit f617cdb

Please sign in to comment.