Skip to main content

standard(2)

PyPI Python Telegram
PyPI
Leave a ⭐ if you like this repository


🚩 What is hexstyle?

hexstyle is a tiny, dependency-free Python package that lets you print colored text in your terminal using HEX color codes — just like in web design. It's simple, lightweight, and supports every imaginable color with easy-to-use helper functions.


🚀 Installation

Install from PyPI:

pip install hexstyle

PyPI: https://pypi.org/project/hexstyle/


🧩 Quick usage

import hexstyle

print(hexstyle.set("#ff0000") + "Hello, world!" + hexstyle.reset())

hexstyle.set(hex: str)

  • hex: the hex color you want to use

📚 Features

  • Use any HEX color to style your terminal text
  • Lightweight & dependency-free — pure Python
  • Works on most modern terminals (Windows, macOS, Linux)

⚠️ Notes & Limitations

  • ANSI color codes may not display correctly in environments that don't support truecolor (24-bit) — for example, some older Windows terminals or minimal Docker shells.
  • Output colors may vary slightly depending on your terminal theme or emulator.
  • This package only affects terminal (stdout) text — it won’t color text in log files or GUI applications.
  • Unicode/emoji characters work fine, but truecolor accuracy may vary between fonts or shells.

🧪 Examples

A short interactive example:

import hexstyle

print(hexstyle.set("#ff0000") + "Hello, world!" + hexstyle.reset())
input(hexstyle.set("#00ff00") + "How are you today?: " + hexstyle.set("#0000ff"))

🆘 Quick Fix

  • If you see weird formatting like ←[38;2;255;0;0mHello, world!←[0m, try clearing the terminal (cls on Windows, clear on Linux/macOS) or switching to a terminal that supports ANSI colors.

📦 Where to get help


📝 License

Distributed under the MIT License — see LICENSE for details.


👤 Maintainer & Contact


Made with ❤️ — If you find this useful, please leave a ⭐ on the repo

Star History Chart

Metadata

Release files for hexstyle 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hexstyle 1.1.1
File Size Uploaded Provenance Actions
hexstyle-1.1.1.tar.gz 3.9 kB Without provenance Details for hexstyle-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hexstyle 1.1.1
File Interpreter ABI Platform Actions
hexstyle-1.1.1-py3-none-any.whl Python 3 none any Details for hexstyle-1.1.1-py3-none-any.whl

Total release size: 8.0 kB

Release files / hexstyle-1.1.1.tar.gz

Download URL hexstyle-1.1.1.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
45b6df7cee27f47f31b8a37649c2123fdcd0f6816ef2aafe1864fba766bb99b0
BLAKE2b-256 checksum
How to use checksums
51eb2c6986af85f8767918ae012b4e4d16ab5cc255b852432663033f821a6c78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.0

Release files / hexstyle-1.1.1-py3-none-any.whl

Download URL hexstyle-1.1.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f618223d533535f07a5b89416d5b47350493e45ee2162489b6193f38144c66d
BLAKE2b-256 checksum
How to use checksums
340123cc6800e3c40089a98c44123e4f16ee523067b4cc6b882069c7aa080c37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.0

Security for hexstyle 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page