Developer Tooling · zero-dependency · MIT

larzcolor

Terminal colour, done right.

ANSI terminal colours and styles that auto-disable on non-TTYs and when NO_COLOR is set — colour output that never corrupts pipes or logs.

larzscript pkg install color
View on GitHub →Learn the stack

What you get

Try it

import "color" as c
print(c.green("ok") + " " + c.red("error") + " " + c.bold(c.cyan("title")))
c.set_enabled(false)
print(c.green("plain now"))
Output
ok error title
plain now

Why it's in the Larz Stack

larzcolor is a real Larzscript package (larzscript pkg install color) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.