Closed cmdoret closed 2 years ago
The issue isn't that COLORTERM
is not set, but that your number of colors is 88, which we thought wasn't really something we'd run into anymore. We added support for 0, 4, 8. 16. 256, and 16.7m (24-bit) colors. Out of curiosity, what OS is this cluster operating on?
Thanks for clarifying, It's running RHEL 7.6. Would adding support for 88 colors have any drawbacks ?
That's not standard for RHEL 7, I think even if you're using rxvt. I was expecting something more exotic or esoteric :) The main downside of supporting 88 colors is it uses a different color chart than everything else. So it just means more data and some if statements to determine which color chart to use (256 or 88). The other thing is figuring out the RGB values for the 88 color chart. I had this at one point, but I can't find it now. I've tried to generate one on my Fedora system, but the palette seems off. It seems very pink and cyan without any grays. Do you actually need 88 colors or would it work if we treated 88 colors like 16 colors?
16 colors would actually work fine here :smiley: . In my use case blessed is used as dependency by another program to display a bunch of progress bars, so I would rather have a weird looking palette than the program crashing.
I was actually able to find the color table I had before for 88 colors. I can't remember how I derived it (that was a couple years ago), but the colors seem sane. Not that it means the palette applied to any given terminal is going to be sane.
@jquast, I'll put a PR together, but what is your preference, treating 88 colors as 16 colors or adding the 88 color table back in?
Whichever you prefer is fine with me @avylove, thank you for your help!
I remember studying & disregarding 88 colors as legacy, I was unable to test at the time, but here we are :)
I tried for a while and could not find a good way to know if the values in my old table were valid. I think it would require compiling some version of rxvt from source and enabling 88 colors. So I went with the easy path. We can revisit later if it's an issue for anyone.
I tried running blessed on a university cluster, where the
COLORTERM
variable is not set by default. Creating an instance ofblessed.Terminal
throws anAssertionError
.tput colors
yields 88, which doesn't match the list of values innumber_of_colors
. I realize havingCOLORTERM
not set is potentially a misconfiguration on the system, but would it be desirable to just throw a warning, or at least have an informative error message ?