I am display the 256 colors for tput by colouring tho background colour using the following bash function.
tput-bgcolours ()
{
for color in {0..255}; do
bg=$(tput setab $color)
echo -n $bg" "
done
echo $(tput sgr0)
}
How can I pass a range of values to the function rather that looking all colours from 0 to 255?
sed -i s/setaf/setab/g
and try it. It includes nice ways to select panels of colors. – A.B Jun 28 '21 at 14:51