Skip to main content

VividHues: super lightweight package for coloured strings in Python!

Project description

VividHues :rainbow: :package:

VividHues

CodeFactor Latest SemVer Repo Size Total Lines

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


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 details)

Uploaded Source

Built Distribution

VividHues-4.0.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file VividHues-4.0.1.tar.gz.

File metadata

  • Download URL: VividHues-4.0.1.tar.gz
  • Upload date:
  • Size: 15.1 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

Hashes for VividHues-4.0.1.tar.gz
Algorithm Hash digest
SHA256 7361cd6a9d07a9462292c546665ae08cb1ea69930fa1813952de9c526126084c
MD5 6f52575e08d6960b48ca10a9415afbee
BLAKE2b-256 f37bb2659a0c3ad370a180310d8792fed54c0d4052d1f757b006f1e15ee31c07

See more details on using hashes here.

File details

Details for the file VividHues-4.0.1-py3-none-any.whl.

File metadata

  • Download URL: VividHues-4.0.1-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

Hashes for VividHues-4.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0cf3cb41fcdc8747f1e54bb50d5bb5e7db0e8207d16c3437e18a84bb2d832355
MD5 1d0c79f28449db4e033d683a03cbfed3
BLAKE2b-256 90f79ec9b7c2c5d3f02c6dc2f461c64a92c81859c8ded82bcb41756f57e876c2

See more details on using hashes here.

Supported by

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