public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jeff King <peff@peff•net>
To: Beat Bolli <bb@drbeat•li>
Cc: git@vger•kernel.org, Beat Bolli <dev+git@drbeat•li>
Subject: Re: [PATCH 3/3] color: add support for 12-bit RGB colors
Date: Tue, 30 Apr 2024 06:57:27 -0400	[thread overview]
Message-ID: <20240430105727.GI1279403@coredump.intra.peff.net> (raw)
In-Reply-To: <20240429164849.78509-4-dev+git@drbeat.li>

On Mon, Apr 29, 2024 at 06:48:49PM +0200, Beat Bolli wrote:

> -test_expect_success '24-bit colors' '
> -	color "#ff00ff black" "[38;2;255;0;255;40m"
> +test_expect_success 'RGB colors' '
> +	color "#ff00ff #0f0" "[38;2;255;0;255;48;2;0;255;0m"
>  '

Heh, I would still think of it as a shorthand for 24-bit color, but I
guess you could argue it is now 12-bit color. :)

(Only observing, I think the new name is fine).

>  test_expect_success '"default" foreground' '
> @@ -146,7 +146,10 @@ test_expect_success 'non-hex character in RGB color' '
>  	invalid_color "#12x456" &&
>  	invalid_color "#123x56" &&
>  	invalid_color "#1234x6" &&
> -	invalid_color "#12345x"
> +	invalid_color "#12345x" &&
> +	invalid_color "#x23" &&
> +	invalid_color "#1x3" &&
> +	invalid_color "#12x"
>  '

This made me wonder what we'd do with "#1", "#12", "#1234", etc. Looking
at the code change, I think we'd continue to reject them. I wonder if it
is worth covering here.

-Peff

  parent reply	other threads:[~2024-04-30 10:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29 16:48 [PATCH 0/3] color: add support for 12-bit RGB colors Beat Bolli
2024-04-29 16:48 ` [PATCH 1/3] t/t4026-color: remove an extra double quote character Beat Bolli
2024-04-30 10:59   ` Jeff King
2024-04-29 16:48 ` [PATCH 2/3] t/t4026-color: add test coverage for invalid RGB colors Beat Bolli
2024-04-29 16:48 ` [PATCH 3/3] color: add support for 12-bit " Beat Bolli
2024-04-29 17:23   ` Junio C Hamano
2024-04-29 17:42     ` Beat Bolli
2024-04-30 10:57   ` Jeff King [this message]
2024-04-30 17:31     ` Junio C Hamano
2024-04-30 18:41       ` Junio C Hamano
2024-04-30 19:01         ` Junio C Hamano
2024-05-03 17:47           ` Jeff King
2024-04-29 21:37 ` [PATCH 0/3] " Taylor Blau
2024-05-02 11:03 ` [PATCH v2 " Beat Bolli
2024-05-02 11:03   ` [PATCH v2 1/3] t/t4026-color: remove an extra double quote character Beat Bolli
2024-05-02 11:03   ` [PATCH v2 2/3] t/t4026-color: add test coverage for invalid RGB colors Beat Bolli
2024-05-02 11:03   ` [PATCH v2 3/3] color: add support for 12-bit " Beat Bolli
2024-05-02 16:29   ` [PATCH v2 0/3] " Junio C Hamano
2024-05-03 17:48   ` Jeff King
2024-05-03 19:31     ` Beat Bolli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240430105727.GI1279403@coredump.intra.peff.net \
    --to=peff@peff$(echo .)net \
    --cc=bb@drbeat$(echo .)li \
    --cc=dev+git@drbeat$(echo .)li \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox