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.1a8.tar.gz (110.3 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.1a8-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coloform-0.0.1a8.tar.gz
  • Upload date:
  • Size: 110.3 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.1a8.tar.gz
Algorithm Hash digest
SHA256 f05ce61b54332acc81b3891234e39a833beaf3938bc5abb1357df6dd63f34ead
MD5 a6a9c9f7a428e7f88fbaa133e80287ba
BLAKE2b-256 3830321fb672ac1a2396a66b0070a9f9a04cd029d145709cdac732fb64a48d09

See more details on using hashes here.

Provenance

The following attestation bundles were made for coloform-0.0.1a8.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.1a8-py3-none-any.whl.

File metadata

  • Download URL: coloform-0.0.1a8-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.1a8-py3-none-any.whl
Algorithm Hash digest
SHA256 263183c2de0d4c66e78e705f02f0915f8681ed7d14e204b67a0d0a6772eabc48
MD5 96cfe07b50a3798ec50d444aa6404694
BLAKE2b-256 ee2e23ffb39429c46077e29f5f8a5049d6e2fa92308a7e0a1e9fac63d6417548

See more details on using hashes here.

Provenance

The following attestation bundles were made for coloform-0.0.1a8-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