Cli.paint: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 45-54 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=45&end_line=54 import Base def paint(on: Bool, styles: List<&2, Style>, text: String) -> String: match on styles: case False{} _: text case True{} Nil{}: text case True{} h <> t: String.append("\u{1B}[", String.append(style_codes(h <> t), String.append("m", String.append(text, "\u{1B}[0m")))) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Style https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=style_codes