I initially thought that the power of 2 idea was good, but then I saw this
set bar_p = color_p.apply(bars[R2I(width_p*percent_p + .5)]) + Color.convert(0, 0, 0, 0) + bars[R2I(width_p*(1 - percent_p) + .5)] + "|r"
Remember, the bars are colored and are split (colored portion + blank portion, like health bar with one portion empty and one portion filled). With power of 2, you'd be up to the exact same amount of leaks with substrings in the worst case scenario with worse performance and less accuracy.
I think that it's fine as is and is ready for approval.