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
VividHues-4.0.1.tar.gz
(15.1 kB
view hashes)
Built Distribution
VividHues-4.0.1-py3-none-any.whl
(15.1 kB
view hashes)
Close
Hashes for VividHues-4.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cf3cb41fcdc8747f1e54bb50d5bb5e7db0e8207d16c3437e18a84bb2d832355 |
|
MD5 | 1d0c79f28449db4e033d683a03cbfed3 |
|
BLAKE2b-256 | 90f79ec9b7c2c5d3f02c6dc2f461c64a92c81859c8ded82bcb41756f57e876c2 |