Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brandonki/color-print-cpp
lightweight cross-platform logging with colors!
https://github.com/brandonki/color-print-cpp
Last synced: about 2 months ago
JSON representation
lightweight cross-platform logging with colors!
- Host: GitHub
- URL: https://github.com/brandonki/color-print-cpp
- Owner: BrandonKi
- License: mit
- Created: 2020-10-14T14:00:43.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-23T01:32:48.000Z (9 months ago)
- Last Synced: 2024-04-23T03:42:46.242Z (9 months ago)
- Language: C++
- Size: 67.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# color-print-cpp
cross-platform single header library to print colors to the console!define CPRINT_PREFIX before including pLog.h to add a CP_ prefix to constants such as RED, BLUE, etc.
```cpp
#include "pLog.h"using namespace pLog;
int main(int argc, char* argv[]){
if(!pLog_err)
println("Colors not supported :(");
println(12.5, RED, BOLD);
println(16, UNDERLINE, BOLD, RED);
println(fmt("I'm blue", BLUE) + " " + fmt("I'm cyan and bold", BRIGHT_CYAN, BOLD));
println("r,g,b values are also supported! They can be bold, underlined, etc.", rgb(255, 100, 0), BOLD);
println("to set background color pass a color to the bg() function.", bg(RED));
print("rgb can also be passed to bg", bg(rgb(255, 100, 0)));
}
```