skip to navigation
skip to content

PySixel 0.1.3

Make SIXEL color graphics supported by some terminal emulators(DECTerm/RLogin/mlterm/tanasinn/xterm)

Latest Version: 0.1.11

What is SIXEL?

SIXEL is one of image formats for terminal imaging introduced by DEC VT series. SIXEL image data scheme is represented as a terminal-friendly escape sequence. So if you want to show a SIXEL image file, all you have to do is “cat” it to your terminal.

I heared SIXEL is supported by some old terminal applications, such as SAS, WordPerfect.

Nowadays netpbm and Gnuplot support this.


If you want to view a SIXEL image, you have to get a terminal which support sixel graphics.

Now SIXEL feature is supported by the following terminals.


via github

$ git clone
$ cd pysixel
$ python install

or via pip

$ pip install PySixel


PySixel provides a Command line tool:

$ sixelconv [options] filename


$ cat filename | sixelconv [options]
  • Options:

    -h, --help                                            show this help message and exit
    -8, --8bit-mode                                       Generate a sixel image for 8bit terminal or printer
    -7, --7bit-mode                                       Generate a sixel image for 7bit terminal or printer
    -r, --relative-position                               Treat specified position as relative one
    -a, --absolute-position                               Treat specified position as absolute one
    -x LEFT, --left=LEFT                                  Left position in cell size, or pixel size with unit 'px'
    -y TOP, --top=TOP                                     Top position in cell size, or pixel size with unit 'px'
    -w WIDTH, --width=WIDTH                               Width in cell size, or pixel size with unit 'px'
    -e HEIGHT, --height=HEIGHT                            Height in cell size, or pixel size with unit 'px'
    -t ALPHATHRESHOLD, --alpha-threshold=ALPHATHRESHOLD   Alpha threshold for PNG-to-SIXEL image conversion
    -c, --chromakey                                       Enable auto chroma key processing
    -n NCOLOR, --ncolor=NCOLOR                            Specify number of colors


View an image file:

$ sixelconv test.png

Generate sixel file from an image file:

$ sixelconv < test.png > test.six

View generated sixel file:

$ cat test.six

Show sixel in xterm

    $ curl | tar xz
    $ cd xterm-301
    $ ./configure --enable-wide-chars --enable-sixel-graphics --enable-256-color
$ make
# make install
    $ xterm -ti vt340 -e 'sixelconv ~/testdir/test.jpg'

Code Example

import sixel
writer = sixel.SixelWriter()
File Type Py Version Uploaded on Size
PySixel-0.1.3-py2.6-linux-x86_64.egg (md5) Python Egg 2.6 2014-01-25 137KB
PySixel-0.1.3-py2.6-macosx-10.9-intel.egg (md5) Python Egg 2.6 2014-01-25 78KB
PySixel-0.1.3-py2.7-linux-x86_64.egg (md5) Python Egg 2.7 2014-01-25 138KB
PySixel-0.1.3-py2.7-macosx-10.9-x86_64.egg (md5) Python Egg 2.7 2014-01-25 48KB
PySixel-0.1.3.tar.gz (md5) Source 2014-01-25 59KB