Skip to content

Add color output utilities and tests#1248

Open
penww wants to merge 1 commit into
ros2:rollingfrom
penww:feat/color_support
Open

Add color output utilities and tests#1248
penww wants to merge 1 commit into
ros2:rollingfrom
penww:feat/color_support

Conversation

@penww

@penww penww commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

This is the first PR to introduce colorized output support for ROS 2 commands. Once the approach is aligned on and approved, I will proceed with adding color support to more commands.

Description

Add helpers for supporting color output for ros2cli.

  • Add cross-platform ANSI color helpers via colorama.
  • Support NO_COLOR and FORCE_COLOR env based switch control.
  • Apply color to ros2node info output as a reference integration.

Fixes #1222

image

No color:
image

Is this user-facing behavior change?

Yes, the user can see color output as default.

Did you use Generative AI?

Assissted-by: Claude Code (Claude Sonnet 4.6)

Additional Information

@mergify

mergify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

- Add cross-platform ANSI color helpers via colorama.
- Support NO_COLOR and FORCE_COLOR env based switch control.
- Apply color to ros2node info output as a reference integration.

Signed-off-by: Peng Wang <penwang@qti.qualcomm.com>
@penww

penww commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi @skyegalaxy, do you have suggestions for this PR?

@penww

penww commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi @fujitatomoya, @kscottz, and @StefanFabian, I've moved the color support work to this PR. Thanks for all the valuable suggestions on #1223. I'd appreciate it if you could take a look and share any additional feedback or suggestions.

@kscottz

kscottz commented Jul 10, 2026

Copy link
Copy Markdown

Thanks @penww. Just a heads up it takes a week or two to get fresh PRs assigned through our regular meeting. We'll get you a review just as soon as is feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add optional colorized output support

3 participants