From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#36304: 27.0.50; request: switch to the superior HTML #RGB convention for colors Date: Sat, 22 Jun 2019 14:41:30 +0000 Message-ID: References: <83fto1onky.fsf@gnu.org> <83d0j5ol0i.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="107966"; mail-complaints-to="usenet@blaine.gmane.org" Cc: rms@gnu.org, 36304@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 22 16:43:16 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1hehEU-000Rqc-9X for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Jun 2019 16:43:15 +0200 Original-Received: from localhost ([::1]:41084 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hehES-0006fn-Qs for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Jun 2019 10:43:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59143) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hehEO-0006fh-02 for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2019 10:43:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hehEM-000165-Kf for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2019 10:43:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38842) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hehEM-00015c-Ew for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2019 10:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hehEM-0002nA-A4 for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2019 10:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Jun 2019 14:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36304 X-GNU-PR-Package: emacs Original-Received: via spool by 36304-submit@debbugs.gnu.org id=B36304.156121453610677 (code B ref 36304); Sat, 22 Jun 2019 14:43:02 +0000 Original-Received: (at 36304) by debbugs.gnu.org; 22 Jun 2019 14:42:16 +0000 Original-Received: from localhost ([127.0.0.1]:52386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hehDb-0002m8-Bc for submit@debbugs.gnu.org; Sat, 22 Jun 2019 10:42:16 -0400 Original-Received: from mail-oi1-f170.google.com ([209.85.167.170]:40560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hehDY-0002lq-4e for 36304@debbugs.gnu.org; Sat, 22 Jun 2019 10:42:13 -0400 Original-Received: by mail-oi1-f170.google.com with SMTP id w196so6662230oie.7 for <36304@debbugs.gnu.org>; Sat, 22 Jun 2019 07:42:12 -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; bh=EEdSv/oB/xGFcYDJo9Mor9Ue1aISdUEtMaL5y0u0NJc=; b=ftSsCy/CAriKdsoK8ZlkurJ/AM0vMnXK4QTn9VznBoDtXmIn7bLwoYVmS7+OvNJwy1 m+sPCfyD08lDE335UeFSU43DYJ8lgDLN4mnRhqRykSFrnT0U/rn6stck/jeAkT+V5iPp FeE2hNiCJIJn65sSpx/sIYn0hbvVl7mVQh4aEgXhs60W68oU9Uw/QId0J4OYeRkoiYCl CfZuUXhidnX2upX4m6rn3SCMM3ARltUk8BXIzyBI5hPWXuKnnW7UigGOTOOHP02XSKM4 6a+43oj0zdSQ1jQ6ruH/LoZkxa6DKHELVCcSU2RCxa6d0V5SOamvE33xO55DUQldupQ9 RpqQ== 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; bh=EEdSv/oB/xGFcYDJo9Mor9Ue1aISdUEtMaL5y0u0NJc=; b=th9SwTKFdFDB5W3SGlRoB8mNqZM34EHDYiM59ENGAMiYIoBtCssi9GG+bJgFG895VG zT1Iwn1Aed7JkHBtMOaPs/hnNbSrq+tUbhRXS4te7xHXgJG+EdXV3yF7vJ3mBAIgvK/1 0wOWKKqaHXgXKmuYCIfRn0c8JlbFlWIfwa3YkqktOTosL+2VIIQgtmqlS72Zwn8+bh6J +jPCec6id2YVJC5RgbhxivNiUFlqg6H+x3RWbObqzfDpIUPnEUIYJape1/1QMiYzJEub IcLWO2Un55O8j4f854M3qWu8GJeuUtT8sNzkY7soOEGCu49LshYPMoXJkuHpvOkSgV/3 lPCg== X-Gm-Message-State: APjAAAUaVNnY9V8OdxyWFxozb4kpbBeTB1SIYKsH2lgGVakuqj9rfEtl MPhJff8211hHhn8Tm4/LKkDcLOabtCzkBqb02fNEYkKt X-Google-Smtp-Source: APXvYqxmfWdXTEl0p+c+qE8WVt9j09od/X1nfHktCYlrnL91S4ipM/krKkr6/gDzFrhnO4q32PcgvEIH8YH1hC2MnGE= X-Received: by 2002:aca:2303:: with SMTP id e3mr5386707oie.112.1561214526411; Sat, 22 Jun 2019 07:42:06 -0700 (PDT) In-Reply-To: <83d0j5ol0i.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: 209.51.188.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:161030 Archived-At: On Sat, Jun 22, 2019 at 12:36 PM Eli Zaretskii wrote: > > From: Pip Cet > > Date: Sat, 22 Jun 2019 12:13:20 +0000 > > Cc: rms@gnu.org, 36304@debbugs.gnu.org > > > > It'd leave us inconsistently still using the X standard in some > > places, but at first glance they appear to be documented to use the X > > standard, so maybe that's not wrong. > > I'm not sure I understand what you mean by "the X standard". Is that > the old or the new convention of how to interpret a given #RGB value? The old convention, of interpreting #f00 as #f00000. > > > I think we assume this color handling also in xfaces.c > > > > Only via tty-color-standard-values, as far as I can see. > > > > > and in lisp/term/tty-colors.el (and perhaps elsewhere, where TTY colors are used/defined). > > > > tty-color-standard-values is documented to use the X convention, and > > it does. tty-color-desc is documented to return approximate results, > > and it does; > > So we would need to change that as well, no? We could. I don't have an opinion either way. > > and it's only used for text terminals, right? > > Yes, but we nowadays support text terminals that can display 24-bit > colors, and having their colors display differently from the same > color on X is just asking for bug reports. Okay, let's change it, then. > > > There's also lisp/color.el. > > > > Anything in particular? As far as I can tell, the functions work > > properly using the new convention with this patch, although I am sure > > there are places that fail to deal with the 65280-as-maximum > > convention that nsfns.m uses. > > If you convert a color to RGB and then back, is the result equal to > what you started with? E.g., see On my system, yes. > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29456#11 > > Or what about issues discussed in bug#25890 and bug#24273? Thanks for pointing me to those. I don't think the situation gets any worse for those, at least. > > > Am I missing something? > > > > I don't think so, but I don't see anything, so far, that needs > > changing. I'm almost certain that some more places will need changing, > > but how do we find them? > > By searching the code for "rgb" (case-insensitively)? I've done that, now. No new problems that I've seen, though gtkutil.c's xg_get_pixbuf_from_surface confuses me. > E.g., what does > parse_rgb_list return when the RGB value doesn't specify all the bits? > what about color_distance? etc. Those two are fine, as far as I can see; I know that you meant to provide only examples, but if you have any hints for finding places that need changing, please let me know. > My point is that the "old" interpretation of the #RGB values might > have seeped into more places than just that one xterm.c function, and > if we are going to change the interpretation, we should make sure we > do that consistently in all the affected places. I don't think there's a way we can be absolutely certain to have fixed every potential problem, but we should try, yes.