Skip to main content

No project description provided

Project description

Coloform

Similar to colorama by Jonathan Hartley this project aims to provide a simple interface for coloring terminal output, contrary to colorama it doesn't try to provide support for Windows. If you need Windows support, or run this on something other than a mainstream terminal emulator, this is probably not for you.

Concept

Usage is very similar to colorama, you have objects for foreground, background, styles and cursor. These are prefixed with Rich, to differentiate them from the colorama objects (if for some reason you have to, like me, have both packages available).

Coloramas Cursor is unchanged and available for convenience.

from coloform import Fore, Back, Style

msg = (
    f"Look ma: {Style.UNDERLINED}more{Style.RESET_UNDERLINED} {Style.ITALICS}styles{Style.RESET_ITALICS}, "
    f"than we {Style.BOLD}ever{Style.RESET_ALL} "
    f"{Style.STRIKE_OUT}wanted{Style.RESET_STRIKE_OUT} "
    f"{Style.BLINK}needed{Style.RESET_BLINK}!\n"
    f"Also, {Fore.HEX_1234FF}HEX{Fore.RESET} and {Fore.RGB_0_255_255}RGB{Fore.RESET} "
    f"colors for {Style.DOUBLE_UNDERLINED}fore- and {Back.RGB_255_0_255}background{Style.RESET_ALL}.\n"
    f"Common {Fore.RED}aliases {Back.GREEN}just{Fore.RESET} work!{Style.RESET_ALL}"
)

print(msg)

Demo

Features loads of useless aliases (Style.UNDERLINE == Style.UNDERLINED etc.).

Why

Because it's not the 90s anymore, and screw compatibility. Also, I like to see bad UI design in terminals, and this is my contribution towards that.

Thanks

Thanks to Sascha Peilicke for his documentation work around ANSI escape codes.

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

coloform-0.0.1a7.tar.gz (110.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coloform-0.0.1a7-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file coloform-0.0.1a7.tar.gz.

File metadata

  • Download URL: coloform-0.0.1a7.tar.gz
  • Upload date:
  • Size: 110.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for coloform-0.0.1a7.tar.gz
Algorithm Hash digest
SHA256 903abb90402509268caca127b246f26637c4ababb2bca9f52408447a576fc53b
MD5 fed75e4146fde58798c1bbe5e0893e36
BLAKE2b-256 fae723b9e000b6ba95feb232279202a1bd2a0460286a9256605a2a4661b157db

See more details on using hashes here.

Provenance

The following attestation bundles were made for coloform-0.0.1a7.tar.gz:

Publisher: release.yaml on FynnFreyer/coloform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coloform-0.0.1a7-py3-none-any.whl.

File metadata

  • Download URL: coloform-0.0.1a7-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for coloform-0.0.1a7-py3-none-any.whl
Algorithm Hash digest
SHA256 029d8d36ff115a6b36c0980ad5b0c1ba949a72267507bfa5ef1f0f26849dc8a0
MD5 ec0e05a3269d37abe5b49163da635431
BLAKE2b-256 768301da275d1c45ae2b5d7895455b9454fbed57dd7388db0be338ef03617600

See more details on using hashes here.

Provenance

The following attestation bundles were made for coloform-0.0.1a7-py3-none-any.whl:

Publisher: release.yaml on FynnFreyer/coloform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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