Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jul 10, 2020
1 parent 23b568f commit 591f656
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -313,11 +313,11 @@ Run demo: `go run ./_examples/color256.go`

## Use RGB color

> RGB colors support Windows CMD, PowerShell environment after `v1.2.4`
> RGB colors support Windows `CMD`, `PowerShell` environment after `v1.2.4`
**Preview:**

Run demo: `Run demo: go run ./_examples/color_rgb.go`
> Run demo: `Run demo: go run ./_examples/color_rgb.go`
![color-rgb](_examples/images/color-rgb.png)

Expand Down
8 changes: 7 additions & 1 deletion README.zh-CN.md
Expand Up @@ -288,7 +288,13 @@ s.Printf("format %s", "message")

## RGB色彩使用

> RGB色彩在 `v1.2.4` 后支持Windows CMD,PowerShell 环境
> RGB色彩在 `v1.2.4` 后支持 Windows `CMD`, `PowerShell` 环境
**效果预览:**

> 运行 demo: `Run demo: go run ./_examples/color_rgb.go`
![color-rgb](_examples/images/color-rgb.png)

代码示例:

Expand Down
4 changes: 2 additions & 2 deletions _examples/color_rgb.go
Expand Up @@ -19,8 +19,8 @@ func main() {
index := 1
for _, txt := range chinaColors {
nodes := strings.Split(txt, " ")
color.HEXStyle("ccc", nodes[1]).Printf("%-16s", nodes[1])
if index%7 == 0 {
color.HEXStyle("ccc", nodes[1]).Printf("%-12s", nodes[1])
if index%9 == 0 {
fmt.Println()
}

Expand Down
Binary file modified _examples/images/color-rgb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 591f656

Please sign in to comment.