mirror of
https://github.com/RGBCube/color.v
synced 2025-07-31 09:57:47 +00:00
Initial commit
This commit is contained in:
parent
0cb83fd1a3
commit
992c9da2e9
10 changed files with 277 additions and 0 deletions
28
README.md
Normal file
28
README.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# v-color
|
||||
|
||||
An easier way to print color to the terminal
|
||||
|
||||
# Example
|
||||
|
||||
## Basic
|
||||
|
||||
```v
|
||||
import color
|
||||
|
||||
println(color.red.apply('Hello World'))
|
||||
println(color.bold.apply('Hello World'))
|
||||
```
|
||||
|
||||
## Advanced
|
||||
|
||||
```v
|
||||
import color
|
||||
|
||||
p := color.PaintBrush{
|
||||
fg: color.rgb(0, 0, 0)!,
|
||||
bg: color.hex(0xffffff)!,
|
||||
styles: [color.bold, color.underline, color.italic]
|
||||
}
|
||||
|
||||
print(p.apply('Hello World'))
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue