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.0.tar.gz
(15.1 kB
view hashes)
Built Distribution
VividHues-4.0.0-py3-none-any.whl
(15.0 kB
view hashes)
Close
Hashes for VividHues-4.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3af93007d2fd9ca0ab69945e151ee7832397217f8575183aee8e3a5538857a5 |
|
MD5 | ec5b057378b0b4ba1603d5a254f56cac |
|
BLAKE2b-256 | 003292f57b8cedd59b05b615bbacdb4b4e5d5e3a21e2610242849480f00a60f7 |