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 _256_palette to print in 256 colors? #45

Closed
dho825 opened this issue Sep 18, 2016 · 5 comments
Closed

Using _256_palette to print in 256 colors? #45

dho825 opened this issue Sep 18, 2016 · 5 comments
Assignees

Comments

@dho825
Copy link

dho825 commented Sep 18, 2016

How can this be achieved without using Rainbow or FigletText and only using screen.paint or screen.print with color maps?

@peterbrittain
Copy link
Owner

Assuming you are running a terminal that is capable of handling 256 colours, you just use the indices for the colour you want from the palette. For example, if you want a pale yellow use 229. You can find the complete colour scheme here: https://en.m.wikipedia.org/wiki/File:Xterm_256color_chart.svg.

If you're having problems getting 256 colours, have a look at the troubleshooting guide on this subject.

@imdaveho
Copy link

Oh whaat? that was easy...I was trying to call _256_palette directly but that was just a list of rgb at each step and didn't know how to combine them.

Probably due to my own lack of understanding with printing in 256 colors. Probably will dive deeper into how you're rendering it from the 256 palette, but any good resources to understand colors in terminal? I've basically ported over this project using asciimatics, just need to add some finishing touches

@peterbrittain
Copy link
Owner

@imdaveho The palette is only used for image to text conversion, using PIL. That's why it's this format - it's the one used by PIL.

As for general guides to terminals? You might want to look at xterm and see how it works. The FAQ might be a good start. But if you just want to know about colours, see here.

@peterbrittain
Copy link
Owner

@dho825 Did that answer your question too?

@imdaveho
Copy link

Thanks Peter, you can close this ticket :)

On Sep 20, 2016 12:21 PM, "peterbrittain" notifications@github.com wrote:

@dho825 https://github.com/dho825 Did that answer your question too?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#45 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANV4g4HZUunybGHULkHGna1PtdhgFphLks5qsAf3gaJpZM4KABmk
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants