Closed h7x4 closed 1 year ago
Hello @h7x4,
you can use the following to get character sequences that cause the expected behavior:
> setSGRCode [SetColor Foreground Dull Red]
"\ESC[31m"
> setSGRCode [Reset]
"\ESC[0m"
This should be used in combination with Text.Layout.Cell.Formatted
. For an example see my comment here. With the version on GitHub more complex nested formatting is possible. The release is still pending but may be ready soon.
If you don't mind, I will keep this issue open as a reminder to improve the README.md
.
Hello! This is just a question.
I'm having some problems trying to use this package with
ansi-terminal
. In the README at Improving Readability of Grids, it says the following:However,
ansi-terminal
usesIO
actions as their means to change color:Which in turn causes the type of any colored text to be
IO ()
. Unless there is some kind of table printer where I can provide a functionString -> IO ()
per cell during printing the table (which rules outgridString
andgridLines
), I'm not able to figure out any other way for these to cooporate.Am I missing something, or is this just fundamentally impossible? If it does somehow work, I would really like an example in the README.