-
Notifications
You must be signed in to change notification settings - Fork 18
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
Parameterize color schemes #41
Comments
Hi @alysbrooks , From what I know about How you do think about the following implementation?
|
I made some experiments. Actually, I can change the color to even 256 color without changing any single line of code. For example, if I change the
|
Oh, after reading related issues more carefully, I find out that there are |
So it seems that Puget already allows customization through a custom printer? In that case I think there's not much more that needs to happen here, and it's more a matter of exposing this configuration in Kaocha's Note that not all terminals support full RGB colors, although it's relatively widely supported these days. The downside of RGB colors is that, because they are absolute, you basically have to also set the background, because you can't predict what contrast you'll get. Whereas with the basic 16(?) colors it's up to the terminal how they render that exactly, so the terminal's color scheme should ensure that there's a sensible amount of contrast. Which kind of goes back to the original issue, since we use these basic built-in colors ("red", "green"), rather than fully specified RGB colors, it's really up to the terminal color scheme to make sure they render ok on the default background. |
Reading through the code and this discussion, I think we should take the following steps:
I'm not sure my idea for color schemes really makes sense for I think @humorless and I could split these among ourselves, unless you have time/interest, @plexus? |
Sounds good, you can go for it. |
This is a nice compromise for #14, thanks @alysbrooks and @humorless! I just used the updated docs to change deletion and insertion highlighting which made it much easier for me to see diffs in a large data structure. ❤️ |
Currently, colors are hard-coded, but there are various situations where you might want to set different colors:
In addition to general usefulness, parameterizing color schemes may address #14 and would be required for lambdaisland/kaocha#403.
The text was updated successfully, but these errors were encountered: