You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Friendly to [CLI arguments](#cli-arguments): `--color` & `--no-color`
49
49
- Support for [common envs](#force_color-no_color-clicolor_force-and-clicolor): [`FORCE_COLOR`](https://force-color.org/), [`NO_COLOR`](https://no-color.org/), [`CLICOLOR_FORCE` & `CLICOLOR`](https://bixense.com/clicolors/)
50
+
- Curious how **coloredstrings** compares to other libraries? See [Migrating from other libraries](#migrating-from-other-libraries)
50
51
51
52
---
52
53
@@ -348,6 +349,89 @@ print(purple("Neither is `purple`."))
348
349
349
350
---
350
351
352
+
## Migrating from other libraries
353
+
354
+
If you’ve used other Python color or formatting libraries before, `coloredstrings` will feel familiar but more robust and consistent. Below is a quick comparison of how it differs from popular alternatives:
355
+
356
+
### **colorama**
357
+
-**colorama** provides low-level ANSI control and Windows compatibility but lacks a fluent API.
358
+
-`coloredstrings` supports more colors, styles and requires no use of ANSI codes directly.
359
+
- Example:
360
+
```python
361
+
# colorama
362
+
from colorama import Fore, Style
363
+
print(Fore.RED+'Error'+ Style.RESET_ALL)
364
+
365
+
# coloredstrings
366
+
import coloredstrings as cs
367
+
print(cs.red('Error'))
368
+
```
369
+
370
+
### **termcolor**
371
+
-**termcolor** focuses on basic named colors but doesn’t support chaining or RGB.
372
+
-`coloredstrings` supports truecolor, background colors, attributes, and chaining.
0 commit comments