From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11613 invoked from network); 18 Jul 2023 10:27:34 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 Jul 2023 10:27:34 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1689676054; b=fsTqDzZEj2hJIi24CKhoBFtRjmCCcz/Yi2AvZnSYDHAd9L0ljloimCE1T3b/25oJf2hf5l2KQE wkmWe7AyS6Bfs5EZWDb4tClEvgxbpvJJrvmgWts+n9EBjPezUKbFrkHf15f/LHXcI++HK0nSIx bMwdzYJ5qIyppEuPTrL5z1SvQERTGfrRG3Myxm+R5oDHwKvyBZbzh7WVsZJ1fUCfdrajF363dx PdZklvSjdT8xX1Q3QKzGRo8BCUI2b54MSWXIzh4kwENhGQ9RRpSATbqJnDJiEwbhwQ2iMLMmpx 6dNzn/OcPdzZ9POiyLiGk4+b0f/oBr4LF9JoY3JsMDNj+g==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-il1-f170.google.com) smtp.remote-ip=209.85.166.170; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1689676054; bh=CR83LM5PwXf6aUc7VawFcxDcsrCQasvvXoD3EacjKlg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:Reply-To: In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=iOmk/At3zGRryczWIHBpTgfWv2w9cyleF+oeCoEPbADseoWRcO2AZEptqoG8Km89nsZ/o1qOQd wQfgGLItX/lITjrS+qMI+0fZecPWQ9DRivRd8yn8VjQ1tsL3mUjhe0XhmpWOMBibYE9HdrrS0k XOr7HHiia3hditfwcLmRz1FfmzsNR2dexVzDaIYAAhRMao8/tWgdXqr5Ced1eJxtXIVEGN/Rqd dtfNnyOLAEnqcriXFawO/n2b85VhqtlBgW0VK9b7I3aOyx9FXIq9XaRatLD3w9P8DSZxjI+qO8 Hcmyg6Qp9lhkLePYvPyE1/JpdQoADTAtq98jz6PiQli2/w==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:Reply-To:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=E9RgWPxuHum5wOAY3l14rnU/fXUgtgrUEv+NU3Ez3pg=; b=aMKQCteadji4EB/xBJQrTi9f3I aPJJFB+QDezK0Ht6lyMKTQ1R72VjyrbRBRcLhjiiZaij3y2m9kijv9AaxmiUu3rsl7Yl6vcVN94Mt 1x9AV0bqyY7ej2EzBGZm8iGKJgo0U7Rp1Vm32jrnMCjOw3mph8F+CWxAKdQnl04JwiBgBjvreCJAf BjwZdyDSYwn1gWERlLegSXmFUQNLIhk55dhQCAEjb5ovf+3S1ZQkihwkSZo7lI0ZdtP3RjsOs9YmC 97eGprpq1O+CWHvGjPEzeEn1q4ZRWaHDfiFZlpGbLiE7Vo4FYTP+oBjBG2D2+n4X7zuyRl5V1ml6L 3eMbTR+A==; Received: by zero.zsh.org with local id 1qLhva-000Oev-Mb; Tue, 18 Jul 2023 10:27:34 +0000 Authentication-Results: zsh.org; iprev=pass (mail-il1-f170.google.com) smtp.remote-ip=209.85.166.170; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-il1-f170.google.com ([209.85.166.170]:47211) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qLhv0-000OJu-JG; Tue, 18 Jul 2023 10:27:00 +0000 Received: by mail-il1-f170.google.com with SMTP id e9e14a558f8ab-3460815fde5so35208305ab.2 for ; Tue, 18 Jul 2023 03:26:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689676017; x=1692268017; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=E9RgWPxuHum5wOAY3l14rnU/fXUgtgrUEv+NU3Ez3pg=; b=Euu/EtY4q1YZ3uO9yyKUKNLicSZ7+AQbg1t14rDPQgK8xB+6TUUkC/n56Z6yVOypL8 w/N0lYRtYmULyZFqfjnbYc46DgwbtnXrQIWfAMrBoj9FSk9cjh1+nYt30W2G1Tddg1fX ryKVqGzoYLxNwyq7WmhGyGCoCbRZaK1jfawaUhsoyixwzI2RDgPt5ALzokgeGFHGZzTb GSkJ+FSTNXT1jBs4lSn4SiKMDgxKlAcM9WZYwNseveLU3oa5Auqn/o3ruNEhPUyw+zfd zKD3iyZpRsxNEXr4CqQZzLT0gKIs8X2/0PjzZPpG7E9f4kc2Acxe4RNUbgLKgjCi1j+/ u0wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689676017; x=1692268017; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=E9RgWPxuHum5wOAY3l14rnU/fXUgtgrUEv+NU3Ez3pg=; b=P4xNZAx4e5DqSHa4PrrUE/rg+34t+Ci19QJLCsrL22EiATGwSYHu0wl3M0iM/fA8Fz aLDoN9USF+aXDxggNcMXj50cN45NI3P+qIxFk8HWs9ly1ddG03hpaZFR6+aVVtmn0yVB 0eR9TJnQHXp5LqsqN21nIipLkg2m2ndJTy81Oqy+/Ejf5yRTNM3DvjclQKi8AF2AhnVu HpHd9UFBaPXjzfs0VZODzzdytpWnjKl3wzmCRIlxjejtv21wQuPsIWk0t8Eo5Hld+r2o uWX/2ndmSA8n0gS3yHOqZ/vIUIKZn8oC1P3lTt+yCk62KHWJQe2cLB/UnZeLww1cQky+ FbfA== X-Gm-Message-State: ABy/qLaUBgs5E78onLqRgvAxEbSTK26384jz6qyOUOUSxZ+XuvYbMg+N YRO27N8dC3flwpZbE7te+UOinB0o5e/9qiF1RA0= X-Google-Smtp-Source: APBJJlErQ+ShAPg4j18d9LqMWRvugrM2AsOU8O63jeLqpGlCjAYFMrN0gKCqThFYwGZaztD/QzhEakU39+GiBCSd3Vw= X-Received: by 2002:a05:6e02:1bc7:b0:346:7a41:6c62 with SMTP id x7-20020a056e021bc700b003467a416c62mr2641469ilv.15.1689676017197; Tue, 18 Jul 2023 03:26:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Reply-To: linuxtechguy@gmail.com From: Jim Date: Tue, 18 Jul 2023 05:26:46 -0500 Message-ID: Subject: Re: possible PATCH to colors function To: Bart Schaefer Cc: devs Content-Type: multipart/alternative; boundary="000000000000ca66280600c05ae1" X-Seq: 51959 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --000000000000ca66280600c05ae1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jul 17, 2023 at 1:48=E2=80=AFPM Bart Schaefer wrote: > On Mon, Jul 17, 2023 at 11:40=E2=80=AFAM Bart Schaefer > wrote: > > > > Just for interest, try this: > > % colors > > % print -r $'\e['$color[faint]\;${color[bright-red]}m88888${reset_color= }\ > > $'\e['${color[red]}m88888${reset_color}\ > > $'\e['${color[bright-red]}m88888${reset_color} > > Might be easier to see with :gs/red/yellow > > In fact with yellow I can see a difference between "faint yellow" and > "faint bright-yellow" whereas that's not obvious to me with red. > > print -r $'\e['$color[faint]\;${color[yellow]}m#####${reset_color}.\ > $'\e['$color[faint]\;${color[bright-yellow]}m#####${reset_color}.\ > $'\e['${color[yellow]}m#####${reset_color}.\ > $'\e['${color[bright-yellow]}m#####${reset_color} > Hopefully I didn't miss something with your answers, or misinterpreted it. I get the same results with your code. But the patch has to do with ${color[bold]}. Without faint the result of bold is the same for and . With faint the result is different intensity. w/o faint both and produces one intensity with faint both and produces a different intensity The following should demonstrate what I'm trying to say. I added ${color[reverse]} as I believe it makes it a bit easier to see the difference. print -r \ $'\e['${color[faint]}\;${color[bright-yellow]}\;${color[reverse]}m${(r.10.. .)}${reset_color}\ $'\e['${color[faint]}\;${color[yellow]}\;${color[reverse]}m${(r.10.. .)}${reset_color}\ $'\e['${color[yellow]}\;${color[reverse]}m${(r.10.. .)}${reset_color}\ $'\e['${color[bright-yellow]}\;${color[reverse]}m${(r.10.. .)}${reset_color= } print -r \ $'\e['${color[bold]}\;${color[faint]}\;${color[bright-yellow]}\;${color[rev= erse]}m${(r.10.. .)}${reset_color}\ $'\e['${color[bold]}\;${color[faint]}\;${color[yellow]}\;${color[reverse]}m= ${(r.10.. .)}${reset_color}\ $'\e['${color[bold]}\;${color[yellow]}\;${color[reverse]}m${(r.10.. .)}${reset_color}\ $'\e['${color[bold]}\;${color[bright-yellow]}\;${color[reverse]}m${(r.10.. .)}${reset_color} I do not have gnome-terminal installed on my system but am using xfce4-terminal as my primary terminal. TERM is set to vte-256color except where I am using tmux then TERM is set to tmux-256color BTW, xfce yellows are very different from one another is a brown, where is yellow. Since gnome and xfce are both based on vte, assuming TERM doesn't cause issues I would hope both would produce similar results. But assuming gets me in hot water way too often. Also tested on: xterm - TERM=3Dxterm-2556color uxterm - TERM=3Dxterm-256color tested on kitty, but kitty seems to not deal with faint very well only installed kitty for testing Regards, Jim --000000000000ca66280600c05ae1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jul 17, 2023 at 1:48=E2=80=AF= PM Bart Schaefer <schaefer@= brasslantern.com> wrote:
On Mon, Jul 17, 2023 at 11:40=E2=80=AFAM Bart Schaefer
<schaefer= @brasslantern.com> wrote:
>
> Just for interest, try this:
> % colors
> % print -r $'\e['$color[faint]\;${color[bright-red]}m88888${re= set_color}\
> $'\e['${color[red]}m88888${reset_color}\
> $'\e['${color[bright-red]}m88888${reset_color}

Might be easier to see with :gs/red/yellow

In fact with yellow I can see a difference between "faint yellow"= and
"faint bright-yellow" whereas that's not obvious to me with r= ed.

print -r $'\e['$color[faint]\;${color[yellow]}m#####${reset_color}.= \
$'\e['$color[faint]\;${color[bright-yellow]}m#####${reset_color}.\<= br> $'\e['${color[yellow]}m#####${reset_color}.\
$'\e['${color[bright-yellow]}m#####${reset_color}
<= div>
Hopefully I didn't miss something with your answers,= or misinterpreted it.

I get the same results with= your code.=C2=A0 But the patch has to do with ${color[bold]}.
Wi= thout faint the result of bold is the same for <color> and <bright= -color>.=C2=A0 With
faint the result is different intensity.

w/o faint both <color> and <bright-color&g= t; produces one intensity
with faint both <color> and <b= right-color> produces a different intensity

The= following should demonstrate what I'm trying to say.=C2=A0 I added ${c= olor[reverse]}
as I believe it makes it a bit easier to see the d= ifference.
=C2=A0
print -r \
$'\e['${col= or[faint]}\;${color[bright-yellow]}\;${color[reverse]}m${(r.10.. .)}${reset= _color}\
$'\e['${color[faint]}\;${color[yellow]}\;${color[revers= e]}m${(r.10.. .)}${reset_color}\
$'\e['${color[yellow]}\;${color= [reverse]}m${(r.10.. .)}${reset_color}\
$'\e['${color[bright-yel= low]}\;${color[reverse]}m${(r.10.. .)}${reset_color}
print -r \
$'= ;\e['${color[bold]}\;${color[faint]}\;${color[bright-yellow]}\;${color[= reverse]}m${(r.10.. .)}${reset_color}\
$'\e['${color[bold]}\;${c= olor[faint]}\;${color[yellow]}\;${color[reverse]}m${(r.10.. .)}${reset_colo= r}\
$'\e['${color[bold]}\;${color[yellow]}\;${color[reverse]}m${= (r.10.. .)}${reset_color}\
$'\e['${color[bold]}\;${color[bright-= yellow]}\;${color[reverse]}m${(r.10.. .)}${reset_color}

I do not have gnome-terminal installed on my system but am using xfce= 4-terminal as my
primary terminal.=C2=A0 TERM is set to vte-256co= lor except where I am using tmux then
TERM is set to tmux-256colo= r

BTW, xfce yellows are very different from one an= other <color> is a brown,
=C2=A0where <bright-color> = is yellow.

Since gnome and xfce are both based on = vte, assuming TERM doesn't cause issues
I would hope both wou= ld produce similar results.=C2=A0 But assuming gets me in hot water
way too often.

Also tested on:
xt= erm - TERM=3Dxterm-2556color
uxterm - TERM=3Dxterm-256color
=

tested on kitty, but kitty seems to not deal with faint= very well
only installed kitty for testing

<= div>Regards,

Jim

--000000000000ca66280600c05ae1--