What I just pushed
TermChroma turns an image into ASCII art in your terminal. It has color, and it has an interactive mode where you can change the look while you watch. The code is at https://github.com/kleinpanic/TermChroma.
What it does
You give it an image. It draws the image as characters, and the art always fits your terminal. In the interactive curses mode:
- Up and Down change the scale
- Left and Right cycle through character sets
- C cycles the color modes
- Q quits
The color modes are none, grayscale, rainbow, blue2red and custom, in 256-color ANSI. A few flags are worth knowing:
- -o saves the art to a file
- --chars gives it your own character ramp
- --resize-filter takes nearest, bilinear, bicubic or lanczos
- --random-colors prints a 256-color table
- --no-tui skips the interactive part and prints once
How it works
It is one Python file, ascii_art.py, about 450 lines. It needs Python 3.6 or newer and Pillow for loading and resizing the image. The code says version 1.1.0. It also has a man page, TermChroma.1.
git clone https://github.com/kleinpanic/TermChroma
cd TermChroma
python3 -m venv .venv
. .venv/bin/activate
pip install Pillow
python ascii_art.py image.jpg
What is not done
There is no installer. You run the script from the clone.
There is no LICENSE file yet either, so treat the license as undecided.
P.S Thanks for reading. Consider subbing to the RSS feed.
Klein Panic