Skip to content
Discussion options

You must be logged in to vote

Spoiler

Found the solution while I wrote this answer. It is repr.ipv6, try the following:

from rich.theme import Theme
from rich.console import Console

console = Console(theme=Theme({"repr.ipv6": "red italic on yellow"}))

console.print("12:34:45")

My digging around before finding the solution

After digging around in the source code and learning about Style and Theme and Color classes, it seems to me as if this string is some kind of special case:

At least I found out that the used color is green (not cyan, which is the color for log.time).

I found out that the only colors that a string like this reacts to is the background color:

which, for my understanding is caused by syntax highlig…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@saschalalala
Comment options

@saschalalala
Comment options

@willmcgugan
Comment options

@saschalalala
Comment options

@saiwing-yeung
Comment options

Answer selected by saiwing-yeung
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants