Macro to print a divider with optional text and styles
hex! macro
hexbg! macro to convert hex color to ansi background color
example: hexbg!(#0099FF) -> “\x1b[48;2;0;99;255m\x1b[30m”
example: hexbg!(#0099FF, 255) -> “\x1b[48;2;0;99;255m\x1b[30m”
example: hexbg!(#0099FF, 255, 255, 255) -> “\x1b[48;2;0;99;255m\x1b[30m”
Macro to print a paragraph with a title and text
The text is automatically wrapped to the max width
Same as show! but returns a string instead of printing it
same as show! but wraps the text to the max width (ascii formatting strings are excluded from character count to properly wrap text)
e.g. show_wrapped!(green, "hello world", yellow, "this is a test", blue, "to make sure that the text is wrapped properly")
will wrap the text to the max width and print it in the specified colors
ascii formatting strings are excluded from character count to properly wrap text
Macro to print a tree of the provided serializable object