view misc/my-colors.sh @ 640:df21e61d2343

Rename color dump utility. Install it.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Tue, 08 Aug 2017 10:40:34 +0300
parents misc/ansi-colors.sh@6087f2159dab
children
line wrap: on
line source

#!/bin/sh

echo "0>none/clear 1>bold 4>underscore 5>blink 7>reverse 8>concealed"

for i in 0 1 2 3 4 5 6 7; do
  printf "\033[${i}m ${i}type"
done
printf "\n"
for i in 0 1 2 3 4 5 6 7; do
  printf "\033[${i}m\033[43m\033[32m ${i}type"
done
printf "\033[0m\n"

echo "0>black 1>red 2>green 3>yellow 4>blue 5>magenta 6>cyan 7>white"

for b in 9 0; do
  for t in 0 2 1; do
    for c in 0 1 2 3 4 5 6 7; do
      printf "\033[${t}m\033[4${b}m\033[3${c}m ${c}fg  "
    done
    printf "\033[0m bg${b} type${t}\n"
  done
done
printf "\033[0m\n"
for i in 0 1 2 3 4 5 6 7; do
  for j in 0 1 2 3 4 5 6 7; do
    printf "\033[3${i}m\033[4${j}m ${i}f${j}b \033[0m"
  done
  printf "\033[3${i}m ${i}fnb \033[0m\n"
done