-
Notifications
You must be signed in to change notification settings - Fork 12
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
Lineplot has a limited number of colors to choose from. #34
Comments
Awosome! @nanobowers |
Hi @mrkn and @kojix2 , per #29 :
I have looked some at red-colors and red-palette. I understand the reason to use them, but as they exist I believe they may be insufficient for handling ANSI colors without adding features from something like: https://github.com/janlelis/paint/blob/main/lib/paint.rb Specifically, we need a way to detect or specify either 8/16/256/24-bit color modes, and support the conversion of color-spaces (e.g. RGB: "#C0FEFE") to/from the appropriate ANSI codes in any of the above color-modes. Some of this is part of red-colors, but some is not (Or I did not see it). Apparently 256 / 24-bit detection is not always easy due to differences in terminals and this can be hard to do well (e.g. differences in Mac vs. Linux, etc) In any event, i believe there needs to be a decision on how to either
|
I've create a pull-request to add We need to define how to blend the ANSI 16 colors and xterm's 256 colors in I think we can start without supporting user-defined ANSI 16 colors palette, but there are two options in this case:
|
@mrkn I am now running into this issue in trying to enable heatmap support. For heatmap, storing the colors as Colors::RGB objects is preferable compared to a single integer. This way the renderer can choose between output of xterm256 color or 24-bit output. As you mention, it is unclear what to do here with regard to existing 16-color ansi support, especially with blending - one option I thought of is
The other thought I have is that with the lineplot case, the blending would happen successively and depending on the blending algorithm you may get different results. E.g. if the mixing used averaging applied in series, for one ordering of Red color data, would get average(average(130,70), 170) = 135, whereas another ordering average(average(130,170),70) = 110 |
So this issue is still going on... |
@kojix2 I believe this is waiting on this pr: red-data-tools/red-colors#13 |
@nanobowers Thank you for reminding your pull-request. @kojix2 As I mention in the pull-request, I need more time to find the appropriate distance function for deciding closest color. |
Moreover, we need to decide how to blend two or more colors. Maybe we need a way to specify the terminal background color. |
Barplot
OK.
Lineplot
Error
The text was updated successfully, but these errors were encountered: