safe-coloured-text-terminfo-0.1.0.0: Safely output coloured text
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Colour.Capabilities.FromEnv

Synopsis

Documentation

getTerminalCapabilitiesFromEnv :: IO TerminalCapabilities Source #

Try to detect how many colours the terminal can handle.

This is based on the colors capability of the terminfo detected based on the TERM environment variable. If the terminal can handle 8-bit colours and also has the COLORTERM environment variable set to 24bit or truecolor, then this function will return With24BitColours.

getTerminalCapabilitiesFromHandle :: Handle -> IO TerminalCapabilities Source #

Try to detect how many colours a given handle can handle.

This function does the same as getTerminalCapabilitiesFromEnv but returns WithoutColours is not a terminal device.