Skip to content

Commit 8a083f3

Browse files
committed
Add rang reset attributes to docs
1 parent 044a265 commit 8a083f3

File tree

2 files changed

+38
-31
lines changed

2 files changed

+38
-31
lines changed

README.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,21 @@ Supported attributes with their compatiblity are listed below -
7979

8080
**Text Styles**:
8181

82-
| Code | Linux/Win | Old Win
82+
| Code | Linux/Win/Others | Old Win
8383
| ---- | --------- | ------ |
84-
| `rang::style::reset` | yes | yes |
85-
| `rang::style::bold` | yes | yes |
86-
| `rang::style::dim` | yes | no |
87-
| `rang::style::italic` | yes | yes |
88-
| `rang::style::underline` | yes | no |
89-
| `rang::style::blink` | no | no |
90-
| `rang::style::rblink` | no | no |
91-
| `rang::style::reversed` | yes | no |
92-
| `rang::style::conceal` | maybe | no |
93-
| `rang::style::crossed` | yes | no |
84+
| `rang::style::bold` | yes | yes |
85+
| `rang::style::dim` | yes | no |
86+
| `rang::style::italic` | yes | no |
87+
| `rang::style::underline` | yes | maybe |
88+
| `rang::style::blink` | no | maybe |
89+
| `rang::style::rblink` | no | no |
90+
| `rang::style::reversed` | yes | yes |
91+
| `rang::style::conceal` | maybe | yes |
92+
| `rang::style::crossed` | yes | no |
9493

9594
**Text Color**:
9695

97-
| Code | Linux/Win | Old Win
96+
| Code | Linux/Win/Others | Old Win
9897
| ---- | --------- | ------ |
9998
| `rang::fg::black` | yes | yes |
10099
| `rang::fg::red` | yes | yes |
@@ -107,7 +106,7 @@ Supported attributes with their compatiblity are listed below -
107106

108107
**Background Color**:
109108

110-
| Code | Linux/Win | Old Win
109+
| Code | Linux/Win/Others | Old Win
111110
| ---- | --------- | ------ |
112111
| `rang::bg::black` | yes | yes |
113112
| `rang::bg::red` | yes | yes |
@@ -120,7 +119,7 @@ Supported attributes with their compatiblity are listed below -
120119

121120
**Bright Foreground Color**:
122121

123-
| Code | Linux/Win | Old Win
122+
| Code | Linux/Win/Others | Old Win
124123
| ---- | --------- | ------ |
125124
| `rang::fgB::black` | yes | yes |
126125
| `rang::fgB::red` | yes | yes |
@@ -133,7 +132,7 @@ Supported attributes with their compatiblity are listed below -
133132

134133
**Bright Background Color**:
135134

136-
| Code | Linux/Win | Old Win
135+
| Code | Linux/Win/Others | Old Win
137136
| ---- | --------- | ------ |
138137
| `rang::bgB::black` | yes | yes |
139138
| `rang::bgB::red` | yes | yes |
@@ -144,6 +143,14 @@ Supported attributes with their compatiblity are listed below -
144143
| `rang::bgB::cyan` | yes | yes |
145144
| `rang::bgB::gray` | yes | yes |
146145

146+
**Reset Styles/Colors**:
147+
148+
| Code | Linux/Win/Others | Old Win
149+
| ---- | --------- | ------ |
150+
| `rang::style::reset` | yes | yes |
151+
| `rang::fg::reset` | yes | yes |
152+
| `rang::bg::reset` | yes | yes |
153+
147154
-----
148155
## My terminal is not detected/gets garbage output!
149156

test/colorTest.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,24 @@ void test_colors(ostream &os, const winTerm opt)
4747
os << fg::gray << " Grey " << fg::reset << endl;
4848

4949
printHeading("Bright Background Test:");
50-
os << bgB::green << " Green ";
51-
os << bgB::red << " Red ";
52-
os << bgB::black << " Black ";
53-
os << bgB::yellow << " Yellow ";
54-
os << bgB::blue << " Blue ";
55-
os << bgB::magenta << " Magenta ";
56-
os << bgB::cyan << " Cyan ";
57-
os << bgB::gray << " Grey " << style::reset << endl;
50+
os << bgB::green << " Green " << bg::reset;
51+
os << bgB::red << " Red " << bg::reset;
52+
os << bgB::black << " Black " << bg::reset;
53+
os << bgB::yellow << " Yellow " << bg::reset;
54+
os << bgB::blue << " Blue " << bg::reset;
55+
os << bgB::magenta << " Magenta " << bg::reset;
56+
os << bgB::cyan << " Cyan " << bg::reset;
57+
os << bgB::gray << " Grey " << bg::reset << endl;
5858

5959
printHeading("Bright Foreground Test:");
60-
os << fgB::green << " Green ";
61-
os << fgB::red << " Red ";
62-
os << fgB::black << " Black ";
63-
os << fgB::yellow << " Yellow ";
64-
os << fgB::blue << " Blue ";
65-
os << fgB::magenta << " Magenta ";
66-
os << fgB::cyan << " Cyan ";
67-
os << fgB::gray << " Grey " << style::reset << endl;
60+
os << fgB::green << " Green " << fg::reset;
61+
os << fgB::red << " Red " << fg::reset;
62+
os << fgB::black << " Black " << fg::reset;
63+
os << fgB::yellow << " Yellow " << fg::reset;
64+
os << fgB::blue << " Blue " << fg::reset;
65+
os << fgB::magenta << " Magenta " << fg::reset;
66+
os << fgB::cyan << " Cyan " << fg::reset;
67+
os << fgB::gray << " Grey " << fg::reset << endl;
6868
}
6969

7070
void enumerateWinTerms()

0 commit comments

Comments
 (0)