Portability | semi-portable (uses MPTC and type families) |
---|---|
Stability | experimental |
Maintainer | felipe.lessa@gmail.com |
Safe Haskell | Safe-Infered |
Support for colours. This module is entirely based on the colour
package, so we strongly recommend that you at least
import qualified Data.Colour.Names as C
which will import various aliases for creating Colour
s.
Note changing the colours using the functions below do not hinder the use of automatic padding.
Changing colours
fg :: Transform a => DColour -> a -> aSource
Set the foreground colour. Note that the foreground
colour is changed only inside the transformed DString
or Printer
, unlike using "^fg"
which may affect
subsequent strings.
So you may write
fg
and it works like you expect it to.
black
(fg lime
(str "lime") +++ str "black")
Reseting to the defaults
defFg :: Transform a => a -> aSource
Set the foreground colour to be the default one, which is specified as a parameter to dzen (outside the control of the printers).