Skip to main content

Convert images to ANSI-colored ASCII/Unicode art in the terminal

Project description

asciinator

Convert images to ANSI-colored ASCII/Unicode art in your terminal.

Supports three rendering modes:

  • halfblock (default) — Unicode upper-half-block () with 24-bit foreground and background color. Packs two image rows per terminal line, doubling vertical resolution.
  • shade — Unicode shade blocks (█▓▒░) with 24-bit foreground color.
  • ascii — Classic ASCII ramp (@%#*+=-:.) with 24-bit foreground color.

Install

pip install asciinator

For SVG input support:

pip install 'asciinator[svg]'

Or with uv:

uv tool install asciinator

Usage

asciinator path/to/image.png
asciinator logo.jpg --mode shade
asciinator photo.png --mode ascii --chars "@%#*+=-:." --width 120
asciinator icon.svg --saturation 1.4 -o icon.ansi

Options

Option Description
--mode {ascii,shade,halfblock} Output mode (default: halfblock)
--chars CHARS Custom character ramp, darkest→brightest (ignored for halfblock)
--width N Output width in characters (default: terminal width)
--saturation F Color saturation multiplier (default: 1.0; >1 is more vivid)
-o FILE, --output FILE Also write output (with ANSI codes) to this file

Output is auto-sized to fit the terminal height. Your terminal must support 24-bit true color (most modern terminals do).

Development

This project uses uv for dependency management and builds.

# Run from source
uv run asciinator path/to/image.png

# Build wheel + sdist into dist/
uv build

# Install the built wheel for local smoke testing
uv tool install --from dist/asciinator-0.1.0-py3-none-any.whl asciinator

Publishing

Build artifacts first:

uv build

Dry-run on TestPyPI:

# Create a token at https://test.pypi.org/manage/account/token/
uv publish --publish-url https://test.pypi.org/legacy/ \
           --token pypi-<TESTPYPI_TOKEN>

# Verify install from TestPyPI
uv tool install --index-url https://test.pypi.org/simple/ \
                --extra-index-url https://pypi.org/simple/ \
                asciinator

Publish to real PyPI:

# Create a token at https://pypi.org/manage/account/token/
uv publish --token pypi-<PYPI_TOKEN>

You can also set UV_PUBLISH_TOKEN in your environment instead of passing --token.

License

MIT — see 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

asciinator-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

asciinator-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: asciinator-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for asciinator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1df8a50b07b4b78e53d78c54eb49148fc39b7655a4a718d0a20959698ba9f0d0
MD5 d5542c73d212a6efbd61095195edc736
BLAKE2b-256 f208ce232db5e837716903d66364e329eaa4dc1908412be6b8c29686951a2a3a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: asciinator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for asciinator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 118a160cf0ec7c484bab69f62e2a4f9d7cc18d0afc88dfe152344da74a7d550c
MD5 f3411eba567b0edaafc78d27080772db
BLAKE2b-256 4e991b9e9ce2eca0a4f4647101bcfb1afb841465b24b17467d345300cbc7da6c

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