From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: VOTE: Changing completions-common-part face's default Date: Thu, 7 Nov 2019 21:41:41 +0700 Message-ID: References: <4c5631d4-9dfd-04c6-c573-b83c67fcc2fa@yandex.ru> <87pni7p83l.fsf@gmail.com> <87h83ipoi0.fsf@gmail.com> <93235eb5-8e04-7182-e2a4-49fbe610ee2b@yandex.ru> <28d4ae09-daca-324b-2fa6-9d7138d710fa@yandex.ru> <87zhh82d8c.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="49143"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Emacs developers , Stefan Monnier , Dmitry Gutov To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 07 15:46:17 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iSj3B-000CgB-3R for ged-emacs-devel@m.gmane.org; Thu, 07 Nov 2019 15:46:17 +0100 Original-Received: from localhost ([::1]:43616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSj39-0006T3-Nz for ged-emacs-devel@m.gmane.org; Thu, 07 Nov 2019 09:46:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50386) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSiyx-0003v7-Rh for emacs-devel@gnu.org; Thu, 07 Nov 2019 09:41:56 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSiyw-0001Et-Lp for emacs-devel@gnu.org; Thu, 07 Nov 2019 09:41:55 -0500 Original-Received: from mail-vs1-xe36.google.com ([2607:f8b0:4864:20::e36]:37603) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSiyw-0001ER-HY for emacs-devel@gnu.org; Thu, 07 Nov 2019 09:41:54 -0500 Original-Received: by mail-vs1-xe36.google.com with SMTP id u6so1440010vsp.4 for ; Thu, 07 Nov 2019 06:41:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=nSwWOvtB9Qzyy6C4gcMEp83zJ96IEfsrxxZqb6sPapQ=; b=IUzMatleGvHV4G4m0ugeKYLIpSwKvLLOccZVDOJJQjqEKJTYlja8LfdrSYhqX/lSLF 5ePXNxde4qQwh0lh5VbHCpcJKNL4uqaG50h8DYtbelp6POwgng4cBUlcYVckptWeaFJN rIYjH1wHWfcbzVChWm2iYSTafJ/sg+1k43rG84Q9TJFk3vluuDFuiG94ZlI1UJJjB22P tp1Jws4Q2xqHtHL5HLlIZ/2SmpC5bLgewXkCSryJKSE/ronIvCAHKlo/qEPrJ0L8Ic/u qX4WXG04jT0WTfOE9bNA9OPmP479xoh4EIbgVMtpLs2W9Z42OdYYNlCPRXNcZ91NUi4I A7tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=nSwWOvtB9Qzyy6C4gcMEp83zJ96IEfsrxxZqb6sPapQ=; b=ZS7H0XoLkSpogxE9gB2Wu/ouGBUBAXC9heOebcHmVzZeFCWBt6YnxMQhzTLUyQK74R w8WPTts8G3m9IJ7Z2bWBWyf7GGVYhhLuWU6b+CrYaV0TRtopqQFKEeIsClSAATv8DpFC BJGtu5/yKK5pqKTOd9B/Js+5XGP7hpvBe/0xM2x8cFt2hDb1sisrPbS+LtAM7U/PVBdh gcF+aphHh9T23A4bi6ELm0dA5EKIrKC/SJMvvI1iY4f17pF/3BFJjDsciKrDWCJfj9J/ L++WRv2xnskE7VujlUOrH5qPswD32+xV5VhTOdt3dkDAQxUrjPExy08ixM9Iba4Tr7xg 8G+w== X-Gm-Message-State: APjAAAV1tWV9ebnelPzGW1yAmeNzWnE3h0EjbxOUgGkKzha67K40qNMx 4Jf2geBo+GZLdnVew5oa33ZECmWm0UCSY30wHMc= X-Google-Smtp-Source: APXvYqzULaZw3UIa0VwWfVXiMPEsgNTgz0Uj0dTL2qBWpMFfIGmlQqsrRIR7HECIeQxstIA8vGqM59JEY1ZpGupl3DE= X-Received: by 2002:a67:e451:: with SMTP id n17mr3175750vsm.199.1573137713786; Thu, 07 Nov 2019 06:41:53 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::e36 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241926 Archived-At: On Thu, 7 Nov 2019 at 20:53, Jo=C3=A3o T=C3=A1vora w= rote: > This points to a rule for finding the perfect good compromise: > find the color equidistant to both black and white that passes > both tests. Because of the way contrast ratio is defined: R =3D (L_lighter + 0.05) / (L_darker + 0.05) if we require R(color, black) =E2=89=A5 4.5 and R(color, white) =E2=89=A5 4= .5, we get: (L(white) + 0.05) / (L(color) + 0.05) =E2=89=A5 4.5 1.05 / (L(color) + 0.05) =E2=89=A5 4.5 1.05 / 4.5 =E2=89=A5 L(color) + 0.05 0.183333 =E2=89=A5 L(color) and: (L(color) + 0.05) / (L(black) + 0.05) =E2=89=A5 4.5 (L(color) + 0.05) / 0.05 =E2=89=A5 4.5 L(color) + 0.05 =E2=89=A5 4.5 * 0.05 =3D 0.225 L(color) =E2=89=A5 0.175 So the set of colors that satisfy the 4.5:1 contrast criterion against both white and black is a very thin surface of colors with relative luminance between 0.175 and 0.183. Basically: greens #008800 to #008a00 cyans #008282 to #008484 blues (somewhat tinted) #5e5eff to #6161ff magentas #ce00ce to #d100d1 reds #eb0000 to #ee0000 yellows (rather, olives) #797900 to #7a7a00 grays #757575 to #767676 and various intermediates. If you also want to account for the uncustomized 256-color xterm palette, then I think it comes down to a single gray and maybe a handful of cube colors. (Most non-black colors of that palette are optimized for contrast against black background.) However, the 4.5:1 threshold is tuned for readability of text on background, not distinguishability of two text colors. For distinguishability, maybe 3:1 or even lower would be enough.