Skip to main content

ansi color and styling library for python console output

Project description

ansiconsole

ansiconsole is a lightweight python library for ansi text styling, colors, and cursor control. it supports standard ansi styles, 256-color, and rgb values, giving you full control over your terminal output.

features

  • text styles: bold, underline, dim, blink, reverse
  • foreground and background colors
  • light colors and bright backgrounds
  • 256-color support
  • rgb custom foreground and background colors
  • cursor movement and line control
  • console() function for inline formatting

installation

pip install ansiconsole

usage

from ansiconsole import console

print(console("hello, [red]world[reset]!"))
print(console("[b_blue][white] info: [reset] this text has background and style"))
print(console("[up]moves cursor up"))
print(console("[rgb(255,0,0)]custom red text[rgb(0,0,0)]"))

changelog

see changelog.md for full release history.

license

this project is licensed under the mit license.

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

colortype-6.0.0a1.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.

colortype-6.0.0a1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file colortype-6.0.0a1.tar.gz.

File metadata

  • Download URL: colortype-6.0.0a1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.14.0a7

File hashes

Hashes for colortype-6.0.0a1.tar.gz
Algorithm Hash digest
SHA256 77f00be0c525b27e0899cb696fb78bcef1ce9c9ec18a28060bf5bf87d63cc69c
MD5 91c3ce78d87f6c290951cfec8866a3f4
BLAKE2b-256 04df0618fef9a9b15171f6d33af153073802e6f333f5b5ad9f7f12e7774cdbb3

See more details on using hashes here.

File details

Details for the file colortype-6.0.0a1-py3-none-any.whl.

File metadata

  • Download URL: colortype-6.0.0a1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.14.0a7

File hashes

Hashes for colortype-6.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 63e56560e3dcd650fd2e5606ff1c06e8215c49927a82c40c6b3e3be62960f29c
MD5 ada1efe8837d5844eb47b92ea6200933
BLAKE2b-256 5aaf74f25b13381530145427d74d19d94d539b7b2eaa8d2eaace15f09ad8a5d3

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