... rich: theme


Here's the code used in this video.

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

custom_theme = Theme({
    "good" : "green",
    "bad": "bold red"

console = Console(theme=custom_theme)
console.print("File downloaded!", style="good")
console.print("File corrupted!", style="bad")
console.print("The internet is [bad]down![/bad]")

Feedback? See an issue? Something unclear? Feel free to mention it here.

If you want to be kept up to date, consider signing up for the newsletter.