From 5a9a7d44b0cd0e05567b98d3b906ffd28d7bc1ab Mon Sep 17 00:00:00 2001 From: wolegca <2738076308@qq.com> Date: Sun, 29 Dec 2019 16:11:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=AC=AC=E4=B8=89=E7=AF=87?= =?UTF-8?q?=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content.json | 5 +++++ content/html/2019-12-29$1.html | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 content/html/2019-12-29$1.html diff --git a/content.json b/content.json index 151dab5..09ee375 100644 --- a/content.json +++ b/content.json @@ -8,5 +8,10 @@ "title": "笔记2:让新版Chrome支持本地跨域请求调试", "date": "2019-09-20$1", "hasCode": false + }, + { + "title":"笔记3:console下文字颜色的实现", + "date":"2019-12-29$1", + "hasCode": false } ] \ No newline at end of file diff --git a/content/html/2019-12-29$1.html b/content/html/2019-12-29$1.html new file mode 100644 index 0000000..387adda --- /dev/null +++ b/content/html/2019-12-29$1.html @@ -0,0 +1,12 @@ +console下文字颜色的实现 +
程序在console下输出的文字一般默认是白色或者是其他用户自定义的统一颜色
+ +改变文字的颜色一般要用到颜色转义字符\e或者是\033,如
+
+
+ typedef enum colors
+ {
+ "\e[0;31;32m%s\e[0m"
+ } colors;
+
+
\ No newline at end of file