An open API service indexing awesome lists of open source software.

https://github.com/abschill/pstyle

header-only c library for styling print statements :tada:
https://github.com/abschill/pstyle

c colors macros printf stdout

Last synced: 10 months ago
JSON representation

header-only c library for styling print statements :tada:

Awesome Lists containing this project

README

          

# pstyle

simple c library for formatting print statements

```cmd
git submodule add git@github.com:abschill/pstyle.git pstyle
```

```c
#include "pstyle/color.h"

int main() {
printf("%s%s", red.text, "Hello in Red")
}

```

## Colors Available

- `red`
- `green`
- `yellow`
- `blue`
- `purple`
- `cyan`
- `black`

## Color Constants

- `.text` - apply color to text
- `.bg` - apply color to bg
- `.bold` - bolden the text with the given color
- `.underline` - underline the text with the given color
- `.hi` - text with high intensity
- `.bhi` - bold text with high intensity

## Helper Macros

- `COLOR_RESET` - resets the terminal styles inline