Skip to main content

A package for functionality with text, escape codes, octal and hexadecimal codes, and other data.

Project description

https://raw.githubusercontent.com/TariqTheCoder/ColourScript-Documentation/refs/heads/main/Screenshot%202024-11-22%20191301.png

Code style: black PyPI - Python Version PyPI Licence Docs Status

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/ColourScript 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 cs #for importing functions

from ColourScript import data as cd #for importing data

If you want to import both, type:

from ColorScript import * as cs

or

from ColourScript 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


Download files

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

Source Distribution

colorscript-2024.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ColorScript-2024.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file colorscript-2024.2.tar.gz.

File metadata

  • Download URL: colorscript-2024.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.8

File hashes

Hashes for colorscript-2024.2.tar.gz
Algorithm Hash digest
SHA256 7f829baedefc3b057df1849be488a14128c4b7c0ed05d5df1cb84c5360a3e32c
MD5 f2aaac3c84dfda027f9b2ff6cdccb3a6
BLAKE2b-256 cce92d280cbd741d3a817b5ec2c496a9ccb8e137935db9dd89bab24cc77815f3

See more details on using hashes here.

File details

Details for the file ColorScript-2024.2-py3-none-any.whl.

File metadata

  • Download URL: ColorScript-2024.2-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

Hashes for ColorScript-2024.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e2fdf2e0b3eb15605a2dbf77f92ced0117ee274a5389ca805d1463c83b586a60
MD5 a6ae136e35905fe98794dc35a2992fc7
BLAKE2b-256 8ae412aa3e49b609dbbed0a1138afdc49d8258d33ae76b3f6ea3868d8752e993

See more details on using hashes here.

Supported by

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