A package for functionality with text, escape codes, octal and hexadecimal codes, and other data.
Project description
ColorScript Package
This is a simple yet effective package to manipulate ASCII and other codes in Python. More functionality has been added in later versions: Data has been added in version 0.0.6 and above.
- ASCII escape codes
- RGB codes for functionality not found in native Python
- Data
- Characters and functionality for strings and output
This module is authored by Tariq Tayebi: 2024 Sydney, Australia, and is licensed under the MIT License
How To Use
ColorScript is divided into two sections:
- data, and
- functions
Functions allow to manipulate text, while data has codes and other important data for manipulating text.
Installation
You can install ColorScript with pip:
pip install ColorScript
or you can go to https://pypi.org/project/ColorScript and download the .whl file or tar.gz file on Linux and open it.
Note: You must have Python on your computer. You can install it at https://python.org
Testing
After you have installed it, you can import it into a Python file:
from ColorScript import functions as cf #for importing functions
from ColourScript import data as cd #for importing data
If you want to import both, type:
from ColorScript import functions,data as cs
After the module has been imported, you can use it, for example:
cs.text.AliceBlue("Hello World") #function
x = cs.ANSI.codes.octal.COLOURS["GREEN"] #data
Note that you have to explicitly type the colour you want the text to be, otherwise it will stay the same. For example if you type AliceBlue, all the text outputted in the future will be AliceBlue unless outputted as plain.
For a complete documentation on how to use this module, go to: https://colourscript-documentation.readthedocs.io/en/latest/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file colorscript-2024.2.3.tar.gz.
File metadata
- Download URL: colorscript-2024.2.3.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f1df47cfc6e1cb9a0641a430f0060e83bc5793bc9365780b4afb70ace95af53
|
|
| MD5 |
a763b4909e59169b07e1b6297816c8d8
|
|
| BLAKE2b-256 |
21ed2f1d0f804331aa76921e29c149d0faf68b19602cb74176885a5a3031000a
|
File details
Details for the file ColorScript-2024.2.3-py3-none-any.whl.
File metadata
- Download URL: ColorScript-2024.2.3-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d23ec88b3bdeb58c55812fa6808ac8869d81a98062e24d4d9414771fac178469
|
|
| MD5 |
4bcf6e04e7b7f38b0b4b6839bafe893c
|
|
| BLAKE2b-256 |
2c15c1b256a70d3544e31d580307da6f819d36c1d09925c684c71c14dc3d7e8d
|