Skip to content

Instantly share code, notes, and snippets.

View timotheeandres's full-sized avatar

Timothée Andres timotheeandres

View GitHub Profile
@timotheeandres
timotheeandres / ansi_colors.sh
Created August 6, 2022 06:42
Script to print ANSI colors in the console
View ansi_colors.sh
#!/bin/bash
readonly TEXT="xYz" # You may change this if you wish
readonly WIDTH=$((${#TEXT}+2))
FOREGROUND=(0 {30..37} {90..97})
BACKGROUND=('' {40..47} {100..107})
MODS=({0..8})
readonly FOREGROUND BACKGROUND MODS