libvterm color palette

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

libvterm color palette

Marcin Szamotulski
Hello vim_use,

Is there a way to redefine color palette used by the `:terminal`
(libvterm)?

Best regards,
Marcin

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: libvterm color palette

Bram Moolenaar

Marcin Szamotulski wrote:

> Is there a way to redefine color palette used by the `:terminal`
> (libvterm)?

No, but you can use RGB colors ('termguicolors').

--
hundred-and-one symptoms of being an internet addict:
185. You order fast food over the Internet

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: libvterm color palette

Marcin Szamotulski
On 23:36 Sat 23 Sep     , Bram Moolenaar wrote:
>
> Marcin Szamotulski wrote:
>
> > Is there a way to redefine color palette used by the `:terminal`
> > (libvterm)?
>
> No, but you can use RGB colors ('termguicolors').

I am using termguicolors and the forground and background colors are
right.  The other colors just do not match, I will set them in my
zsh theme then.

Thanks,
Marcin

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: libvterm color palette

Magnus Woldrich
Check out colorcoke[0] (for a user interface) and Term-ExtendedColor-Xresources[1] for how you can redefine all terminal colors.



On Sat, Sep 23, 2017 at 11:50 PM, Marcin Szamotulski <[hidden email]> wrote:
On 23:36 Sat 23 Sep     , Bram Moolenaar wrote:
>
> Marcin Szamotulski wrote:
>
> > Is there a way to redefine color palette used by the `:terminal`
> > (libvterm)?
>
> No, but you can use RGB colors ('termguicolors').

I am using termguicolors and the forground and background colors are
right.  The other colors just do not match, I will set them in my
zsh theme then.

Thanks,
Marcin

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: libvterm color palette

Nikolay Aleksandrovich Pavlov
In reply to this post by Bram Moolenaar
2017-09-24 0:36 GMT+03:00 Bram Moolenaar <[hidden email]>:
>
> Marcin Szamotulski wrote:
>
>> Is there a way to redefine color palette used by the `:terminal`
>> (libvterm)?
>
> No, but you can use RGB colors ('termguicolors').

I remember this issue popping up in Neovim bug tracker and it was
found that while libvterm provides a way to alter RGB of first sixteen
colors, what Neovim then allows to do as well (BTW, does Vim allow
that?), rest of the palette is not only non-overridable, but uses a
rather rough approximation that does not quite match colors used by
xterm and adopted by other terminals.

That is a single function though which maps color indexes to RGB
colors and can easily be fixed in Vim codebase since it does not have
libvterm as a dependency, but have it merged into its codebase
instead.

>
> --
> hundred-and-one symptoms of being an internet addict:
> 185. You order fast food over the Internet
>
>  /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
> ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\  an exciting new programming language -- http://www.Zimbu.org        ///
>  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: libvterm color palette

Bram Moolenaar

Nikolay Pavlov wrote:

> 2017-09-24 0:36 GMT+03:00 Bram Moolenaar <[hidden email]>:
> >
> > Marcin Szamotulski wrote:
> >
> >> Is there a way to redefine color palette used by the `:terminal`
> >> (libvterm)?
> >
> > No, but you can use RGB colors ('termguicolors').
>
> I remember this issue popping up in Neovim bug tracker and it was
> found that while libvterm provides a way to alter RGB of first sixteen
> colors, what Neovim then allows to do as well (BTW, does Vim allow
> that?), rest of the palette is not only non-overridable, but uses a
> rather rough approximation that does not quite match colors used by
> xterm and adopted by other terminals.
>
> That is a single function though which maps color indexes to RGB
> colors and can easily be fixed in Vim codebase since it does not have
> libvterm as a dependency, but have it merged into its codebase
> instead.

I suppose the xterm source code must contain the "source of truth".
I was assuming Leonerd took it from there, but perhaps he didn't.
Should be easy to fix, but I wonder if Paul will want to take it over.

--
hundred-and-one symptoms of being an internet addict:
190. You quickly hand over your wallet, leather jacket, and car keys
     during a mugging, then proceed to beat the crap out of your
     assailant when he asks for your laptop.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: libvterm color palette

Grant Taylor-2
On 09/24/2017 11:46 AM, Bram Moolenaar wrote:
> I suppose the xterm source code must contain the "source of truth".
>  I was assuming Leonerd took it from there, but perhaps he didn't.
> Should be easy to fix, but I wonder if Paul will want to take it over.

The last time I went digging for color information in XTerm, I was ...
disappointed.  It seems as if XTerm's colors are somewhat fluid and were
never truly set in stone.  (At least that's my understanding.)

Perhaps my (limited) research was based on distro's (modified?) versions
of XTerm.  -  Though I don't recall hard answers from the authors page
either.

I ended up installing Linux in a VM, and matching the colors from
console (not X) output.  -  I then set them in my .Xdefaults file.

Note:  These colors differ from the colors that Microsoft used for cmd.exe.



--
Grant. . . .
unix || die




--
Grant. . . .
unix || die

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: libvterm color palette

Erik Christiansen
On 24.09.17 14:57, 'Grant Taylor' via vim_use wrote:
> On 09/24/2017 11:46 AM, Bram Moolenaar wrote:
> > I suppose the xterm source code must contain the "source of truth".  I
> > was assuming Leonerd took it from there, but perhaps he didn't. Should
> > be easy to fix, but I wonder if Paul will want to take it over.
>
> The last time I went digging for color information in XTerm, I was ...
> disappointed.  It seems as if XTerm's colors are somewhat fluid and were
> never truly set in stone.  (At least that's my understanding.)

Indeed not set in stone, as they're in a file that is so easy to edit
with nothing more than vim. But the 700+ colours in
/usr/share/X11/rgb.txt have not changed intrusively over the last 3
decades, in my experience. (goldenrod, salmon, wheat, darkslategrey are
all still there). There is one colour less in
/home/src/vim/runtime/rgb.txt here, but yours may be more up to date.

The colour and filename consistency has endured across hp-ux, solaris,
and linux over those 3 decades, and  I've just set foreground and
background colours in the xterm, for consistency across vim, mutt,
shell, etc. And I've not noticed any drift in yellow or darkslategrey
over that time - so stable enough for a changeless experience.

Erik

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: libvterm color palette

Bram Moolenaar
In reply to this post by Grant Taylor-2

Grant Taylor wrote:

> On 09/24/2017 11:46 AM, Bram Moolenaar wrote:
> > I suppose the xterm source code must contain the "source of truth".
> >  I was assuming Leonerd took it from there, but perhaps he didn't.
> > Should be easy to fix, but I wonder if Paul will want to take it over.
>
> The last time I went digging for color information in XTerm, I was ...
> disappointed.  It seems as if XTerm's colors are somewhat fluid and were
> never truly set in stone.  (At least that's my understanding.)
>
> Perhaps my (limited) research was based on distro's (modified?) versions
> of XTerm.  -  Though I don't recall hard answers from the authors page
> either.
>
> I ended up installing Linux in a VM, and matching the colors from
> console (not X) output.  -  I then set them in my .Xdefaults file.
>
> Note:  These colors differ from the colors that Microsoft used for cmd.exe.

The xterm file 256colores.h appears to contain the table.
The color cube numbers are 0X00, 0X5F, 0X87, 0XAF, 0XD7 and 0XFF.
While libvterm uses        0x00, 0x33, 0x66, 0x99, 0xCC and 0xFF.
Looks like a difference between a linear and a log scale.

The list of 24 grey colors is also different.  libvterm goes from 0x00
to 0XFF, xterm from 0x08 to 0xEE.

--
hundred-and-one symptoms of being an internet addict:
194. Your business cards contain your e-mail and home page address.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.