Skip to main content

library to convert Xonotic color strings to various other formats

Project description

# python-dpcolors

[![Build Status](https://travis-ci.org/nsavch/python-dpcolors.svg?branch=master)](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())
```


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-dpcolors-0.1.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

python_dpcolors-0.1.1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file python-dpcolors-0.1.1.tar.gz.

File metadata

File hashes

Hashes for python-dpcolors-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c4ec53f1879a2211a2fe9478a2a49f3c7af09d2d5426ca7b689478ac2778e525
MD5 847e8faa14db22d78cc38d7b61f5c838
BLAKE2b-256 6b44ed3241e12f2b6e73b9bece23ada698e35eb97fd72b0b73330b45bf4ff2bf

See more details on using hashes here.

File details

Details for the file python_dpcolors-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_dpcolors-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 42f613f8089403e19c2f704dd00ea1cb942691e3ba32beb99e21480df2af96bd
MD5 ed860fbf0aac11bdbe5fb0f0b30205b6
BLAKE2b-256 ef0e24525ec8612a65e2f12596fe17ef35956cea231c3283de43f0af3b4463a7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page