Added short version of color test function (less verbose).
This commit is contained in:
parent
0dfb90b672
commit
82393a324e
@ -6,8 +6,9 @@
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
function printFullColors() {
|
||||
#Background
|
||||
for clbg in {40..47} {100..107} 49 ; do
|
||||
for clbg in {40..47} {100..107} 49 ; do
|
||||
#Foreground
|
||||
for clfg in {30..37} {90..97} 39 ; do
|
||||
#Formatting
|
||||
@ -17,7 +18,27 @@ for clbg in {40..47} {100..107} 49 ; do
|
||||
done
|
||||
echo #Newline
|
||||
done
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# See https://askubuntu.com/questions/27314/script-to-display-all-terminal-colors
|
||||
function printShortColors() {
|
||||
for x in {0..8}; do
|
||||
for i in {30..37}; do
|
||||
for a in {40..47}; do
|
||||
echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "
|
||||
done
|
||||
echo
|
||||
done
|
||||
done
|
||||
echo ""
|
||||
}
|
||||
|
||||
if [ "$1" == "--full" ]; then
|
||||
printFullColors
|
||||
else
|
||||
printShortColors
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user