h6_e      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None +-./0246=K  A color; a J value means that the terminal's default color is used. The type of the  generally will be an  $ to represent one of 8 colors, or a ! to represent one of 256 colors.*Text formatting such as bold, italic, etc. @A simple enumeration for eight values. Represents eight colors.&#Takes the last non-Nothing Color.  is no color.(-The foreground and background color, and the a. This represents all colors and formatting attributes for either an 8- or 256-color terminal.5KFor each field, the resulting field is True if either field is True. For , every field is False.6 Holds the (% for both 8- and 256-color terminals.=Uses the underlying  instances for  and .>A chunk is some textual data coupled with a description of what color the text is, attributes like whether it is bold or underlined, etc. The chunk knows what foreground and background colors and what attributes to use for both an 8 color terminal and a 256 color terminal.D Creates a >, with no formatting and with the given text.EUses the underlying  instances for the ( and for the particular A . Therefore  will have no formatting and no colors and will generally have no text, though whether or not there is any text depends on the  for the type of the A.GXStores colors that may affect 8-color terminals, 256-color terminals, both, or neither.MUses the underlying  instance for the s. Thus the last non- y is used. This can be useful to specify one color for 8-color terminals and a different color for 256-color terminals.P  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOI  !"#$%()*+,-./012346789:;<>?@ABCDGHIJKLNOQ''&   !"#$% 43210/.-5()*+,<;:=6789CBF>?@AEDLKGHIJMON1    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNONone24 PItems that can be rendered. Q returns a difference list.~*Spawns a subprocess to read the output of  tput colorsG. If this says there are at least 256 colors are available, returns }A. Otherwise, if there are at least 8 colors available, returns |. Otherwise, returns {.HIf any IO exceptions arise during this process, they are discarded and { is returned.Like ~ but also consults a provided Handle . If the Handle is not a terminal, {( is returned. Otherwise, the value of ~ is returned.Convert a list of > to a list of U. The length of the returned list may be longer than the length of the input list.QSo, for example, to print a bunch of chunks to standard output using 256 colors: kmodule PrintMyChunks where import qualified Data.ByteString as BS import Rainbow myChunks :: [Chunk String] myChunks = [ chunk "Roses" & fore red, chunk "\n", chunk "Violets" & fore blue, chunk "\n" ] myPrintedChunks :: IO () myPrintedChunks = mapM_ BS.putStr . chunksToByteStrings toByteStringsColors256 $ myChunks@To use the highest number of colors that this terminal supports: myPrintedChunks' :: IO () myPrintedChunks' = do printer <- byteStringMakerFromEnvironment mapM_ BS.putStr . chunksToByteStrings printer $ myChunks Writes a >D to standard output. Spawns a child process to read the output of  tput colors to determine how many colors to use, for every single chunk. Therefore, this is not going to win any speed awards. You are better off using  and the functions in Data.ByteString to print your >%s if you are printing a lot of them. Writes a >Z to standard output, and appends a newline. Spawns a child process to read the output of  tput colors to determine how many colors to use, for every single chunk. Therefore, this is not going to win any speed awards. You are better off using  and the functions in Data.ByteString to print your >%s if you are printing a lot of them.NStrings are converted first to a strict Text and then to a strict ByteString..Lazy ByteString is converted to strict chunks. Strict ByteString is left as-is.*Converts a lazy Text to UTF-8 ByteStrings.-Converts a strict Text to a UTF-8 ByteString.8PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Function that converts > to %. This function, when applied to a >, returns a difference list.3PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~8PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~7PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None +-./0HMBold. What actually happens when you use Bold is going to depend on your terminal. For example, xterm allows you actually use a bold font for bold, if you have one. Otherwise, it might simulate bold by using overstriking. Another possibility is that your terminal might use a different color to indicate bold. For more details (at least for xterm), look at xterm (1) and search for  boldColors.lIf your terminal uses a different color for bold, this allows an 8-color terminal to really have 16 colors.@Change the foreground color for both 8- and 256-color terminals.@Change the background color for both 8- and 256-color terminals.Ensures that a G affects only a 256-color terminal. For instance, to make text that is blue on an 8-color terminal but red on a 256-color terminal:  $ chunk "Blue on 8, red on 256" &  ( <>  ) .>DGP{|}~(>DGP{|}~      !"#$%&'()**+,-./01234567789:;<=>>?@ABCDEFFGHIJKLMNOPQRSTUVW/035.124XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}/035.124;:~ !"#$%&'Lrainbow-0.26.0.4 Rainbow.TypesRainbow.TranslateRainbowColorFormat_bold_faint_italic _underline_blink_inverse _invisible _strikeoutEnum8E7E6E5E4E3E2E1E0 enum8toWord8blackredgreenyellowbluemagentacyanwhitegrey brightRed brightGreen brightYellow brightBlue brightMagenta brightCyan brightWhite $fMonoidColorTFCo:R:UnwrappedColorStyle_fore_back_formatblinkboldfaintinverse invisibleitalic strikeout underline$fMonoidFormatScheme_style8 _style256backforeformat $fMonoidStyleChunk_scheme_yarnstyle256style8chunk $fMonoidChunk$fMonoidSchemeRadiant_color8 _color256schemeyarn$fMonoidRadiantcolor256color8 Renderablerendersingleescapecsisgrparams sgrSingle sgrDouble normalDefault foreBlackforeRed foreGreen foreYellowforeBlue foreMagentaforeCyan foreWhite foreDefault backBlackbackRed backGreen backYellowbackBlue backMagentabackCyan backWhite backDefaultfore256back256 foreColor8 backColor8 renderFormat renderStyle8renderStyle256toByteStringsColors0toByteStringsColors8toByteStringsColors256byteStringMakerFromEnvironmentbyteStringMakerFromHandlechunksToByteStringsputChunk putChunkLn$fRenderable[]$fRenderableByteString$fRenderableByteString0$fRenderableText$fRenderableText0only256base Data.MaybeNothingMaybeGHC.WordWord8 Data.MonoidmemptyMonoidbytestring-0.10.4.0Data.ByteString.Internal ByteString formatBoth<> lens-4.11Control.Lens.Lens&