From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: color-rgb-to-hex rounding / color-srgb-to-xyz typos Date: Tue, 19 Jan 2021 04:37:40 +0100 Message-ID: <87wnw9r3zv.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4535"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Thomas =?utf-8?Q?Fr=C3=B6ssman?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 19 04:38:38 2021 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 1l1hqo-000162-0B for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Jan 2021 04:38:38 +0100 Original-Received: from localhost ([::1]:43818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1hqn-0006pu-0c for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Jan 2021 22:38:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1hq3-0006Oz-7z for emacs-devel@gnu.org; Mon, 18 Jan 2021 22:37:51 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:43380) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1hpz-0004ID-BC for emacs-devel@gnu.org; Mon, 18 Jan 2021 22:37:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6+rjF0FD0h+0AycEGG3QPK0XYKbSjfXZlTAO0ghf0AY=; b=NUizM3OnHZ0ttBQco6VXLWtHbU zA/E7MR+AkA6/GwURhsoK31NOxnvvxcZNvQ9MuvrQ4UYd3Pmyxblk0Ig6Lu221e0PXNAZhZAKQPte 9lLNOthhEzKJiiEUkE0Yy9FickwGXuS6/WUlqq71DQFkwi2PZVEx+gPOpfV28XThmJvU=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1hpt-0002uh-DC; Tue, 19 Jan 2021 04:37:43 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEWglHirnoCwo4XD u6CGfGX///9ejW8PAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UBEwMdHvK0HnYAAAGfSURBVDjLnZPR jeMwDERJIQWQrMDklnAN+CP917SPkhXfBTlgsUoU2BppODNiRLx6fP3Zo77mgogu5H1II/4ZOJnj EzCH9s8nYIJl/9a4hGVWVsUNPE45zyyLxuOdapS5Xat+Aw8Z7gKQjaXHopKz2QU7EYW0/JsqinUP b75JeRd3A0r3SNPrxGBnDHONrDDPuGpMpiYyj5bsu8aDLAhyhA/17SN2GjbiwF3m8hGbylACOZ/S lc9SxaQyX28bsWpYn0AmFmxdC0Ak7LJu0TNbG7rkuFQh64lFIko9RuwQ+4SpEa6m4zoJrIZPlilz lmQxV3X5MEb9D/A6crpWmi6Q2EkxbypKh6dOL8KN2HIu4t2MGdhU5WI4u2t4Q/BxUCsOyTtENT+4 X5yQJYbqak9FQbN3EaFfmBcSPl95r45h2NZOGCAdYwTbYwNky26nFXiwyntdu0cSCZqoR/dLFQZp X6gwCu77b9Ouaa4m7Bxkn5De1qL7AXkvpl7ABsY4KCTykvuePMDj+aSp5QcjDjh3EapSx9Xud1rn +fwR06/HNw/SRgMXC+m6AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTAxLTE5VDAzOjI5OjMwKzAw OjAwAbe+0QAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wMS0xOVQwMzoyOTozMCswMDowMHDqBm0A AAAASUVORK5CYII= X-Now-Playing: The Durutti Column's _Without Mercy (4)_: "Pauline" In-Reply-To: ("Thomas =?utf-8?Q?Fr=C3=B6ssman=22's?= message of "Tue, 12 Jan 2021 12:23:53 +0100") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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:263160 Archived-At: Thomas Fr=C3=B6ssman writes: > 1. color-rgb-to-hex rounding=20 > > Hi. I was investigating why a simple color space conversion from rgb > to lab and back via just multiplying a component with 1.0 caused > colors to change when being converted back. The issue is that even > tiny changes to a component float in LAB space can bring the color > value down by 0.00000x or something in RGB and when it's converted > back to hex it gets a surprising value. > > I think I propose this change making rounding optional so that it > doesn't affect anyone who is depending on the current behaviour. > > (defun solarized-color-rgb-to-hex (red green blue &optional digits-per-co= mponent > round) Was this meant to be added to the solarized package, or to the in-tree `color-rgb-to-hex' function? > 2. typos (?) in color-srgb-to-xyz typos > > While looking at the issue and referencing the wikipedia sRGB page it > seems like these values should be changed.. Doing this upset the tests > a bit though so I didn't take it all the way because I started trying > to understand how to actually produce test case data that is based on > some verified numbers and not just the output of color.el's functions. I don't know, either. Is this related to bug#41544, perhaps? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no