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

Coloured text in TextBlocks #79

Open
WalrusGumboot opened this issue Jan 10, 2021 · 2 comments
Open

Coloured text in TextBlocks #79

WalrusGumboot opened this issue Jan 10, 2021 · 2 comments
Labels
Colors Issue with Colors Core Add for issues having to do with core functions Feature Request Add for a new feature request
Milestone

Comments

@WalrusGumboot
Copy link

Is your feature request related to a problem? Please describe.
I'm writing a UI for a program I made that uses candlestick charts. For those who aren't familiar, a candlestick chart is a diagram used in finance to visualise what is happening to a certain company, they look like this:
image
The colour of the bars is important here: green means the price rose, red means it dropped. I'm using a library called termgraph to draw them, and it in turn uses colorama to provide the colour.
Describe the solution you'd like
The ANSI escape codes (like \u001b[31m for red and \u001b[32m for green) should be rendered as that colour.

@WalrusGumboot WalrusGumboot added the Feature Request Add for a new feature request label Jan 10, 2021
@jwlodek
Copy link
Owner

jwlodek commented Jan 10, 2021

I agree that this would be a nice feature, but, as far as I know, curses (which is what py_cui uses under the hood for terminal rendering), does not support ANSI escape code based color markers. I think what would have to be done is to add functions that manually translate the escape codes into the supported format for the renderer, which would then convert those to curses commands to draw to the screen.

@jwlodek jwlodek added Colors Issue with Colors Core Add for issues having to do with core functions labels Jan 10, 2021
@jwlodek jwlodek added this to the v1.0.0 milestone Jan 10, 2021
@robermp
Copy link

robermp commented May 8, 2024

i'm also interested in this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Colors Issue with Colors Core Add for issues having to do with core functions Feature Request Add for a new feature request
Projects
None yet
Development

No branches or pull requests

3 participants