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.0.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

python_dpcolors-0.1.0-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

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