From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#74055: 31.0.50; color-lighten-name not lightening black Date: Mon, 28 Oct 2024 14:39:17 +0200 Message-ID: <86plnk766i.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17550"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Noah Friedman , 74055@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= , Julien Danjou , Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 28 13:40:53 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t5P3F-0004Ow-1l for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 28 Oct 2024 13:40:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5P2s-0005hO-5M; Mon, 28 Oct 2024 08:40:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5P2p-0005h2-PV for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 08:40:27 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5P2o-0005k5-FW for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 08:40:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=wL0Qq3jCMzJ8iT0UITT472QS4KOBf0dnMI+VDluI7UU=; b=KMEJ13t6BS9TiTWPS7sSZfFLkYKrPkxZtq+jQ7jJ0C1WAg9KeK1AAbQ2aOH7gSrzQiiH7GtSkQ8053typs/XPBKGvAtSElKQj5kDgB0LWcEWN5GGmDhQVqhikU7hJ3rHfBAVCIiDMUJRHi5vwwDWX5ukHNwEsNBbdbEgWq5hckd1Uza6JHiKCsgFbLnivL6rrXjtcvJ63Z4MXMruupHzA/yG5tvQJrBbyEv5bfI+hvb+erp5hldBJwghkME8EejwV9wG3NtaBWLsYdSRvEcSC+3se4qcFdxNSmFMwbhi9l9AUmumTI1MXTUoDvJC/pX8HujmHqKv5MSSh3KB0cjS3A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5P3O-0006Pu-FJ for bug-gnu-emacs@gnu.org; Mon, 28 Oct 2024 08:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Oct 2024 12:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74055 X-GNU-PR-Package: emacs Original-Received: via spool by 74055-submit@debbugs.gnu.org id=B74055.173011922124227 (code B ref 74055); Mon, 28 Oct 2024 12:41:02 +0000 Original-Received: (at 74055) by debbugs.gnu.org; 28 Oct 2024 12:40:21 +0000 Original-Received: from localhost ([127.0.0.1]:52849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5P2j-0006Ig-0q for submit@debbugs.gnu.org; Mon, 28 Oct 2024 08:40:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5P2e-0006IQ-1r for 74055@debbugs.gnu.org; Mon, 28 Oct 2024 08:40:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5P1v-0005UL-0s; Mon, 28 Oct 2024 08:39:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=wL0Qq3jCMzJ8iT0UITT472QS4KOBf0dnMI+VDluI7UU=; b=gOleJecadzVlOthuDBhU LUhure+gtVpFB3XF/IbbxObU3M4vzHrRCyfPf6byBO3DDxilDbmbSPQ+W2+ClFzc7MbzWPAxratMi ngi5Zf5dSOT183z7Pd4g900W1FY7ITlg5tRESA1Tx2SiU4C9GD2XwYN0dkoXS6Rfldyy76XZrJCRc tM8ZTnNaNpDPbUo+NTNdDfIliJIKBuN4KE8xahqcKSJ89L6UZPJxasIxhoVV0aYNoI0YvG5PyuIpK Ith9o6TtNaLPKjNhsG9hjLtzRswk1jpz158KynR2Qq+0ZgcWDs4fSGwTdfOoKm8O2MRXGOVMf28OK ZOVJ9a/En7ZrQw==; In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Mon, 28 Oct 2024 09:27:29 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294419 Archived-At: > From: Gerd Möllmann > Date: Mon, 28 Oct 2024 09:27:29 +0100 > > The function color-lighten-name doesn't work as I would expect for > black: > > (color-lighten-name "#000000" 50) > => "#000000000000" > > I think there is even a test that checks that, in color-tests.el: > > (ert-deftest color-tests-lighten-name () > (should (equal (color-lighten-name "black" 100) "#000000000000")) > > I don't understand this, and it is different from what I'd expect, and > tools for the web return, for example > > https://mdigi.tools/lighten-color/#000000 Our notion of "lighten color" seems to be to increase the color's luminance by P percent. Since the black color's luminance is zero, increasing that by 50% still yields zero. By contrast, the page you point to seems to interpret "lighten" to mean that P is the percentage of the full scale, not of the original color's luminance. This goes back to commit 656c2dd66e, which was supposed to fix bug#54514. But maybe Noah's interpretation of "lighten" was incorrect, and we should revert that change? OTOH, if we do revert it, then Noah's example will disagree with the above page. So I guess our algorithm is incorrect somewhere? Adding Julien and Mattias, in the hope that they could help unconfuse us.