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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fscolor-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 59d5ff81b4e01017c33fa38c59665475edb1128d8be7caaa4d565fde618e6aed
MD5 7ac1e4e2f825dfa555262fa9b20cb17c
BLAKE2b-256 07155a226bbdd92fd9fac5d6baf74d9092b66475cbc56edb38df5f8386ccf6e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fscolor-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 141e95719b994a92a78aea33176c14ed895441b82cd59db691a1d6d19679ffc9
MD5 6b0521f21c2b444590d3486be7c4442d
BLAKE2b-256 3aa29aaf86140a3e1284418f2537e1e9a3d6445887179320b3705f209ba1bdac

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