From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: "modern" colors Re: Changes for emacs 28 Date: Tue, 15 Sep 2020 23:30:02 +0700 Message-ID: References: <20200910102000.2t6tsju745xutg7u@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> <878sddz72o.fsf@elephly.net> <837dswbept.fsf@gnu.org> <87r1r4xq74.fsf@elephly.net> <83imcg9shm.fsf@gnu.org> <87a6xsxhry.fsf@elephly.net> <83wo0v85x8.fsf@gnu.org> 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="21439"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , Ergus , Emacs developers , rekado@elephly.net, "Alfred M. Szmidt" , Stefan Monnier , Gregory Heytings , Eli Zaretskii , TEC To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 15 18:31:53 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 1kIDs1-0005Pp-A8 for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Sep 2020 18:31:53 +0200 Original-Received: from localhost ([::1]:54426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIDs0-0005hQ-8u for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Sep 2020 12:31:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIDqX-0004ui-Gy for emacs-devel@gnu.org; Tue, 15 Sep 2020 12:30:21 -0400 Original-Received: from mail-ua1-x930.google.com ([2607:f8b0:4864:20::930]:45818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIDqS-0005HZ-Ct; Tue, 15 Sep 2020 12:30:21 -0400 Original-Received: by mail-ua1-x930.google.com with SMTP id w3so1223423uad.12; Tue, 15 Sep 2020 09:30:15 -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:content-transfer-encoding; bh=NgZI+xw8mSkXy8WSlXVNGpL5QgMCw1JXgRGTEbcM7iQ=; b=SYqLtiW1MY4AltsUTWdTso5bZChTmQr75UySBukeqtEE5VHoBldy5VQdLlXo5MYQn/ em/VpY1dE3s9ZfbkKD/27w//bP1Kfwg1B0/ACJdAJ+Qzo7nCUqmmw+kNRIWv4ET+g8ca ty+kQgl4yr+TUWCmc9IuKe/6M099hF88HvHEibGGzXEqoLFu1PiYLrhQ1XIO3OV0HyNc aXi3iF1LUiuusJ6yUrtWOE/AyljXvj/ftmhbBjjNpnXsqFdy7W5HyDvpU/f5QR5z3PcI whui7oZWi1AQt4kLlU2IBWkyRI74RUqRhW7jnKUyojnX86d5WGY3gm/wN3GzgK3LIS8f ftlw== 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:content-transfer-encoding; bh=NgZI+xw8mSkXy8WSlXVNGpL5QgMCw1JXgRGTEbcM7iQ=; b=GXxpd7Cw82K2OjdcTkZ2qFTfGgrzemv11vBFCp7Jh0o6BZFpIf9Nr2/41DbzPm9bBa U+GpTPBet8bV6BngCI1av8uFEBpljdbDbr4Qn15mKcUr82I2wi6spFfqEMlf5NC6QkKe RaeiFd/SQSNXPu+sjLi3I4lqo1sDX9Dss2+vsBFjiCJ9DRh/TnHpIO36+EoDsCDkr7Mz XtKBylu5sgVsK6s7Lgkax08AuMWLvz5qcTqtDJfpG1H35LCTIbrDj50oMcm+kC95IeLO KeNb5m36DvaZ0wrvG9M9DeUDwOsWYrkObYA4wlX91gcPU0apZv2uocnnPVtnDpZ6L6Ba JUGg== X-Gm-Message-State: AOAM532pGGfyWqfPfUwVoubpxP5VPzNLHBJGZA41NCcZJYcMz/oR0ot5 HlJNIQw4AOXU0A4m5G8J0RkaAntXMW5wqMr/DvQ= X-Google-Smtp-Source: ABdhPJykbj8H8Cpvx/9ymTj5MSVZ3HJL7nMy+PjCFXQ+++INRB+/MnHX5T0Ruhm44D/YbSL1Biv+O4lWGRLP5QKcHvg= X-Received: by 2002:ab0:71cd:: with SMTP id n13mr10392899uao.24.1600187414469; Tue, 15 Sep 2020 09:30:14 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::930; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x930.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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:255768 Archived-At: On Tue, 15 Sep 2020 at 23:06, Robert Pluim wrote: > Yuri> On Tue, 15 Sep 2020 at 21:54, Robert Pluim w= rote: > Eli> Is that because we don't know how to query GTK for the themes de= fault > Eli> colors? > >> > >> If by 'we' you mean Emacs, then yes. (I don=CA=BCt know how either= , and I > >> find the GTK docs unhelpful). > > Yuri> Some time ago someone over at Bugzilla (Firefox=E2=80=99s bug t= racker) said > Yuri> it=E2=80=99s generally not possible to query about that. > > Would you have a bugzilla bug number? Okay, I went to look for a reference and it turns out I misremembered. What actually happened is I asked on the GTK mailing lists whether an application can programmatically detect if the user is using a light or dark variant of a theme. https://mail.gnome.org/archives/gtk-app-devel-list/2018-November/msg00006.h= tml In the reply, I was told this: The only way to respect the GTK theme is to use GTK to render UI elements according to that theme=E2=80=94using the `gtk_render_*` API. Anything el= se is, by and large, impossible unless you literally parse the CSS with your own CS= S parser, determine the colours of every UI element you care about, and the= n detect whether those colours are "light" or "dark".