VividHues: super lightweight package for coloured strings in Python!
Project description
VividHues :rainbow: :package:
VividHues: super lightweight package for coloured strings in Python!
:hammer_and_wrench: Official Installation
Use this command to install VividHues.
pip install VividHues
:bricks: Dependency
requirements.txt
VividHues>=2.7.9
Dependabot.yml
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
Dockerfile
RUN pip install VividHues
# or
COPY requirements.txt .
RUN pip install -r requirements.txt
:toolbox: Python Example
from VividHues import Clr
# f-strings - recommended
print(f"{Clr.BO + Clr.UNDERLINE + Clr.LIME}I love VividHues!{Clr.RS}")
any_string = f"{Clr.BO + Clr.CYAN}Hello {Clr.GREEN}earthlings!{Clr.RS}"
print(any_string)
# alternatives
name = input(Clr.PINK + "What's your name?\n\t--> " + Clr.RS + Clr.UL)
print(Clr.RS + Clr.BO + "Hello,", Clr.RED + Clr.UL + name)
:rainbow: Available colours:
Colour Codes | Formatting Codes | Formatting Code Abbreviations |
---|---|---|
Clr.RED | Clr.UNDERLINE | Clr.UL |
Clr.ORANGE | Clr.BOLD | Clr.BO |
Clr.YELLOW | Clr.RESET | Clr.RS |
Clr.LIME | ||
Clr.GREEN | ||
Clr.BLUE | ||
Clr.CYAN | ||
Clr.PURPLE | ||
Clr.PINK | ||
Clr.BLACK | ||
Clr.WHITE |
Functions
Clr.random(string_to_color : str)
Prints on the standard output the string string_to_color colored with 1 color.
Clr.jazzy(string_to_color : str)
Prints on the standard output the string string_to_color, with each letter colored with 1 random color.
Clr.rainbow(string_to_color : str)
Prints on the standard output the string string_to_color, with the letter coloration following the rainbow pattern.
Kenny Oliver ©2021
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
File details
Details for the file VividHues-4.1.0.tar.gz
.
File metadata
- Download URL: VividHues-4.1.0.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f58edfa839e4f2c92b88a24cba84f39a16ea36d782b4970af4c72b84f9fd0fa |
|
MD5 | 0fc6427ebbd037a72baca3d8bc0dba1e |
|
BLAKE2b-256 | ef86f6d196e9d726691dfb0cdd6766d9b30121204e5136b6afe982c44a586411 |
File details
Details for the file VividHues-4.1.0-py3-none-any.whl
.
File metadata
- Download URL: VividHues-4.1.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2097c0d9fd6730d83e57b66041bd8d1f214d53576f26a503ba92938a60b1de60 |
|
MD5 | 9b8ed3ef56ad05f04f512c581e0366fe |
|
BLAKE2b-256 | e990d841c2917b946008f1d6ae99ca651636590d6c7e6f229955219dbdbf5f68 |