<div dir="ltr"><div><div><div><div><div><div><div>Hi all,<br><br></div>rainbow is a simple package to help you print colored text on UNIX-like systems. It&#39;s different from packages like terminfo (upon which it is based) and ansi-terminal in two ways. First, rainbow assumes you print text one &quot;chunk&quot; at a time. The properties of the terminal are reset with every chunk. That way you do not need to remember what the terminal&#39;s properties were before you print a new chunk. One chunk does not affect the next chunk. It&#39;s a state-free model that fits in well with functional programming.<br>
<br>Second, rainbow makes it easy to use both 8- and 256-color terminals.<br><br></div>Some sample things you can do in ghci:<br><br></div>:set -XOverloadedStrings<br></div>:m +System.Console.Rainbow<br></div>putChunkLn $ &quot;Hello bold green world!&quot; &lt;&gt; f_green &lt;&gt; bold<br>
</div>putChunkLn $ &quot;Red on 8-color, pink on 256-color&quot; &lt;&gt; f_red &lt;&gt; c256_f_201<br>mapM_ putChunk [&quot;green on blue&quot; &lt;&gt; f_green &lt;&gt; b_blue, &quot; &quot;, &quot;blue on green&quot; &lt;&gt; f_blue &lt;&gt; b_green, &quot;\n&quot;]<br>
<br></div>So, add some color to things:<br><br><a href="http://hackage.haskell.org/package/rainbow">http://hackage.haskell.org/package/rainbow</a><br></div>