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.2.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.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fscolor-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 25e27fff2c8774e3ba1e1b5c354a2d960732168d8fbc937035ef901fd6e76a8c
MD5 180f05268b5f549fba9117879538c726
BLAKE2b-256 8e4ca10f6542fb6feb91aeaf6a3b2682c0ffb14ca11e65376e9a574420bf070a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fscolor-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a3c505bdd1f697c6c57c6123aa6e379034fa2a20d6a4686731a87089e846c7f0
MD5 e808dfd55aaa97c7baed153f0fc3bcfa
BLAKE2b-256 3433b692f4d9306ddea3ee89ac3e3c982d2ba6c4d24516a16228e4066f78a01e

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