From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#41544: 26.3; Possible incorrect results from color-distance Date: Fri, 29 May 2020 19:28:44 +0200 Message-ID: <94FCD141-F201-49D1-BDAD-9FFA46D48D6D@acm.org> References: <5C4A633D-8222-4439-BE37-9B8674F1DA6D@acm.org> <83pnamn47h.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="70413"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tom@tromey.com, simon@polaris64.net, 41544@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 29 19:29:16 2020 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 1jeiol-000IEg-Qf for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 May 2020 19:29:16 +0200 Original-Received: from localhost ([::1]:58296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeiok-0002lc-Oo for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 May 2020 13:29:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeioZ-0002fE-13 for bug-gnu-emacs@gnu.org; Fri, 29 May 2020 13:29:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jeioY-0004QN-LT for bug-gnu-emacs@gnu.org; Fri, 29 May 2020 13:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jeioY-0001ZL-AW for bug-gnu-emacs@gnu.org; Fri, 29 May 2020 13:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 May 2020 17:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41544 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 41544-submit@debbugs.gnu.org id=B41544.15907733386022 (code B ref 41544); Fri, 29 May 2020 17:29:02 +0000 Original-Received: (at 41544) by debbugs.gnu.org; 29 May 2020 17:28:58 +0000 Original-Received: from localhost ([127.0.0.1]:56101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeioU-0001Z4-82 for submit@debbugs.gnu.org; Fri, 29 May 2020 13:28:58 -0400 Original-Received: from mail1454c50.megamailservers.eu ([91.136.14.54]:44246 helo=mail266c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeioR-0001Ym-U0 for 41544@debbugs.gnu.org; Fri, 29 May 2020 13:28:56 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1590773328; bh=t34qr4VfLJe8hwaTHC9A99DXmRZmQkEj1u7Ng2eo2Io=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=GDO9Rt9R2iuT953isbHi4pTh1rvJCQWHQc9hRiXdjcuGbavE5gXn7u/Fw0aYaBAaC Ic+o+Jwd0WnzS+j/HmAYDup3GCOgjLv/msA5Q08FwJR4xA59/z4BT7KSWFfWbcIGPj aHt27/H4tWcR0dHdFTHl1jiVINzxnLOFbSZ8dq08= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-4e4ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.78]) (authenticated bits=0) by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 04THSiV4015235; Fri, 29 May 2020 17:28:46 +0000 In-Reply-To: <83pnamn47h.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.104.14) X-CTCH-RefID: str=0001.0A782F28.5ED14602.001D:SCFSTAT68638221, ss=1, re=-4.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: -4.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=A5MSwJeG c=1 sm=1 tr=0 a=klNLuyVZdLUgl+K5Uafb2A==:117 a=klNLuyVZdLUgl+K5Uafb2A==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8 a=cUxbU7hPt0qoel6uMsQA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 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" Xref: news.gmane.io gmane.emacs.bugs:181194 Archived-At: 29 maj 2020 kl. 17.36 skrev Eli Zaretskii : > Did you try what this does to tty-color-approximate and friends, > especially when the terminal supports only 8 or 16 colors? If not, > please do, we must ensure there are no regressions there. tty-color-approximate uses its own metric (square of the unweighted = Euclidian RGB distance). To test the TTY_SAME_COLOR_THRESHOLD, I tried = display-supports-face-attributes-p, and it seems to behave in the same = way. All tested with TERM=3Dxterm-color, which gives the standard 8 = colours. The translated constants were obtained by generating many random RGB = triples and computing distances between all pairs, then finding the = value of NEWCONST which minimises the number of cases where old-colour-dist(c1,c2) < OLDCONST and new-colour-dist(c1,c2) < NEWCONST differ in truth value. The computation was also run on the rgb.txt list = instead of random colours as an extra check.