Skip to content

Force colour mode as option #71

Answered by ewels
thijsmie asked this question in Q&A
May 17, 2022 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

Hah, I was thinking / playing with this exact thing last night. You can already sort of force colours by using the COLOR_SYSTEM config:

import rich_click as click

click.rich_click.COLOR_SYSTEM = "truecolor"

(see the rich docs for which systems you can use).

I was also playing with the idea of adding a similar FORCE_TERMINAL config option to set force_terminal on the rich console object. I'm not entirely sure if that would be all that difference from setting the colour system though 🤔

Would either of these methods work for you?

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@thijsmie
Comment options

@ewels
Comment options

@thijsmie
Comment options

@ewels
Comment options

@ewels
Comment options

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