Typo .. Thanks for the feedback and ideas for shortening the code a bit. I will look into shortening it a bit and update it.
However using your version it does not end the bold , underline or color.
I used
//echo -a $colorit(04,5,test) test
And it colored both words instead of just the one. It did that for $prop 's as well.