Skip to content

Commit

Permalink
Add rang reset attributes to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
agauniyal committed Jan 27, 2018
1 parent 044a265 commit 8a083f3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 31 deletions.
37 changes: 22 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,21 @@ Supported attributes with their compatiblity are listed below -

**Text Styles**:

| Code | Linux/Win | Old Win
| Code | Linux/Win/Others | Old Win
| ---- | --------- | ------ |
| `rang::style::reset` | yes | yes |
| `rang::style::bold` | yes | yes |
| `rang::style::dim` | yes | no |
| `rang::style::italic` | yes | yes |
| `rang::style::underline` | yes | no |
| `rang::style::blink` | no | no |
| `rang::style::rblink` | no | no |
| `rang::style::reversed` | yes | no |
| `rang::style::conceal` | maybe | no |
| `rang::style::crossed` | yes | no |
| `rang::style::bold` | yes | yes |
| `rang::style::dim` | yes | no |
| `rang::style::italic` | yes | no |
| `rang::style::underline` | yes | maybe |
| `rang::style::blink` | no | maybe |
| `rang::style::rblink` | no | no |
| `rang::style::reversed` | yes | yes |
| `rang::style::conceal` | maybe | yes |
| `rang::style::crossed` | yes | no |

**Text Color**:

| Code | Linux/Win | Old Win
| Code | Linux/Win/Others | Old Win
| ---- | --------- | ------ |
| `rang::fg::black` | yes | yes |
| `rang::fg::red` | yes | yes |
Expand All @@ -107,7 +106,7 @@ Supported attributes with their compatiblity are listed below -

**Background Color**:

| Code | Linux/Win | Old Win
| Code | Linux/Win/Others | Old Win
| ---- | --------- | ------ |
| `rang::bg::black` | yes | yes |
| `rang::bg::red` | yes | yes |
Expand All @@ -120,7 +119,7 @@ Supported attributes with their compatiblity are listed below -

**Bright Foreground Color**:

| Code | Linux/Win | Old Win
| Code | Linux/Win/Others | Old Win
| ---- | --------- | ------ |
| `rang::fgB::black` | yes | yes |
| `rang::fgB::red` | yes | yes |
Expand All @@ -133,7 +132,7 @@ Supported attributes with their compatiblity are listed below -

**Bright Background Color**:

| Code | Linux/Win | Old Win
| Code | Linux/Win/Others | Old Win
| ---- | --------- | ------ |
| `rang::bgB::black` | yes | yes |
| `rang::bgB::red` | yes | yes |
Expand All @@ -144,6 +143,14 @@ Supported attributes with their compatiblity are listed below -
| `rang::bgB::cyan` | yes | yes |
| `rang::bgB::gray` | yes | yes |

**Reset Styles/Colors**:

| Code | Linux/Win/Others | Old Win
| ---- | --------- | ------ |
| `rang::style::reset` | yes | yes |
| `rang::fg::reset` | yes | yes |
| `rang::bg::reset` | yes | yes |

-----
## My terminal is not detected/gets garbage output!

Expand Down
32 changes: 16 additions & 16 deletions test/colorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,24 @@ void test_colors(ostream &os, const winTerm opt)
os << fg::gray << " Grey " << fg::reset << endl;

printHeading("Bright Background Test:");
os << bgB::green << " Green ";
os << bgB::red << " Red ";
os << bgB::black << " Black ";
os << bgB::yellow << " Yellow ";
os << bgB::blue << " Blue ";
os << bgB::magenta << " Magenta ";
os << bgB::cyan << " Cyan ";
os << bgB::gray << " Grey " << style::reset << endl;
os << bgB::green << " Green " << bg::reset;
os << bgB::red << " Red " << bg::reset;
os << bgB::black << " Black " << bg::reset;
os << bgB::yellow << " Yellow " << bg::reset;
os << bgB::blue << " Blue " << bg::reset;
os << bgB::magenta << " Magenta " << bg::reset;
os << bgB::cyan << " Cyan " << bg::reset;
os << bgB::gray << " Grey " << bg::reset << endl;

printHeading("Bright Foreground Test:");
os << fgB::green << " Green ";
os << fgB::red << " Red ";
os << fgB::black << " Black ";
os << fgB::yellow << " Yellow ";
os << fgB::blue << " Blue ";
os << fgB::magenta << " Magenta ";
os << fgB::cyan << " Cyan ";
os << fgB::gray << " Grey " << style::reset << endl;
os << fgB::green << " Green " << fg::reset;
os << fgB::red << " Red " << fg::reset;
os << fgB::black << " Black " << fg::reset;
os << fgB::yellow << " Yellow " << fg::reset;
os << fgB::blue << " Blue " << fg::reset;
os << fgB::magenta << " Magenta " << fg::reset;
os << fgB::cyan << " Cyan " << fg::reset;
os << fgB::gray << " Grey " << fg::reset << endl;
}

void enumerateWinTerms()
Expand Down

0 comments on commit 8a083f3

Please sign in to comment.