I have a simple minimum width format using printf
like so
$ printf "[%-15s][%-10s][%-5s][%-10s]\n" "Hello" "World" "Eat" "Cake"
[Hello ][World ][Eat ][Cake ]
But when I try to add some color to it as per the instructions from here, the minimum width formatting goes away
$ GREEN=$(tput setaf 2) && printf "[%-15s][%-10s][%-5s][%-10s]\n" "Hello" "World" "Eat" "${GREEN}Cake"
[Hello ][World ][Eat ][Cake]
Obviously you can't see on here that it's green, but you can see that the minimum width on the word 'Cake' has dissappeared. What you can't see, but which is also happening, is that the font of the word 'Cake' has changed as well.
Question: How can I change the color but keep the minimum width, and if possible, keep the font the same?