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

How do colours work in Text()? #12

Open
mchangun opened this issue Mar 16, 2021 · 1 comment · May be fixed by #20
Open

How do colours work in Text()? #12

mchangun opened this issue Mar 16, 2021 · 1 comment · May be fixed by #20

Comments

@mchangun
Copy link

How do I know which number corresponds to which colour?

@Helveg
Copy link
Contributor

Helveg commented Mar 12, 2024

The numbers you're referring to are ANSI color codes.

ANSI escape codes are a standard for in-band signaling to control cursor location, color, font styling, and other options on video text terminals and terminal emulators. In Blessed, the underlying library, these codes are used to set colors.

Here's a mapping of color codes to colors in Blessed:

0: Black
1: Red
2: Green
3: Yellow
4: Blue
5: Magenta
6: Cyan
7: White

These are the basic colors. In some terminal configurations, these colors may be different due to customization or the terminal's color scheme.

@Helveg Helveg linked a pull request Mar 22, 2024 that will close this issue
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 a pull request may close this issue.

2 participants