upd readme
This commit is contained in:
parent
d92b8977b8
commit
8e14182645
23
README.md
23
README.md
|
@ -22,9 +22,19 @@ ${<target text>}(<fg>:<bg>)
|
||||||
```
|
```
|
||||||
|
|
||||||
- `<target text>` is the text that will be colorized.
|
- `<target text>` is the text that will be colorized.
|
||||||
|
|
||||||
- `<fg>` is the name of the foreground color (*c.f. [color list](https://git.xdrm.io/go/clifmt/src/master/colors.go#L15)*), or an hex color (*e.g.`#00ffaa`, `#0fa`*).
|
- `<fg>` is the name of the foreground color (*c.f. [color list](https://git.xdrm.io/go/clifmt/src/master/colors.go#L15)*), or an hex color (*e.g.`#00ffaa`, `#0fa`*).
|
||||||
|
|
||||||
- `<bg>` is the name of the background color with the same syntax as for the foreground.
|
- `<bg>` is the name of the background color with the same syntax as for the foreground.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
clifmt.Printf("normal text ${red text over black}(red:#000) normal text")
|
||||||
|
```
|
||||||
|
|
||||||
> Note that it is not recommended to nest the different coloring formats.
|
> Note that it is not recommended to nest the different coloring formats.
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,6 +50,13 @@ ${<target text>}(<fg>)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
clifmt.Printf("normal text ${red text}(red) normal text")
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
##### Background only
|
##### Background only
|
||||||
|
|
||||||
```go
|
```go
|
||||||
|
@ -51,6 +68,12 @@ ${<target text>}(:<bg>)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###### Example
|
||||||
|
|
||||||
|
```go
|
||||||
|
clifmt.Printf("normal text ${text over red}(#ff0000) normal text")
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
Loading…
Reference in New Issue