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

change highlight color from an RGB value to Base.error_color() #74

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KristofferC
Copy link
Sponsor Member

@KristofferC KristofferC commented Aug 24, 2022

RGB colors have very spotty support in terminals so probably better to use something more well-supported. Base.error_color() is by default :light_red but can also be customized with an env var.

Ref #61

Edit: Okay I see there is this whole machinery for using RGBs so I guess this was a conscious choice. Waiting with this until there is a decision on what to do.

@KristofferC KristofferC marked this pull request as draft August 24, 2022 09:26
@c42f
Copy link
Member

c42f commented Aug 25, 2022

Yeah _printstyled() is my own machinery because Base isn't very flexible, so the base color codes won't work here.

RGB colors have very spotty support in terminals so probably better to use something more well-supported

I used RGB to satisfy my own desire for things to be pretty and to have sane mappings to color codes. But for general use we'll need something widely supported 👍

Unfortunately Base.printstyled can't do background colors I think? And it can't do reverse until Julia 1.7. So we probably still need a little of our own machinery here.

So we "just" need to figure out what's generally supported and do that. Can we use 255 colors for example, or do we need to limit ourselves to 16? Is reverse color better supported than background colors?

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 this pull request may close these issues.

None yet

2 participants