VividHues: super lightweight package for coloured strings in Python!
Project description
VividHues :rainbow: :package:
VividHues: super lite package for colored strings in Python!
:hammer_and_wrench: Official Installation
Use this command, in your command line, to install VividHues.
pip install VividHues
:bricks: Dependency
requirements.txt (Highly Recommended!)
Append this to your Python packages requirements file.
VividHues>=2.7.9 # only has Clr codes
VividHues>=4.0.0 # has new features such as abbreviations & Clr.rainbow()
Dependabot.yml (optional)
Create this file, to add your GitHub repo as a dependent.
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
Dockerfile (optional)
If you have a Docker container. :whale2:
RUN pip install VividHues
# or
COPY requirements.txt .
RUN pip install -r requirements.txt
:toolbox: Python Example
from VividHues import Clr
# f-strings -> highly recommended for your sanity
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)
# concatenation -> if you're an odd person
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 |
:magic_wand: Magic Functions
:game_die: Clr.random()
print(Clr.random(string))
Picks a random Clr code.
:saxophone: Clr.jazzy()
print(Clr.jazzy(string))
Jazzes up your console by giving each letter of the string passed a random color!
It's a total gamble, that's guaranteed to be ugly! :)
:rainbow: Clr.rainbow()
print(Clr.rainbow(string))
Makes any string colored in a 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.1.1.tar.gz
(15.3 kB
view hashes)
Built Distribution
VividHues-4.1.1-py3-none-any.whl
(15.4 kB
view hashes)
Close
Hashes for VividHues-4.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 519f7d36f3f6279871aebf86ebabed6e68ba0b387cde4560bdf4a0cb3b221041 |
|
MD5 | d08d0828489bb4f526b11399a0f0368a |
|
BLAKE2b-256 | 1fcacaab25a8591567349825aadc91a5dfa1096b5371a2b9f20aec3e9a9d9e06 |