From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: master 68ae6fa: Improved light/dark colour predicate (bug#41544) Date: Fri, 12 Jun 2020 02:22:58 +0700 Message-ID: References: <20200610181238.9796.44750@vcs0.savannah.gnu.org> <20200610181239.947C4204DF@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="122670"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , Emacs developers To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 11 21:24:20 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jjSoF-000Vma-Gq for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Jun 2020 21:24:19 +0200 Original-Received: from localhost ([::1]:41056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjSoE-0007gU-Jf for ged-emacs-devel@m.gmane-mx.org; Thu, 11 Jun 2020 15:24:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjSnH-0006SW-PF for emacs-devel@gnu.org; Thu, 11 Jun 2020 15:23:19 -0400 Original-Received: from mail-vs1-xe2b.google.com ([2607:f8b0:4864:20::e2b]:45099) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjSnF-0004Th-KO for emacs-devel@gnu.org; Thu, 11 Jun 2020 15:23:19 -0400 Original-Received: by mail-vs1-xe2b.google.com with SMTP id d21so4002896vsh.12 for ; Thu, 11 Jun 2020 12:23:11 -0700 (PDT) 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=/o0RklyXqbLwOZsaze1Z3IbclzE3QbJ9e/mmFL/PYmQ=; b=umKpeGnibtvT3LT8cmbt9nC4btUC85sUlmLDiRN+fW0Ia7o549vraJpY74GaWhjL0H 6kmpnWa8Q54Vs4djCduxTRIbVAwK8GxxGJXWEjxnOJ87DkmWZOJqR0uDcoQo7Al/7XO+ Dnajlrkepe0hPiqU2jLC5bNaw+LF7aRvf0qBN/q/vCXoV1gs/ty4tNMXuVR5vqORhhQF 84WqOOs4GIOPM4JUElOV4+q6Tv/kUMD6oeYzEI6IQqQKWkPpqAphX5c6ap6e7BAbdRHW RmVCU57AL9Ym3mytmYeSR9k+v0oD+bSVkUY6bqWq6rFe1ONG7OtzjeLufcJ8D9lz1AaU 4J6Q== 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=/o0RklyXqbLwOZsaze1Z3IbclzE3QbJ9e/mmFL/PYmQ=; b=F4xZ/Phq28u0R/F6c+KNUNY7cg9zMAsy63mwWto0dmcDfgj352SvI6XBAVH570D30P 43JbBZ/i4dIBFTpjpMAQJmo754iQ7PbEoXLYZUbiBCVKelGMpy1vLPTSLou7ttHoIOql xWlwI7WQFZN1UxTw+c34WzQ2fkjXe/dv68XRw0rVA4nUaLMadAgEp+5AFEjXbK2I+AzQ Sffnyvm2LzTJXbxC5mY8WJcMtweKU8Efbqk51M9/43EsmJQ32HFRWKci9rvJwdfG5E2n BJW6kd+H2fiYRY0lBV70tBV3ureozVXWgu3jMRPtYLdhXta8+BgdgwQw4/cTBtIpmv1R mhJw== X-Gm-Message-State: AOAM532nX1TIif+XIyiFTb47zv4IbPnfc9HyOstbVvcADmwsfoQNG5ox ZBvafDq7oOPywnUkMy9cSMNCKbJD9Pa85P8kzTU= X-Google-Smtp-Source: ABdhPJxDxXycS/devpB9iCnkLWo7MvBq/2aVRBXrB2OUqKPiT7kGrNVtM47p+3+/L/iime6xXBGabE9vBgO7uCCi3Ws= X-Received: by 2002:a67:8a83:: with SMTP id m125mr7938703vsd.199.1591903390737; Thu, 11 Jun 2020 12:23:10 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::e2b; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe2b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252131 Archived-At: On Thu, 11 Jun 2020 at 23:15, Mattias Engdeg=C3=A5rd wro= te: > For example, white text is decidedly more readable than black onto a back= ground of #8b7500 (gold4) everywhere. Of course, your equipment may be diff= erent! My equipment (which is two myopic and slightly astigmatic eyes looking through corrective glasses at a 24=E2=80=B3 IPS-based Dell P2415Q running a= t native resolution and with contrast and brightness knobs tuned to not be painful but still pass the tests at ) says that shade of gold in fact performs okay in all four scenarios: gold on black, gold on white, white on gold, black on gold. > Precision may be more important when the same predicate is used for selec= ting prearranged palettes for use against 'light' and 'dark' backgrounds. T= his still needs to be investigated. WCAG recommends a color contrast of at least 4.5 for most uses of text below 18pt (or 14pt bold). The range of color contrast (1 to 21) and the inherent properties of real numbers (4.5^2 =3D 20.25) suggest that there is only a fairly narrow band of colors that satisfies that contrast level against both white and black. Further, if you were to pick a palette consisting of white, black, and multiple colors from that band, you=E2=80=99d get another problem. Namely, = all your text is the same relative luminance. That means you have to distinguish e.g. syntax elements solely by their hue. Users with color vision anomalies might not even be able to do that. A good palette meets or exceeds the recommended contrast ratio against the background for all text colors, and provides at least *some* variation in relative luminance of text colors.