Subject: Re: bug#79298: patch: full color in windows terminal

From: Eli Zaretskii <[email-masked]>
Date: Wed, 27 Aug 2025 15:11:15 +0300

> Date: Wed, 27 Aug 2025 04:29:00 +0000
> From: Ewan <[email-masked]>
> 
> On Tuesday, August 26th, 2025 at 4:03 AM, Eli Zaretskii <[email-masked]> wrote:
> >
> > > > Can you identify those formulas in the patch you submitted?
> > >
> > > In lisp/term/w32console.el, the definition and application of convert-to-16-bit
> > > in the body of w32con-define-256-colors, and the overall of shape of the
> > > w32con-define-N-colors functions.
> 
> Note, those functions appear to be pulled, with minor changes, from xterm.el.
> 
> > > In src/w32console.c, within turn_on_face, the conversions of fg and bg which
> > > yield substituends in the calls to snprintf .
> >
> >
> > Thanks. Is there some Microsoft documentation that describes how to
> > convert fg and bg colors to virtual console escape sequences? If so,
> > can you point to it?
> 
> The conversion is derived from the table in this spec:
> https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#text-formatting

Thanks.  I think with this information, and with the rewriting to make
the code more concise (as we already discussed), the actual code taken
from the other person is mall and/or trivial enough for us not to
bother about the legal issues.

> I can also include the link in the source code, but it may go dead some day.

Please do include the link.  We will update it as needed.