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

Detecting true color #15

Open
cstjean opened this issue Aug 7, 2017 · 3 comments
Open

Detecting true color #15

cstjean opened this issue Aug 7, 2017 · 3 comments

Comments

@cstjean
Copy link

cstjean commented Aug 7, 2017

I have a package where I show numbers with a red->green color gradient. Is there a function that returns whether 24-bit color is supported?

Alternatively, it would be neat if I could write Crayon(foreground=nearest_ansi_color(121,0,40))

BTW, the README needs to be updated, Crayons.test_256_colors(shownumbers::Bool=true) doesn't support keyword arguments.

@KristofferC
Copy link
Owner

I think it is in general hard to ask the terminal if it supports true color. I thought a bit about if a 24 bit -> 256 color converter makes sense in this package. I think ImageInTerminal.jl has one.

In Crayons.test_256_colors(shownumbers::Bool=true), shownumbers is not a keyword argument, it is just a label of the argument so that it explains what it does. Maybe it's confusing.

@KristofferC
Copy link
Owner

@KristofferC
Copy link
Owner

There is now a function or ENV variable that can be set to have 24-bit Crayons print as 256 colored crayons.

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

No branches or pull requests

2 participants