Add color output utilities and tests#1248
Open
penww wants to merge 1 commit into
Open
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
- 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>
Contributor
Author
|
Hi @skyegalaxy, do you have suggestions for this PR? |
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. |
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Fixes #1222
No color:

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
NO_COLOR,FORCE_COLORenv spec for CLI: https://no-color.org, https://force-color.org