|
|
@@ -6,8 +6,8 @@ Style terminal text.
|
|
|
|
|
|
### Usage
|
|
|
[labstack/gommon/color](https://github.com/labstack/gommon/blob/master/color/color_test.go)
|
|
|
-```go
|
|
|
// Colored text
|
|
|
+```go
|
|
|
fmt.Println(color.Black("black"))
|
|
|
fmt.Println(color.Red("red"))
|
|
|
fmt.Println(color.Green("green"))
|
|
|
@@ -20,8 +20,8 @@ fmt.Println(color.Grey("grey"))
|
|
|
```
|
|
|

|
|
|
|
|
|
-```go
|
|
|
// Colored background
|
|
|
+```go
|
|
|
fmt.Println(color.BlackBg("black background", color.Wht))
|
|
|
fmt.Println(color.RedBg("red background"))
|
|
|
fmt.Println(color.GreenBg("green background"))
|
|
|
@@ -33,8 +33,8 @@ fmt.Println(color.WhiteBg("white background"))
|
|
|
```
|
|
|

|
|
|
|
|
|
-```go
|
|
|
// Emphasis
|
|
|
+```go
|
|
|
fmt.Println(color.Bold("bold"))
|
|
|
fmt.Println(color.Dim("dim"))
|
|
|
fmt.Println(color.Italic("italic"))
|
|
|
@@ -44,12 +44,13 @@ fmt.Println(color.Hidden("hidden"))
|
|
|
fmt.Println(color.Strikeout("strikeout"))
|
|
|
```
|
|
|

|
|
|
+
|
|
|
+// Mix and match
|
|
|
```go
|
|
|
-// Combo
|
|
|
fmt.Println(Green("bold green with white background", B, WhtBg))
|
|
|
fmt.Println(Red("underline red", U))
|
|
|
fmt.Println(Yellow("dim yellow", D))
|
|
|
fmt.Println(Cyan("inverse cyan", In))
|
|
|
fmt.Println(Blue("bold underline dim blue", B, U, D))
|
|
|
```
|
|
|
-
|
|
|
+
|