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

Setup Rich Styles for output formatting #115

Open
briancohan opened this issue Aug 16, 2021 · 1 comment
Open

Setup Rich Styles for output formatting #115

briancohan opened this issue Aug 16, 2021 · 1 comment

Comments

@briancohan
Copy link
Contributor

We should try to create styles like the following to make things a bit more consistent across the application

from rich.console import Console
from rich.theme import Theme
custom_theme = Theme({
    "info" : "dim cyan",
    "warning": "magenta",
    "danger": "bold red"
})
console = Console(theme=custom_theme)
console.print("This is information", style="info")
console.print("[warning]The pod bay doors are locked[/warning]")
console.print("Something terrible happened!", style="danger")

https://rich.readthedocs.io/en/stable/style.html

@mustafaquraish
Copy link
Contributor

Does this also sync with the colours textual uses?

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

No branches or pull requests

2 participants