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

Using ANSI colors #296

Open
1 task done
sshakoor1 opened this issue Jul 10, 2023 · 3 comments
Open
1 task done

Using ANSI colors #296

sshakoor1 opened this issue Jul 10, 2023 · 3 comments
Labels
Enhancement New feature or request

Comments

@sshakoor1
Copy link

Question

Is it possible to color a SINGLE word in a questionary string using ANSI characters? Or is there any way to do this at all(with or without ANSI code)?

What have you already tried?

class colors:
    GREEN    = '\033[92m'
    RESET    = '\033[0m'

questionary.text("What's your" + colors.GREEN + " first " + colors.RESET + "name?").ask()

Read the documentation

  • I have checked to ensure that my question is not answered by the documentation.
@sshakoor1 sshakoor1 added the Question Further information is requested label Jul 10, 2023
@kiancross kiancross added Enhancement New feature or request and removed Question Further information is requested labels Jul 10, 2023
@kiancross
Copy link
Collaborator

Unfortunately, this isn't possible. I've added the 'enhancement' label to this issue so that it might be implemented in the future.

@semibroiled
Copy link

Hey, what are the contribution guidelines? I already implemented this in a personal project, I can give it a shot.

@sshakoor1 to clarify, what you tried did not work or its a workaround you had to do? Thnx!

@kiancross
Copy link
Collaborator

Hey, what are the contribution guidelines? I already implemented this in a personal project, I can give it a shot.

Information on how to contribute is here. A PR would be very much appreciated, although I am a bit slow to review at the moment...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants