Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: What happens when passing `fg=...,fg=...' to region_highlight, how is this defined?



Just thought that maybe Zsh just sums up the color indices :)
Immediate confirmation is not there, 169...171 (114+55, etc.) goes
from reddish to a purple.

However looking little up, there is 157, 158, 159 that apparently
matches the colors of $PATH in the attached image.

I use this to see the palette:
 ▲ ~ which palette
palette () {
    for n in {000..255}
    do
        colors+=("%F{$n}$n%f")
    done
    print -cP $colors
}
On Tue, 11 Sep 2018 at 15:17, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> Hello,
> I'm trying to go shortcut in my plugin and in one place just append
> `,fg=...' after existing `fg=...', obtaining e.g. `fg=114,fg=55',
> hoping the last one will overwrite the first one.
>
> Well, maybe it's too hard stated that I plan to do this, I just
> checked if this works and obtained surprising results. Check out
> attached file for the results, it is also uploaded to my shell
> account: http://psprint.blinkenshell.org/fg-114,fg-55..57.png (the
> file is pngcrush-ed, to limit message size).
>
> So it's about the word "$PATH". First line is fg=114,fg=55, then
> second line goes fg=114,fg=56, and third goes fg=114,fg=57 in the
> region_highlight element. All 3 colors of $PATH differ in the image.
> Actual color 114 is PaleGreen3 (color names from:
> https://jonasjacek.github.io/colors/), actual 55..57 go from purple to
> violet, all in dark brightness.
>
> But the output, i.e. color of word "$PATH" in attached image, goes
> from light green to light cyan.
>
> So what's happening? I've tested 2 terminals, iTerm and ExtraTerm.
> Also tried other combinations of colors, the results were similar, but
> here I just focused on the three 55..57. I write because I sense some
> possible feature heh? Some mixing of colors? Or some bug in a more
> serious situation than this `double-fg=' case.
>
> --
> Sebastian Gniazdowski
> News: https://twitter.com/ZdharmaI
> IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
> Blog: http://zdharma.org



-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org



Messages sorted by: Reverse Date, Date, Thread, Author