17 unstable releases (3 breaking)

0.4.5 Aug 25, 2023
0.4.2 Jul 9, 2023
0.2.4 Nov 28, 2022
0.1.2 Mar 25, 2023

#45 in Graphics APIs

Download history 21/week @ 2023-06-11 16/week @ 2023-06-18 19/week @ 2023-06-25 42/week @ 2023-07-02 64/week @ 2023-07-09 44/week @ 2023-07-16 24/week @ 2023-07-23 13/week @ 2023-07-30 24/week @ 2023-08-06 24/week @ 2023-08-13 67/week @ 2023-08-20 32/week @ 2023-08-27 22/week @ 2023-09-03 51/week @ 2023-09-10 26/week @ 2023-09-17 11/week @ 2023-09-24

114 downloads per month
Used in charisma

MIT license

327 lines

Crate Status Docs Status


Advanced ASCII Art Generator

Usage: rascii [OPTIONS] <FILENAME>

  <FILENAME>  Path to the image

  -w, --width <WIDTH>      Width of the output image. Defaults to 128 if width and height are not specified
  -H, --height <HEIGHT>    Height of the output image, if not specified, it will be calculated to keep the aspect ratio
  -c, --color              Whether to use colors in the output image
  -i, --invert             Inverts the weights of the characters. Useful for white backgrounds
  -C, --charset <CHARSET>  Characters used to render the image, from transparent to opaque. Built-in charsets: block, emoji, default, russian, slight [default: default]
  -h, --help               Print help
  -V, --version            Print version


  • Available as a crate: RASCII has a very simple API allowing you to use RASCII from your programs without using the system shell.

  • Colored ASCII art generation: RASCII uses ANSI color codes to generate colored ASCII art.

    Note: Your terminal emulator has to support truecolor (don't worry, almost all modern terminal emulators do).

  • Super efficient colored output: RASCII never repeats the same ANSI color code if it is already active.

    This makes a huge difference in images with little alternating color, up to about 1800% reduction in output size. Woah!

  • Custom dimensions: RASCII allows you to give custom dimensions to the outputted ASCII art while keeping the aspect ratio (unless both dimensions are provided).

  • Custom charsets: RASCII allows you to use custom charsets to generate your ASCII art.

    Note: The given charset must go from transparent to opaque.

  • Lots of pre-included charsets.

Installing The CLI

Via Cargo

Note: This is the recommended way of installing the RASCII CLI.

Warning: You must have ~/.cargo/bin/ in your PATH to run rascii directly.

cargo install rascii_art


Warning: this installation method is discouraged and only works for GNU/Linux or any other POSIX compatible systems!

git clone https://github.com/KoBruhh/RASCII && cd RASCII
chmod +x install.sh

Using The Crate

Instead of using the unreliable system shell to call RASCII, you can add the rascii_art crate to your project and use it in Rust!

To do so, run cargo add rascii_art to add RASCII to your Cargo project.

Here is a code example:

use rascii_art::{
fn main() {
    let mut buffer = String::new();
        &mut buffer,
            .charset(&[".", ",", "-", "*", "£", "$", "#"]),


Japanese Charset

RASCII output of chad with the Japanese charset

Emoji Charset

Note: The emoji charset does not guarantee your outputs color will match the color of your image, this is just a coincidence that happened with Ferris.

RASCII output of ferris with the emoji charset

Chinese Charset

RASCII output with the Chinese charset

Block Charset

RASCII output of TrollPepe with the block charset

RASCII output of Ferris with the block charset

Custom ASCII Charset

You can use the --charset (or -C) CLI option to provide a custom charset to use when generating some ASCII art.

The value of this must option must go from transparent to opaque, like so:

rascii --charset " ░▒▓█" --color ferris.png

Note that a charset similar to the above charset is available as a builtin named block.

RASCII output of Ferris with a custom charset




KoBruhh RGBCube felixonmars fnordpig

Star History

Star History Chart


~113K SLoC