From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: "modern" colors Re: Changes for emacs 28 Date: Mon, 14 Sep 2020 17:38:45 +0300 Message-ID: <83bli8beyy.fsf@gnu.org> References: <20200910102000.2t6tsju745xutg7u@Ergus> <20200910110832.ko66gqnqo4l664d6@Ergus> <20200911134225.zhnlq7cdhmu2iraj@Ergus> <20200911221435.go7b5kz2zcvxp2ft@Ergus> <20200912153723.ymnq3i5pugqf7lsy@Ergus> <871rj628mq.fsf@elephly.net> <20200912195358.3zjct7gsogjtlh3n@Ergus> <87y2lezrbp.fsf@elephly.net> <83pn6pbtni.fsf@gnu.org> <87mu1tzlxo.fsf@elephly.net> <83mu1tbp7a.fsf@gnu.org> <87h7s1zccb.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22299"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, casouri@gmail.com, emacs-devel@gnu.org, ams@gnu.org, monnier@iro.umontreal.ca, ghe@sdf.org, tecosaur@gmail.com To: Ricardo Wurmus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 14 17:05:11 2020 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 1kHq2Y-0005fx-Jx for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 17:05:10 +0200 Original-Received: from localhost ([::1]:33950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHq2X-00061f-It for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 11:05:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHpd0-00046w-74 for emacs-devel@gnu.org; Mon, 14 Sep 2020 10:38:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53182) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHpcy-0003bs-21; Mon, 14 Sep 2020 10:38:45 -0400 Original-Received: from [176.228.60.248] (port=4963 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kHpcw-0005tE-Lp; Mon, 14 Sep 2020 10:38:43 -0400 In-Reply-To: <87h7s1zccb.fsf@elephly.net> (message from Ricardo Wurmus on Sun, 13 Sep 2020 21:49:24 +0200) 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:255647 Archived-At: > From: Ricardo Wurmus > Cc: spacibba@aol.com, casouri@gmail.com, emacs-devel@gnu.org, ams@gnu.org, > monnier@iro.umontreal.ca, ghe@sdf.org, tecosaur@gmail.com > Date: Sun, 13 Sep 2020 21:49:24 +0200 > > > Then it's a mystery only you can solve. Look at the definition of the > > 'region' face in faces.el: the only case where we use :inverse-video > > is on monochrome TTYs. If that is not your case, then I don't know > > how to explain the fact that you see the region in reverse video. I > > guess I'm missing something, but what? > > The ’region’ face has these settings: > > DistantForeground: gtk_selection_fg_color > Background: gtk_selection_bg_color > > I switch to a light GTK theme and run Emacs: > > $ dconf write /org/gnome/desktop/interface/gtk-theme "'Adwaita'" > $ emacs -Q > > Now the selected region has a light gray background. > > I switch to a dark GTK theme and run Emacs: > > $ dconf write /org/gnome/desktop/interface/gtk-theme "'Adwaita-dark'" > $ emacs -Q > > Now the selected region has a very dark background and the text is > bright. > > I suppose that’s exactly what gtk_selection_bg_color and > gtk_selection_fg_color are supposed to do: take the colours from the GTK > theme. Thanks for investigating. So this explains the colors that you see, but AFAIU, they are not exactly the default colors inverted, they just look similar to that. Your original description said the region was shown in inverse video, which is what puzzled me.