This guide covers user-facing terminal output, including shared output and command-specific interactive states.
User-facing output code should use the semantic roles in src/cli/style.zig
instead of referencing raw ANSI colors directly. Keep raw ANSI constants as the
low-level palette only; changing a role mapping should update all matching
output without searching business workflows for individual color names.
- Header / table header: Use ANSI
cyan. - Primary text: Use the terminal's default foreground color.
- Secondary text: Use ANSI
dim. - Footer / key hints: Use ANSI
cyan. - Live refresh status line: Use ANSI
cyan. - Status / in-progress action: Use ANSI
cyan. - Configuration key: Use ANSI
bold. - Warning / non-fatal status: Use ANSI
cyan.
| UI element | Color |
|---|---|
| Header / table header | cyan |
| Live refresh status line | cyan |
| Footer / key hints | cyan |
| Primary content | Default terminal foreground |
| Success message | green |
| Error / failure message | red |
| Hints and user input labels | cyan |
These rules only cover special interactive states. Shared header, footer, live refresh, normal text, success, and error colors still follow the common rules above.
| UI element | Color |
|---|---|
| Active row | green |
| Cursor row | green |
The switch cursor is the row marked with >. It is the account that Enter would switch to. The active row is marked with *.
Priority:
- Active row:
green - Cursor row:
green - Error / unavailable row:
red - Normal row: default terminal foreground
| UI element | Color |
|---|---|
| Active row | green |
| Cursor row | green |
| Checked row | green |
Priority:
- Active row:
green - Cursor row:
green - Error / unavailable row:
red - Checked row:
green - Normal row: default terminal foreground
- Avoid custom colors because there is no guarantee that they will contrast well or look good in different terminal themes.
- Avoid ANSI
blackandwhiteas foreground colors because the terminal's default foreground usually provides better contrast. Useresetto return to the default foreground. - Avoid ANSI
blueandyellow. Prefer a foreground color listed above.