将 Xonotic 颜色字符串转换为各种其他格式的库
项目描述
# python-dpcolors
[](https://travis-ci.org/nsavch/python-dpcolors )
用于将 DarkPlaces 颜色字符串转换为各种其他格式的 Python 库
支持以下转换
* dp -> irc
* dp -> ansi 8 bit
* dp -> ansi 24 bit
* irc -> dp
* irc -> ansi 8 bit
* irc - > ansi 24 bit
# 安装
```bash
pip install python-dpcolors
```
# 使用示例
```python
from dpcolors import ColorString
cs = ColorString.from_dp('^3hello')
print(cs.to_irc())
print( cs.to_ansi_8bit())
打印(cs.to_ansi_24bit())
cs = ColorString.from_irc('\x0305hello')
打印(cs.to_dp())
```
[](https://travis-ci.org/nsavch/python-dpcolors )
用于将 DarkPlaces 颜色字符串转换为各种其他格式的 Python 库
支持以下转换
* dp -> irc
* dp -> ansi 8 bit
* dp -> ansi 24 bit
* irc -> dp
* irc -> ansi 8 bit
* irc - > ansi 24 bit
# 安装
```bash
pip install python-dpcolors
```
# 使用示例
```python
from dpcolors import ColorString
cs = ColorString.from_dp('^3hello')
print(cs.to_irc())
print( cs.to_ansi_8bit())
打印(cs.to_ansi_24bit())
cs = ColorString.from_irc('\x0305hello')
打印(cs.to_dp())
```
项目详情
关
python_dpcolors -0.1.1-py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 42f613f8089403e19c2f704dd00ea1cb942691e3ba32beb99e21480df2af96bd |
|
| MD5 | ed860fbf0aac11bdbe5fb0f0b30205b6 |
|
| 布莱克2-256 | ef0e24525ec8612a65e2f12596fe17ef35956cea231c3283de43f0af3b4463a7 |