Added short version of color test function (less verbose).
This commit is contained in:
parent
0dfb90b672
commit
82393a324e
@ -6,6 +6,7 @@
|
|||||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||||
|
|
||||||
|
function printFullColors() {
|
||||||
#Background
|
#Background
|
||||||
for clbg in {40..47} {100..107} 49 ; do
|
for clbg in {40..47} {100..107} 49 ; do
|
||||||
#Foreground
|
#Foreground
|
||||||
@ -18,6 +19,26 @@ for clbg in {40..47} {100..107} 49 ; do
|
|||||||
echo #Newline
|
echo #Newline
|
||||||
done
|
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
|
exit 0
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user