Terminology is limited to only display 256 colors? #12

Open
opened 2023-04-19 18:32:14 -07:00 by Thanatermesis · 4 comments

I was making a NeoVim theme, when I noticed that the "very-dark purple" color was not showing up in the HEX value #1c1726 on my terminal (like in the half-right-side of the screenshot), I was trying other values without seeing any difference until inmediately changed to pretty much brighter color (like the colors appears only in big "steps")

Then I decided to install gnome-terminal to see what happens, surprised, it displays correctly the color I was trying to set (the one in the bottom-left)

https://i.imgur.com/5GGSPXN.png

I also tried to set the variable:

export COLORTERM=truecolor

and to disable the TERM checkbox option of 256 colors in the options... no effect, it looks like terminology is limited to a smaller amount of colors, which may be 256

Related: #6

I was making a NeoVim theme, when I noticed that the "very-dark purple" color was not showing up in the HEX value #1c1726 on my terminal (like in the half-right-side of the screenshot), I was trying other values without seeing any difference until inmediately changed to pretty much brighter color (like the colors appears only in big "steps") Then I decided to install gnome-terminal to see what happens, surprised, it displays correctly the color I was trying to set (the one in the bottom-left) https://i.imgur.com/5GGSPXN.png I also tried to set the variable: > export COLORTERM=truecolor and to disable the TERM checkbox option of 256 colors in the options... no effect, it looks like terminology is limited to a smaller amount of colors, which may be 256 Related: https://git.enlightenment.org/enlightenment/terminology/issues/6
raster was assigned by Thanatermesis 2023-04-19 18:32:14 -07:00
Author

I just found this handy way to test "truecolor" in terminals (try it in terminology & gnome-terminal):

awk -v term_cols="${width:-$(tput cols || echo 80)}" 'BEGIN{
    s="/\\";
    for (colnum = 0; colnum<term_cols; colnum++) {
        r = 255-(colnum*255/term_cols);
        g = (colnum*510/term_cols);
        b = (colnum*255/term_cols);
        if (g>255) g = 510-g;
        printf "\033[48;2;%d;%d;%dm", r,g,b;
        printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
        printf "%s\033[0m", substr(s,colnum%2+1,1);
    }
    printf "\n";
}'
I just found this handy way to test "truecolor" in terminals (try it in terminology & gnome-terminal): ``` awk -v term_cols="${width:-$(tput cols || echo 80)}" 'BEGIN{ s="/\\"; for (colnum = 0; colnum<term_cols; colnum++) { r = 255-(colnum*255/term_cols); g = (colnum*510/term_cols); b = (colnum*255/term_cols); if (g>255) g = 510-g; printf "\033[48;2;%d;%d;%dm", r,g,b; printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b; printf "%s\033[0m", substr(s,colnum%2+1,1); } printf "\n"; }' ```
Owner

terminology understands truecolor escapes but will approximate them down to 256 color because that is what eva's textgrid supports. it has 1 byte for fg and 1 byte for bg color. that's the public api/data struct exposed.

terminology understands truecolor escapes but will approximate them down to 256 color because that is what eva's textgrid supports. it has 1 byte for fg and 1 byte for bg color. that's the public api/data struct exposed.
Author

So terminology is compatible (not failing) with truecolors but doesn't displays them. Could be possible to make it displaying true colors? this can be useful for example in editor colors where it is limited and it jumps from "pure black" to "creamy purple" instead of having a dark purpleish tone like in the previous screenshot

Maybe as an option:

[ ] Enable TRUECOLORS to allow more than 256 colors (uses more memory)

Or even better, maybe making it to render true colors dynamically when it encounters these escape codes 😎

So terminology is compatible (not failing) with truecolors but doesn't displays them. Could be possible to make it displaying true colors? this can be useful for example in editor colors where it is limited and it jumps from "pure black" to "creamy purple" instead of having a dark purpleish tone like in the previous screenshot Maybe as an option: [ ] Enable TRUECOLORS to allow more than 256 colors (uses more memory) Or even better, maybe making it to render true colors dynamically when it encounters these escape codes 😎
Owner

don't use truecolro escapes then :) this would be similar to asking if it's possible for a commodor64 to display truecolor. it can't. it has 16 colors. evas's textgrid exposes colors with the above limit. terminology has to live with it. you'd have to create an altyernate evas textgrid api to expose much wider color fields in a parallel api and that doesn't exist.

don't use truecolro escapes then :) this would be similar to asking if it's possible for a commodor64 to display truecolor. it can't. it has 16 colors. evas's textgrid exposes colors with the above limit. terminology has to live with it. you'd have to create an altyernate evas textgrid api to expose much wider color fields in a parallel api and that doesn't exist.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: enlightenment/terminology#12
No description provided.