wolfadex / elm-ansi / Ansi.Font

When styling your terminal there are 2 sets of commands, those that add the style and those that remove it. This does make this a little more difficult to use as you have to remember to reset each style when you no longer want it applied. It does however let you mix and match styles however you want. For example

Ansi.Font.startItalic ++ "Hello, " ++ Ansi.Font.startBold ++ "World" ++ Ansi.Font.endBold ++ "!" ++ Ansi.Font.endItalic

produces "Hello, World!". However most people don't need this fine grained of control. If you want simpler functions I recommend

Ansi.Font.italic ("Hello, " ++ Ansi.Font.bold "World" ++ "!")

which produces the same result.

Shorthand Styling

bold : String -> String

faint : String -> String

The opposite of bold

italic : String -> String

underline : String -> String

strikeThrough : String -> String

Explicit Styling

startBold : String

startFaint : String

The opposite of bold

endBoldFaint : String

startItalic : String

endItalic : String

startUnderline : String

endUnderline : String

startStrikeThrough : String

endStrikeThrough : String

resetAll : String

Visibility

hide : String

show : String

Limited Support

These have some limited support but it varies greatly by terminal

blink : String -> String

Not supported by some terminals

startBlink : String

endBlink : String