colort-0.7
توضیحات
Display colored text in the terminal
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | colort-0.7 |
| نام | colort |
| نسخه کتابخانه | 0.7 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | thepoy |
| ایمیل نویسنده | thepoy@163.com |
| آدرس صفحه اصلی | https://github.com/thep0y/colort |
| آدرس اینترنتی | https://pypi.org/project/colort/ |
| مجوز | MIT |
# colort
终端中的彩色显示
## 使用
### 安装
```shell
pip install colort
```
### 使用
```python
from colort import display_style as ds
src = "这是要显示的文本"
dist = ds.format_with_one_style(src, ds.foreground_color.red)
print("更改文字颜色:", dist)
dist = ds.format_with_one_style(src, ds.backgorud_color.green)
print("更改文字背景色:", dist)
dist = ds.format_with_multiple_styles(src, ds.foreground_color.red, ds.mode.underline, ds.mode.bold)
print("多种样式:", dist)
```
效果:

نحوه نصب
نصب پکیج whl colort-0.7:
pip install colort-0.7.whl
نصب پکیج tar.gz colort-0.7:
pip install colort-0.7.tar.gz