# ColorfulConsoleIO **Repository Path**: jjzhang166/ColorfulConsoleIO ## Basic Information - **Project Name**: ColorfulConsoleIO - **Description**: C++使用的在命令行终端输出各种颜色字符的库 - **Primary Language**: C++ - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2021-05-31 - **Last Updated**: 2021-05-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ColorfulConsoleIO #### 介绍 C++使用的在命令行终端输出各种颜色字符的库 八种字体颜色和对应的高亮颜色共十六种 八种字体背景颜色 #### 软件架构 软件架构说明 #### 安装教程 1. xxxx 2. xxxx 3. xxxx #### 使用说明 1. 将ColorfulConsoleIO.h头文件下载到本地,包含进项目中; 2. 在Windows环境下使用预处理#define OS_TYPE_WINDOWS_CC Linux环境://#define OS_TYPE_WINDOWS_CC 3. 使用标准库的输出对象std::wcout来输出 std::wcout<<#字符颜色配置#; example std::wcout << ConsoleColor::Green<< L"1abc" << endl; ### Guide #define OS_TYPE_WINDOWS_CC //or //#define OS_TYPE_WINDOWS_CC using std::endl; int main() { std::cout << "what color it is ?" << endl; //std::cout << ConsoleColor::Green << "so what color it is?" << endl; std::wcout << ConsoleColor::Green<< L"1abc" << endl; std::wcout << ConsoleColor::Red << L"2red red is fire" << endl; std::wcout << ConsoleColor::Blue << L"3blue blue love is blue" << endl; std::wcout << ConsoleColor::White << L"4blue blue love is blue" << endl; std::wcout << ConsoleColor::Black << L"5blue blue love is blue" << endl; std::wcout << ConsoleColor::Purple << L"6blue blue love is blue" << endl; std::wcout << ConsoleColor::Yellow << L"7blue blue love is blue" << endl; std::wcout << ConsoleColor::Cyan << L"8blue blue love is blue" << endl; std::wcout << ConsoleColor::GreenIntensity << L"1abc" << endl; std::wcout << ConsoleColor::RedIntensity << L"2red red is fire" << endl; std::wcout << ConsoleColor::BlueIntensity << L"3blue blue love is blue" << endl; std::wcout << ConsoleColor::WhiteIntensity << L"4blue blue love is blue" << endl; std::wcout << ConsoleColor::BlackIntensity << L"5blue blue love is blue" << endl; std::wcout << ConsoleColor::PurpleIntensity << L"6blue blue love is blue" << endl; std::wcout << ConsoleColor::YellowIntensity << L"7blue blue love is blue" << endl; std::wcout << ConsoleColor::CyanIntensity << L"8blue blue love is blue" << endl; std::wcout << ConsoleBackgroundColor::Green << L"1abc" << endl; std::wcout << ConsoleBackgroundColor::Red << L"2red red is fire" << endl; std::wcout << ConsoleBackgroundColor::Blue << L"3blue blue love is blue" << endl; std::wcout << ConsoleBackgroundColor::Black << L"4abc" << endl; std::wcout << ConsoleBackgroundColor::White << L"5red red is fire" << endl; std::wcout << ConsoleBackgroundColor::Purple << L"6blue blue love is blue" << endl; std::wcout << ConsoleBackgroundColor::Yellow << L"7blue blue love is blue" << endl; std::wcout << ConsoleBackgroundColor::Cyan << L"8blue blue love is blue" << endl; std::wcout << ConsoleBackgroundColor::None; std::wcout << ConsoleColor::None; _wsystem(L"pause"); return 0; } ![输入图片说明](https://images.gitee.com/uploads/images/2019/0320/163156_b6fab6c5_1205254.png "屏幕截图.png") #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 码云特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)