# python-dpcolors
[](https://travis-ci.org/nsavch/python-dpcolors)
Python library for converting DarkPlaces color strings to various other formats
Supports the following conversions
* dp -> irc
* dp -> ansi 8 bit
* dp -> ansi 24 bit
* irc -> dp
* irc -> ansi 8 bit
* irc -> ansi 24 bit
# Installation
```bash
pip install python-dpcolors
```
# Example usage
```python
from dpcolors import ColorString
cs = ColorString.from_dp('^3hello')
print(cs.to_irc())
print(cs.to_ansi_8bit())
print(cs.to_ansi_24bit())
cs = ColorString.from_irc('\x0305hello')
print(cs.to_dp())
```
[](https://travis-ci.org/nsavch/python-dpcolors)
Python library for converting DarkPlaces color strings to various other formats
Supports the following conversions
* dp -> irc
* dp -> ansi 8 bit
* dp -> ansi 24 bit
* irc -> dp
* irc -> ansi 8 bit
* irc -> ansi 24 bit
# Installation
```bash
pip install python-dpcolors
```
# Example usage
```python
from dpcolors import ColorString
cs = ColorString.from_dp('^3hello')
print(cs.to_irc())
print(cs.to_ansi_8bit())
print(cs.to_ansi_24bit())
cs = ColorString.from_irc('\x0305hello')
print(cs.to_dp())
```
Release files for python-dpcolors 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python-dpcolors-0.1.1.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_dpcolors-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:16.5 kB
Release files / python-dpcolors-0.1.1.tar.gz
| Download URL | python-dpcolors-0.1.1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4ec53f1879a2211a2fe9478a2a49f3c7af09d2d5426ca7b689478ac2778e525
|
|
BLAKE2b-256 checksum How to use checksums |
6b44ed3241e12f2b6e73b9bece23ada698e35eb97fd72b0b73330b45bf4ff2bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / python_dpcolors-0.1.1-py3-none-any.whl
| Download URL | python_dpcolors-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42f613f8089403e19c2f704dd00ea1cb942691e3ba32beb99e21480df2af96bd
|
|
BLAKE2b-256 checksum How to use checksums |
ef0e24525ec8612a65e2f12596fe17ef35956cea231c3283de43f0af3b4463a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |