PyInquirer icon indicating copy to clipboard operation
PyInquirer copied to clipboard

Color the questions with different colors

Open tede12 opened this issue 5 years ago • 1 comments

How can I change color on different questions?

from colorata import Fore
choice = prompt([
            {
                'name': 'start',
                'type': 'list',
                'message': 'Which pizza would you like?',
                'choices': [
                     'Margherita',
                     'Pepperoni and cheese',
                     'Mozzarella',
                     f'{Fore.RED}Exit{Fore.RESET}'  
               ]
            }
        ], style=default_style)['start']

why this line f'{Fore.RED}Exit{Fore.RESET}' is not interpreted? (it is represented like this ^[[31mExit^[[39m) How can I change color on a single question?

tede12 avatar Jan 24 '20 18:01 tede12

I dont think thats supported at the moment

CITGuru avatar Jan 25 '20 22:01 CITGuru