Skip to content

Instantly share code, notes, and snippets.

@herry13
Created July 6, 2018 00:08
Show Gist options
  • Save herry13/0d48dfafd62e09a25013344defdb53f8 to your computer and use it in GitHub Desktop.
Save herry13/0d48dfafd62e09a25013344defdb53f8 to your computer and use it in GitHub Desktop.
Generate color-codes supported in bash
#!/bin/bash
color=16;
while [ $color -lt 245 ]; do
echo -e "$color: \\033[38;5;${color}mhello\\033[48;5;${color}mworld\\033[0m"
((color++));
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment