Skip to main content

Color formatting for f-strings

Project description

🌈 fscolor - F-String Color Formatting for Python

PyPI Version Python Versions License

fscolor is a lightweight Python package that brings effortless color formatting to f-strings using ANSI escape codes. Designed for simplicity and readability, it enables developers to create vibrant console output with minimal code changes.

Features ✨

  • 🎨 8 Basic Colors: Black, Red, Green, Yellow, Blue, Magenta, Cyan, White

  • 🔄 Automatic Reset: No need to manually reset colors

  • 💻 Cross-Platform: Works on most modern terminals

  • 🚀 Zero Dependencies: Pure Python implementation

  • 📦 F-String Ready: Designed specifically for Python 3.6+ formatted strings

  • 🔧 Extensible Architecture: Easily add custom colors or styles

Installation 📦

pip install fscolor

Use Cases

Examples - See Jupyter Notebook for various use cases.

Compatibility Notes ⚠️

  • Requires terminal supporting ANSI escape codes

  • Colors may appear different based on terminal theme

  • Not recommended for file output or non-TTY devices

Roadmap 🗺️

  • 256-color support

  • Background colors

  • Text styles (bold, italic, underline)

  • Windows compatibility layer

Contributing 🤝

Contributions welcome! Please check later for details.

License 📄

MIT License - See LICENSE for details.

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

fscolor-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

fscolor-0.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file fscolor-0.1.1.tar.gz.

File metadata

  • Download URL: fscolor-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fscolor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b6639092533519351fbcec487595b2805a50eebe927bc95f3ccd5c5b1bc7f882
MD5 5112352bf46893c36633ffc2163856e1
BLAKE2b-256 8ea74252813db360381354ae6657262037a5a2e9b3ec8c4729b86e5cb0f8f108

See more details on using hashes here.

File details

Details for the file fscolor-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fscolor-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fscolor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 451fe183cd6ce1f72cab9920acda5a61c0e77a130944af928b7919a3adbaf1de
MD5 5b750780f4bbb1e2d6ffbc1cecdbd97c
BLAKE2b-256 4181083421a1198cc9a439a8c39a9abf96a8f9aa608f85c5836e91f7e48b43e5

See more details on using hashes here.

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