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

Updated colors in color_print.py #154

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

Conversation

AlexIchenskiy
Copy link

Added colors from the TODO list using _print_token_factory

Added colors from the TODO list using _print_token_factory
@7eith
Copy link

7eith commented Apr 29, 2021

Hi, do you know how to use it (color) on a RawList or a List?

@AlexIchenskiy
Copy link
Author

Hi, do you know how to use it (color) on a RawList or a List?

Hey, try using style_from_dict to create style sheet and then apply it when you propmt your list like this:

`custom_style_1 = style_from_dict({
"separator": '#cc5454',
"questionmark": '#673ab7 bold',
"selected": '#cc5454', # default
"pointer": '#673ab7 bold',
"instruction": '', # default
"answer": '#f44336 bold',
"question": '',
})

Your code here

answers = prompt.prompt(your_list, style=custom_style_2)
pprint(answers)`

You can also check examples folder, all styles are stored in the init.py file.

@7eith
Copy link

7eith commented Apr 30, 2021

Yes thank's you,do you know if it is possible to print a different color for each choices in rawlist/checkbox ?

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.

2 participants