colorful
colorful copied to clipboard
support string formatter's width specification
Consider
print(f"A{cf.italic_underlined_lavender('Z'):>80}")
The Z ends up in quite a different spot when color output is enabled vs disabled!
I believe that since ColorfulString already knows how to calculate its printable length, it would be able to appropriately handle field width specifications if it were to implement __format__.
That method is used by both the f-string literals and format().