Useful CLI tools (bash) for Arch Linux administration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
357 B

6 years ago
  1. #!/bin/bash
  2. # Source: https://unix.stackexchange.com/questions/269077/tput-setaf-color-table-how-to-determine-color-codes
  3. # Author: user79743
  4. color(){
  5. for c; do
  6. printf '\e[48;5;%dm%03d' $c $c
  7. done
  8. printf '\e[0m \n'
  9. }
  10. IFS=$' \t\n'
  11. color {0..15}
  12. for ((i=0;i<6;i++)); do
  13. color $(seq $((i*36+16)) $((i*36+51)))
  14. done
  15. color {232..255}