From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#8402: 24.0.50; Hex colors are not rendered correctly on OS X (Cocoa) Date: Sat, 23 Apr 2022 23:22:12 +0100 Message-ID: References: <684839CF-AD6D-43E0-8659-F419C17DD5A2@sanityinc.com> <87ilqzrh2v.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20624"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 8402@debbugs.gnu.org To: Howard Melman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 24 00:23:14 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1niO9q-0005CT-1V for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Apr 2022 00:23:14 +0200 Original-Received: from localhost ([::1]:40932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niO9o-0005qm-9k for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 Apr 2022 18:23:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1niO9e-0005qa-Sa for bug-gnu-emacs@gnu.org; Sat, 23 Apr 2022 18:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35274) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1niO9e-0000BO-KT for bug-gnu-emacs@gnu.org; Sat, 23 Apr 2022 18:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1niO9e-0006ZA-Ci for bug-gnu-emacs@gnu.org; Sat, 23 Apr 2022 18:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Apr 2022 22:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8402 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 8402-submit@debbugs.gnu.org id=B8402.165075254425176 (code B ref 8402); Sat, 23 Apr 2022 22:23:02 +0000 Original-Received: (at 8402) by debbugs.gnu.org; 23 Apr 2022 22:22:24 +0000 Original-Received: from localhost ([127.0.0.1]:57402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niO91-0006Xz-N4 for submit@debbugs.gnu.org; Sat, 23 Apr 2022 18:22:23 -0400 Original-Received: from outbound.soverin.net ([116.202.126.228]:58429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niO8z-0006Xm-Hc for 8402@debbugs.gnu.org; Sat, 23 Apr 2022 18:22:22 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.3.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 092488B4; Sat, 23 Apr 2022 22:22:15 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.100]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1650752534; bh=59FOGFfPx1PtS1BNpxaPGWi26JqHkfVIunRkOld2h28=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FPW3tnOYHspI/p/hr0vpWyjTIaK6TBtwDoRzCFEHusMFG4t6bCBOJdtJwD1aRzIEW dNs3xwFpNpfLv62hfwgohgRe8TJC2Yv+fUixFevZ/70AVL4BeTZW9pw7CXpYgqmKDq rZGjZfwrBNCoWEBO7/xjebedQcx/2g1Ggfc3WdoGTGuIp6uMYT2JJqsE5OeVOo3Mfq +rbSMeNLZNxwIky4BfrIpFQc14XX6Ek3saQ4mq4p8Bu3dcYf9JFZNB9tE91gv1B+Pi T6CSGuI59+6aUnGmsskS4hqtu2Pmun2oRyTYvGjnSmkmI2S14JraECq2Qk9vtN0BFe gpZH5sX+Y2HyQ== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95) (envelope-from ) id 1niO8r-000lj4-3m; Sat, 23 Apr 2022 23:22:13 +0100 Mail-Followup-To: Alan Third , Howard Melman , 8402@debbugs.gnu.org Content-Disposition: inline In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:230525 Archived-At: On Sat, Apr 23, 2022 at 05:33:35PM -0400, Howard Melman wrote: > Lars Ingebrigtsen writes: > > > Steve Purcell writes: > > > >> If I set face colors using hex values, those colors are not displayed > >> correctly. > >> > >> For example, 'M-x set-face-background RET default RET #fdf6e3 RET' > >> results in a frame background color which, when sampled using Apple's > >> "Digital Color Meter" utility, has hex value #fff8e8. > > > > (I'm going through old bug reports that unfortunately weren't resolved > > at the time.) > > > > There was a patch suggested to alter ns_get_color, but I see that the > > function has changed greatly since this was reported ten years ago. > > > > Is this still an issue with recent Emacs versions? > > When I try it with emacs 28 on macOS 11.6.5 I get the > background color 0xFCF6E5. So it seems quite close. I think all this is a result of macOS's heavy use of colourspaces, specifically conversion between "generic" and "SRGB" colourspaces. But to be perfectly frank, colour on macOS confuses me so much so I could be talking nonsense. If anyone does want to mess with this bear in mind that if you mess it up it results in HUGE performance penalties as every drawing action then has to run through colour conversion routines. -- Alan Third