Skip to content

Instantly share code, notes, and snippets.

@txgk
Created June 23, 2022 16:44
Show Gist options
  • Save txgk/59112b684f9a60bad37b18d6c4ff2655 to your computer and use it in GitHub Desktop.
Save txgk/59112b684f9a60bad37b18d6c4ff2655 to your computer and use it in GitHub Desktop.
#!/bin/sh
# \033]PXRRGGBB
# X is in the range [0; F]
# RRGGBB is hexadecimal color code
printf '\033]P0202020' # black
printf '\033]P1604040' # red
printf '\033]P2406040' # green
printf '\033]P3606040' # yellow
printf '\033]P4404060' # blue
printf '\033]P5604060' # magenta
printf '\033]P6406060' # cyan
printf '\033]P7606060' # white
printf '\033]P0202020' # light black
printf '\033]P1604040' # light red
printf '\033]P2406040' # light green
printf '\033]P3606040' # light yellow
printf '\033]P4404060' # light blue
printf '\033]P5604060' # light magenta
printf '\033]P6406060' # light cyan
printf '\033]P7606060' # ligth white
clear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment