Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very limited support for colors and bold/bright #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PeterMitrano
Copy link

@PeterMitrano PeterMitrano commented Sep 8, 2020

Motivation

I like to print things with color, using Colorama in python this is super easy.

from colorama import Fore, Style, init
import colorama
colorama.init(autoreset=True)
rospy.loginfo(Fore.RED + Style.BRIGHT + "bold and red!")

However, this would shows up in the rqt console with no color and lots of ugly ansi codes

What this does

makes foreground/background color and bold work, via the standard model/view abstraction mechanisms. One pitfall could be the regex I came up with it. It's possible it has false positives.

Here's a screenshot of what it looks like for me with some test logs messages

2020-09-08-002906_1909x203_scrot

TEST:
from colorama import Fore, Style, init
import colorama
colorama.init(autoreset=True)
rospy.loginfo(Fore.RED + Style.BRIGHT + "bold and red!")
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.

1 participant