Skip to content

Generate Ascii art coloured with ansi codes for that terminal eye candy.

Notifications You must be signed in to change notification settings

pedrocatalao/rgb-ascii-art

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 

Repository files navigation

RGB ASCII art (rgbify)

Taking a shot with Python for the first time and trying to have a bit of fun in the process.

It consists of a small script that plays with ASCII and ANSI escape sequences to add some color to your terminal.

rgbify

You can call it by specifying either an input file or a text string to generate an ASCII banner. It's also possible to call it only with -l to show the last login information.

There's a few options available in order to configure the result:

  -h, --help   show this help message and exit
  -i file      input file
  -t text      text to generate
  -o file      output file (will not print result in terminal)
  -f font      font to use, check them here: http://www.figlet.org/examples.html
  -c colors    comma separated hex colors (default: RGB)
  -w width     maximum width of the banner
  -s columns   push colors forward n columns in the next line
  -a times     animate n times (requires delay)
  -d delay     print each character with a delay (milliseconds, default: 0)
  -l position  vertical position to show last login information
  -n lines     add or remove lines at the end (negative to remove)

For example, this:

$ rgbify -t "Hello World" -c FF3355,3355FF,FFFF12 -f graffiti -w 40 -s 4

Will result in:

If you want a nice welcome message when you open your terminal, just add it to your shell config (i.e. .zshrc, .bash_profile, etc).

Some like this:

$ rgbify -t "welcome radix" -f drpepper -s 3 -a 1 -d 2 -l 4

Will yeld this result:

Alt Text

Dependencies

You'll need figlet to run this and you can install it like this:

On mac with brew:

brew install figlet

On ubuntu with apt:

apt install figlet

With pip:

pip3 install pyfiglet

Note: you might need to add --break-system-packages for newer Python versions

About

Generate Ascii art coloured with ansi codes for that terminal eye candy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages