From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: CSS contrast (#30295) (was Re: Heads-up: Emacs 26.1 RC1) Date: Wed, 21 Mar 2018 15:32:17 +0200 Message-ID: <83vadpk10e.fsf@gnu.org> References: <83muz2lfo9.fsf@gnu.org> <837eq5lvyx.fsf@gnu.org> <83y3ilk32z.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1521639205 22371 195.159.176.226 (21 Mar 2018 13:33:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Mar 2018 13:33:25 +0000 (UTC) Cc: johnw@gnu.org, tom@tromey.com, emacs-devel@gnu.org To: Richard Copley Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 21 14:33:21 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eydrk-0005k6-3M for ged-emacs-devel@m.gmane.org; Wed, 21 Mar 2018 14:33:20 +0100 Original-Received: from localhost ([::1]:55099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eydtn-0004vr-Dg for ged-emacs-devel@m.gmane.org; Wed, 21 Mar 2018 09:35:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eydqc-0001iA-AF for emacs-devel@gnu.org; Wed, 21 Mar 2018 09:32:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eydqb-00028K-Fu for emacs-devel@gnu.org; Wed, 21 Mar 2018 09:32:10 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eydqW-00025Y-4v; Wed, 21 Mar 2018 09:32:04 -0400 Original-Received: from [176.228.60.248] (port=2813 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eydqV-0005W9-DO; Wed, 21 Mar 2018 09:32:03 -0400 In-reply-to: (message from Richard Copley on Wed, 21 Mar 2018 13:22:37 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:223889 Archived-At: > From: Richard Copley > Date: Wed, 21 Mar 2018 13:22:37 +0000 > Cc: John Wiegley , Tom Tromey , > Emacs Development > > We do something very similar in frame-set-background-mode and in > tty-color-approximate. > > I don't see it. You're talking about this? > > ((>= (apply '+ (color-values bg-color frame)) > ;; Just looking at the screen, colors whose > ;; values add up to .6 of the white total > ;; still look dark to me. > (* (apply '+ (color-values "white" frame)) .6)) That's the first example, yes. > It's this particular way of using color-distance that we appear to > have invented. Not according to the article from which the implementation of color-distance was taken. > If we didn't then we took it from > somewhere else, and someone (Tom?) should know where. The comments in the sources of color-distance tell where we took it from. > I don't believe the concept of a sphere centred on black is a useful one in this context, or that allowing the > user to vary its radius makes it any better. I suggest to read the original article mentioned above.