From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.bugs Subject: bug#28400: 26.0.50; lcms2 bindings Date: Sun, 10 Sep 2017 18:04:22 -0400 Message-ID: <20170910220422.GA14577@holos.localdomain> References: <877ex7yiph.fsf@holos> <83shfvvkme.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Trace: blaine.gmane.org 1505081122 30971 195.159.176.226 (10 Sep 2017 22:05:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 10 Sep 2017 22:05:22 +0000 (UTC) User-Agent: Mutt/1.9.0 (2017-09-02) Cc: 28400@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 11 00:05:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1drALh-0007Gq-Bj for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Sep 2017 00:05:05 +0200 Original-Received: from localhost ([::1]:54426 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drALo-0003Ii-Hf for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Sep 2017 18:05:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drALi-0003HC-7a for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2017 18:05:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drALe-0008AL-8a for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2017 18:05:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51202) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1drALe-0008AB-42 for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2017 18:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1drALd-0002qL-RB for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2017 18:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Sep 2017 22:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28400 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28400-submit@debbugs.gnu.org id=B28400.150508107810893 (code B ref 28400); Sun, 10 Sep 2017 22:05:01 +0000 Original-Received: (at 28400) by debbugs.gnu.org; 10 Sep 2017 22:04:38 +0000 Original-Received: from localhost ([127.0.0.1]:59883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drALC-0002pZ-G6 for submit@debbugs.gnu.org; Sun, 10 Sep 2017 18:04:37 -0400 Original-Received: from mail-qt0-f172.google.com ([209.85.216.172]:36061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drAL8-0002pK-6j for 28400@debbugs.gnu.org; Sun, 10 Sep 2017 18:04:33 -0400 Original-Received: by mail-qt0-f172.google.com with SMTP id s18so14088549qta.3 for <28400@debbugs.gnu.org>; Sun, 10 Sep 2017 15:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7ilNn2R6c9GxMoKD/bAILev3gKxnMKiqqbUrxh/3yJ0=; b=a0CsR2qqjjtfLFmGHPp+WXjXBdRGlVUa/B1fDaQLR8vZBYu2djggTFxh0OMwgXc2am TTuuaSeIkvO4oc8u4TVTzdy7n5e7JsgHag5NYU/6M23sco+kfApdXiSZzTwTFLcxt7dA xB5CJ3TXipCwNNZ2nBl0sJmoXhEIFSgmDweopaDQee3zaKqLa68EurhdO5+Oba6rWADe 3lg9WkMGLzlhLfxxBF0Oe/shT32vyk0N1EIZ9MOo3Ww9bxyC1ueR6ay7PFjS6NBaQOap 7N9MLDo9p0MbHJYtGCynKfgwLOBi63S/ZuUh4WGwIxQTVbJwGumeJRDz3REkiWT2ylcY zhPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7ilNn2R6c9GxMoKD/bAILev3gKxnMKiqqbUrxh/3yJ0=; b=ZrRYriE5HDbnEPcrN+RXZGy0AY2msKnnLlOnE6QxfYB7DPN8W0cG0huFr10wlEkyTI NZoNxmgkAdc7rkuYYq4b2sKPnsrikreuLhu+FkAqMe3sOpnZoLS42yNa3D7zT7inEMLk pgfz5wAn/5vj9PI++CIWPi10X5eEBitvaLunWCJuXz5jN/E8l9L7slQPTOcRjjh4MC2I RuLq8HVx/gYSPGUx6kzcu2K0VkJrptDKzdrXctF1fxon9fLPO4neF2aHRyUThXdmDDlK gJLjU/JtsTkhzTjQllRK6sTL1FmVC+QhzKFO7ATY3VCD3vf/fmcL9Vh76qYbQySOVdfM yrkg== X-Gm-Message-State: AHPjjUj15MVNMTp0vJrWn/xb8LGjOaB0DCCINXms5OI9ZBPCVxMwVLkC t7xRM+Hjzec53RkYQfu1yQ== X-Google-Smtp-Source: AOwi7QBXy297W42doJ0cXVNJd7jnLxFxrVpjwxCIBz9Kuda7e6W7UDDKVfVK1kJ9A/s0KcqlpO38ag== X-Received: by 10.237.37.231 with SMTP id y36mr13934996qtc.199.1505081064441; Sun, 10 Sep 2017 15:04:24 -0700 (PDT) Original-Received: from holos.localdomain (pool-173-67-36-61.bltmmd.fios.verizon.net. [173.67.36.61]) by smtp.gmail.com with ESMTPSA id p7sm5030856qke.78.2017.09.10.15.04.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 10 Sep 2017 15:04:23 -0700 (PDT) Original-Received: by holos.localdomain (Postfix, from userid 1000) id 0C2F5690B8; Sun, 10 Sep 2017 18:04:23 -0400 (EDT) Content-Disposition: inline In-Reply-To: <83shfvvkme.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136749 Archived-At: On 09/09/17 at 08:37pm, Eli Zaretskii wrote: >> From: Mark Oteiza >> Date: Sat, 09 Sep 2017 11:50:34 -0400 >> >> Some time ago I wrote some integration with lcms2 in the interest of >> replacing tty-color-approximate, color-distance, etc. with superior >> (more perceptually uniform) color metrics. This would presumably >> improve Emacs' color picking on smaller color palettes (e.g. 256 color >> term) and potentially provide access to many useful color-related >> functions in Lisp---not to discount color.el. > >Is it really so much better than what we have now to justify requiring >yet another library to build Emacs? If it is, could you tell what are >the main advantages, or point to where those advantages are described? It was just much easier for me to hack existing code than figure out adding a new file and the configure.ac business. It would be much more sensible to offer it as an optional feature and expose color metrics as optional arguments, e.g. (color-distance COLOR1 COLOR2 &optional FRAME METRIC) where METRIC accepts two colors and returns a number. >Btw, 256 colors is not "small" by Emacs standards, because our color >approximation should (and does) work in 8-color terminals as well. Yes, I should have used a different word than "small". Approximations for smaller palettes is easier because the differences between individual members of the palette are much bigger. The 256 color palette (and larger) has many colors much closer to one another, and calculating perceptual differences between colors that are close requires a more sophisticated model. For instance, take CIEDE2000 https://en.wikipedia.org/wiki/Color_difference#CIEDE2000 and compare it to the newer CAM02-UCS http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.844.5693&rep=rep1&type=pdf IIRC CAM02 is the de facto model for CMS. I'm certain Windows uses it for its CMS. I like this talk about Matplotlib's new color map. It explains the differences between color spaces among other things https://www.youtube.com/watch?v=xAoljeRJ3lU