Skip to content

Commit c7dc094

Browse files
committed
sytle: update readme
1 parent 3986cfd commit c7dc094

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Now, 256 colors and RGB colors have also been supported to work in Windows CMD a
2828
- 16-color output is the most commonly used and most widely supported, working on any Windows version
2929
- Since `v1.2.4` **the 256-color (8-bit), true color (24-bit) support windows CMD and PowerShell**
3030
- See [this gist](https://gist.github.com/XVilka/8346728) for information on true color support
31+
- Support converts `HEX` `HSL` value to RGB color
3132
- Generic API methods: `Print`, `Printf`, `Println`, `Sprint`, `Sprintf`
3233
- Supports HTML tag-style color rendering, such as `<green>message</>`.
3334
- In addition to using built-in tags, it also supports custom color attributes
@@ -417,14 +418,12 @@ rgb.Println("rgb color")
417418
rgb.C256().Println("256 color")
418419
```
419420

420-
**More converts functions**:
421-
422-
convert to rgb:
421+
**More functions for convert to `RGBColor`**:
423422

424423
- `func RGBFromSlice(rgb []uint8, isBg ...bool) RGBColor`
425424
- `func RGBFromString(rgb string, isBg ...bool) RGBColor`
426425
- `func HEX(hex string, isBg ...bool) RGBColor`
427-
- `func HSL(h, s, l float32, isBg ...bool) RGBColor`
426+
- `func HSL(h, s, l float64, isBg ...bool) RGBColor`
428427
- `func HSLInt(h, s, l int, isBg ...bool) RGBColor`
429428

430429
## Func refer

README.zh-CN.md

+9
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Golang下的命令行色彩使用库, 拥有丰富的色彩渲染输出,通用
2828
- 16色(4bit)是最常用和支持最广的,支持Windows `cmd.exe`
2929
-`v1.2.4`**256色(8bit),RGB色彩(24bit)均支持Windows CMD和PowerShell终端**
3030
- 请查看 [this gist](https://gist.github.com/XVilka/8346728) 了解支持RGB色彩的终端
31+
- 支持转换 `HEX` `HSL` 等为RGB色彩
3132
- 提供通用的API方法:`Print` `Printf` `Println` `Sprint` `Sprintf`
3233
- 同时支持html标签式的颜色渲染,除了使用内置标签,同时支持自定义颜色属性
3334
- 例如: `this an <green>message</>` 标签内部的文本将会渲染为绿色字体
@@ -421,6 +422,14 @@ rgb.Println("rgb color")
421422
rgb.C256().Println("256 color")
422423
```
423424

425+
**更多转换方法转换为 `RGBColor`**:
426+
427+
- `func RGBFromSlice(rgb []uint8, isBg ...bool) RGBColor`
428+
- `func RGBFromString(rgb string, isBg ...bool) RGBColor`
429+
- `func HEX(hex string, isBg ...bool) RGBColor`
430+
- `func HSL(h, s, l float64, isBg ...bool) RGBColor`
431+
- `func HSLInt(h, s, l int, isBg ...bool) RGBColor`
432+
424433
## 方法参考
425434

426435
一些有用的工具方法参考

0 commit comments

Comments
 (0)