From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#41544: 26.3; Possible incorrect results from color-distance Date: Sat, 6 Jun 2020 11:15:57 -0700 (PDT) Message-ID: References: <5C4A633D-8222-4439-BE37-9B8674F1DA6D@acm.org> <87r1v2aat3.fsf@tromey.com> <9902865C-01B4-4E50-A433-DBC8B8311234@acm.org> <83tuzueogo.fsf@gnu.org> <6272275C-560C-4437-90F1-2A8294D27019@acm.org> <83o8q2elja.fsf@gnu.org> <83mu5mel4o.fsf@gnu.org> <77F1DDD3-A69F-40ED-902D-74986D5E6596@acm.org> <83y2p5cumz.fsf@gnu.org> <83blm0cjlz.fsf@gnu.org> <83367ccf8w.fsf@gnu.org> <624D7FB8-A836-4A7E-8895-47E867214504@acm.org> <83o8pyc4bq.fsf@gnu.org> <55D73CA5-1EFB-4B0A-8F8B-FDA1D39F51BF@acm.org> <835zc5bsut.fsf@gnu.org> <3BBCFDD4-C14D-4628-91CB-2A0456A96FC7@acm.org> <838sh0abzz.fsf@gnu.org> <83r1us8kw6.fsf@gnu.org> <020DE875-14A8-457A-9AE4-AA0925DB8997@acm.org> <83img48ffx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="123858"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41544@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 06 20:17:10 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 1jhdNV-000W8v-TP for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Jun 2020 20:17:09 +0200 Original-Received: from localhost ([::1]:38066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhdNU-0002k3-V5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Jun 2020 14:17:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhdNO-0002jw-E9 for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 14:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40879) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhdNO-0008Lc-63 for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 14:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jhdNO-0006xT-2M for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2020 14:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jun 2020 18:17: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.159146737526688 (code B ref 41544); Sat, 06 Jun 2020 18:17:02 +0000 Original-Received: (at 41544) by debbugs.gnu.org; 6 Jun 2020 18:16:15 +0000 Original-Received: from localhost ([127.0.0.1]:52425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhdMc-0006wO-Oy for submit@debbugs.gnu.org; Sat, 06 Jun 2020 14:16:14 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:55324) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhdMb-0006vt-OY for 41544@debbugs.gnu.org; Sat, 06 Jun 2020 14:16:14 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 056I6wkD001273; Sat, 6 Jun 2020 18:16:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=EVFa0tZNc+J1Qg4Z4I8JuUxFh2NswrWXqaSlCiCBa2k=; b=LWaX+24LOOz7WZDVkZThoqYLbqQBubJTtlu6/lLHg4ZSawrdQ8DRCkqQV/HqrRU45x48 muOcSzBITmaKYyuuj2TGm54LCT5/bOikqLEw2kP+JxdnzY20S5UGB8M9SUyRR5+gjsJq tsnlld9AUaDufU9q0aGXaZn4zpxCRKR8HQvEu2WNtjZ/iYSup82kkWhc0KAUG93nIzSN iJXtlWxEE8eE6jbBRMxJgaZu/BsJuYFPHdm6PnBAXy0ShCy0XpFW4iZtkxmg7pijDsGv tabXfWdXRvwY3fE09lpiOt4AYn2kQZZczU9IbAgL4X7Ve9z2FZmvl4JJohbYyKote6hN 9g== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 31g33ksksn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 06 Jun 2020 18:16:05 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 056I8FXo146440; Sat, 6 Jun 2020 18:16:04 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 31g2fhh522-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 06 Jun 2020 18:16:04 +0000 Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 056IG0KJ015542; Sat, 6 Jun 2020 18:16:01 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5005.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9644 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 adultscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006060145 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9644 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 spamscore=0 cotscore=-2147483648 malwarescore=0 phishscore=0 mlxscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 priorityscore=1501 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006060145 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:181625 Archived-At: (Not following this thread; apologies.) Noticed this in the patch: +(defun color-dark-p (rgb) + "Whether RGB is more readable against white than black. +RGB is a 3-element list (R G B), each component in the range [0,1]." Something seems a bit wrong, here. Dunno whether it's the predicate name or the doc string (or both). The predicate name suggests it's about testing a color (via RGB) to determine whether it's dark or light. The doc string suggests it's specifically about the readability of _foreground_ text that is of that color - specifically whether it's more readable against a white than a black background. Maybe the predicate name should be changed to indicate (1) that it's about RGB as a foreground and (2) it's compared (in terms of contrast or value or whatever) to a white and black background. Just a suggestion. Discovery, based on the predicate name, will mislead as it is now, I think. I also think the doc string could say just what it means by "more readable", i.e. what kind of RGB (or other) test it uses.