Skip to content

Commit b2cc3fe

Browse files
authored
Update README.md
1 parent 8191946 commit b2cc3fe

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
# Let's make a colorful world!
2+
# What's this?
3+
We often use ASCII color like `\033[0m` when developing. But it's hard to remember them.
4+
When writing shell, we can use `CLEAR='\033[0m'`, but for C, I have to write the implementation myself.
5+
So I use `{color}` for text color and `[color]` for background color, and make them map to print the color, that's this project. Simple, stupid, maybe a bit useless.
6+
I use it to format output in my program.
7+
# About the binary:
8+
You can just use cprintf as a modified version of "echo -ne" with the color format support. If the color in `{}` or `[]` is not recognized, it will just output the original string.
29
# Note:
310
`cprintf()` and `cfprintf()` is a macro and will not return anything.
411
# Cprintf in production:
@@ -35,4 +42,13 @@ int main()
3542
cprintf("[245;170;185] [clear]\n");
3643
cprintf("[91;207;250] [clear]\n");
3744
}
38-
```
45+
```
46+
<p align="center">何もない僕たちに</p>
47+
<p align="center">なぜ夢を見させたか</p>
48+
<p align="center">終わりある人生に</p>
49+
<p align="center">なぜ希望を持たせたか</p>
50+
<p align="center">なぜこの手をすり抜ける</p>
51+
<p align="center">ものばかり与えたか</p>
52+
<p align="center">それでもなおしがみつく</p>
53+
<p align="center">僕らは醜いかい</p>
54+
<p align="center">それとも、きれいかい</p>

0 commit comments

Comments
 (0)