hi how to color text in basic cli I had example somewhere but I lost it.
You could use this https://github.com/lukewilliamboswell/roc-ansi
I am working in raw terminal mode so I have also this option
-withColor : Str, [Red, Green, Blue]-> Str
-withColor = \str, color ->
- when color is
- Red -> "\u(001b)[31m\(str)\u(001b)[0m"
- Green -> "\u(001b)[32m\(str)\u(001b)[0m"
- Blue -> "\u(001b)[34m\(str)\u(001b)[0m"
Above seems a bit hack-y
What I wanted is something more native for basic-cli but also not external dependency
I will think what is better
Last updated: Jul 06 2025 at 12:14 UTC