From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: "modern" colors Re: Changes for emacs 28 Date: Mon, 14 Sep 2020 17:19:28 +0200 Message-ID: References: <7a0ad8f3-8871-b653-d9f1-1cee105ff1ed@yandex.ru> 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="6517"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: casouri@gmail.com, spacibba@aol.com, emacs-devel@gnu.org, rekado@elephly.net, ams@gnu.org, monnier@iro.umontreal.ca, Dmitry Gutov , ghe@sdf.org, tecosaur@gmail.com To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 14 19:03:19 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 1kHrss-0001Yj-Ro for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 19:03:18 +0200 Original-Received: from localhost ([::1]:58418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHrsr-0008Ky-UX for ged-emacs-devel@m.gmane-mx.org; Mon, 14 Sep 2020 13:03:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHqGW-0004KR-PM for emacs-devel@gnu.org; Mon, 14 Sep 2020 11:19:36 -0400 Original-Received: from mail-oln040092070051.outbound.protection.outlook.com ([40.92.70.51]:51949 helo=EUR03-AM5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHqGU-0002AD-2O; Mon, 14 Sep 2020 11:19:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ai93Rgz4PHhYHcNu7mTY4ID+oB1Zj1k3rf20+dWeW8cT1fgPgabFXbCj9zwWnjMMBh0KR3GHAuhR1KVN31v8V165s5zr5T+GO4mJKKzfomUFqjgM7VVApKM6M2bvrIKERjkATtXivZSden0WtoCOI6FoNEUiJRrXlbUeky3FOTN75cfPj0WmwvDQYpYcJP8os6sx9Ec6xiEGBi/ad6hBQ5TmrHcI6/pMG2G3TlPxroSCbjQ1kRN9xqcLfQdDH0hughp8HsCMP4sK2NBTaZdL0/VdMR5p87cZzUqjdDN+GMPnjitQ/OBMcszFTA9VRIUl1fgYYVUq3FD/3f1NZw7zyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PBWxDt4j0xZG7oYTtZiT032F6k1eCX6cBo48nMMF0dc=; b=cYZB/LJN/9hFtG58sqq/nnKEoHqSqyRcOIX3rVGFpeU62jIa7pVaRA5Mrlg/XvTPQ63tPF6Y3j+yid1UB3oimOf6lP1PCDLZLLG5JgXQocz/29lwaIMvonobYTBNKfROlYywdw+wbjZA6sa1L/G9UCG0rxaMmlzn4TFNLYLJ9EGocLupLjnGHmLGnYhf9vxhdq5f16sbDvWnhcKe7r/KlifN5ay+Jnefgq6TbY2uMSj5akw8tvlVRhaPWkdxHq5ko8aiwPGW3xifTRJi7Cf4MbaK4UPQjSO69YMnaTtg14pgA4zN8KkmHHfL+pAMHwpvz28wAN727YTYl15bs7gYWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PBWxDt4j0xZG7oYTtZiT032F6k1eCX6cBo48nMMF0dc=; b=LDM5Zdl74bmLDnRQSoRqT6ifFdbzapxoIgrH6XOZBoT/lSAdSdwm36EUnsGTfqWvHFhwuNk9Azn9npGU0W7m5YKgQY1QXtx0rYE9p+y6XYH9mB1lyJgZl1I5hky4H5fA+aFO1m8Vf3kM3uARBrSAXl7EWGfwt22Ar9n1+CUa+GtJVm8zK0gdElQtOTnfA2d5ngRdP+qbWxnkX6q19l1SQv4PVAkUtUCqSkU8fO3tJtKkZqLGosNcl5XFllF16ajv6+9oD9nL9PK2c+f1Euc3geUFEr4Ugxk0ZYOLIcB+OxwcHDh63Wq1wVArMU7TyFb+EnG9cK8Nn7R22bAe3nNp8Q== Original-Received: from DB5EUR03FT044.eop-EUR03.prod.protection.outlook.com (2a01:111:e400:7e0a::4a) by DB5EUR03HT029.eop-EUR03.prod.protection.outlook.com (2a01:111:e400:7e0a::244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Mon, 14 Sep 2020 15:19:29 +0000 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com (2a01:111:e400:7e0a::53) by DB5EUR03FT044.mail.protection.outlook.com (2a01:111:e400:7e0a::423) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Mon, 14 Sep 2020 15:19:29 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:FDFB5F87774DDABA4F81041982F1AF673E9A079FE1F204A910CCBBA24431C828; UpperCasedChecksum:C1072EA4E46FF067688A74ECDF2641707D59E25FB98DFE35DEDF9214C3F44314; SizeAsReceived:3719; Count:47 Original-Received: from VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::b547:51cd:16c5:4487]) by VI1PR06MB4526.eurprd06.prod.outlook.com ([fe80::b547:51cd:16c5:4487%7]) with mapi id 15.20.3370.019; Mon, 14 Sep 2020 15:19:29 +0000 In-Reply-To: (Richard Stallman's message of "Sun, 13 Sep 2020 23:49:16 -0400") X-ClientProxiedBy: AM5PR0701CA0009.eurprd07.prod.outlook.com (2603:10a6:203:51::19) To VI1PR06MB4526.eurprd06.prod.outlook.com (2603:10a6:803:ac::17) X-Microsoft-Original-Message-ID: <878sdcwflr.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM5PR0701CA0009.eurprd07.prod.outlook.com (2603:10a6:203:51::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.4 via Frontend Transport; Mon, 14 Sep 2020 15:19:28 +0000 X-Microsoft-Original-Message-ID: <878sdcwflr.fsf@live.com> X-TMN: [muJB0FU5AiWUULwANDpEBt996hNaqmDQ] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 50925fef-2ca0-4bd8-3f3f-08d858c1931e X-MS-TrafficTypeDiagnostic: DB5EUR03HT029: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hMggYDEX509iVj33b4iaiulROgYHiLxnemFokvVG8JYt9SHKFVIMZNr4fffF/mnYpymO3PQM/sA/xH7uxCxupY8r9cfjnj0Cx8KwdfN1EaHcaYwAP8JY9nClB+eGOKa/pIj/rQuXdG/cjszJZ4SW9q3fTUErG+bEPk8AX8FuBR4v6rjZqn+ogLWvOuohGl/C+wP1SPaBoRBi40v/zmI0Eupx50X4d7zUxTKBINOm+LA= X-MS-Exchange-AntiSpam-MessageData: xX51C+W+SWd2IwkB5Z4kz7HIMWPIt0rlgmCm6/WMBSvae+nYZqB2KRuh8aYK94qpxFQiMi7xhqDeYUVrlppCeh5sNF48ZCWQspenS57dBqrTjZ6t3ownJLbKBxKH3Kb6Ull/dhdDuoXjrrdLlRdvgg== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50925fef-2ca0-4bd8-3f3f-08d858c1931e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2020 15:19:29.4249 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT044.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR03HT029 Received-SPF: pass client-ip=40.92.70.51; envelope-from=arthur.miller@live.com; helo=EUR03-AM5-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/14 11:19:30 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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:255668 Archived-At: Richard Stallman writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > > It would make Emacs look more aesthetically pleasing if packages ou= tput=20 > > > data in more color consistent and coherent=C2=A0 way instead of eve= ryone=20 > > > sprinkling hardcoded RGB values for their outputs. > > > Yup. It sounds like a big change, though. > > A small part of Emacs interprets color specifications. > If we want to define a new kind of color specification, > perhaps defined in terms of solarized, it whould not be hard. > I was thinking about it a bit, and was looking at the code of Bozhidar's Solarized implementation. I think it is rather a trivial thing to do. Here is what I think is a specific of Emacs:=20 1. Emacs has not parametrized names for colors of standard GUI elements (as I am aware of); so both Emacs internally, and third party packages are using color values directly for GUI elements (variables like forground, background etc). It results in Emacs theme having to go to great deal of color customizations when it comes to third party packages in particular. For illustration take at look at https://github.com/bbatsov/solarized-emacs/blob/master/solarized-faces.el Or themes don't do this which results in less coherent visual appereance in the end. 2. Everything in Emacs is text (mostly); that is one of best features of Emacs but it also means that pretty much any defvar can become a part of gui which leads to third party packages using color values directly (or none). It makes it hard for themes to create unified looks in Emacs for all= the diverse packages that are out there. What is nice with original Solarized by Ethan S. is that there is "logical framework" to think about colors: he defines base colors (background, foreground, selection etc) and accented colors for information that has to stand out. Bozhidar's implementation adds ligher and darker variant to accented colors. But best part with Bozhidar's Solarized for Emacs is that he has done a lion share of work on styling thrid party packages: https://github.com/bbatsov/solarized-emacs/blob/master/solarized-faces.el to make them consistent Emacs GUI and Solarized theme. I think his theme implementation can be simplified, paramtrized and turned into relatively simple framework to use. For end users who would like to create a color scheme it could be as easy as just specifying a two arrays of colors, base and accented ones. For package creators, elisp scripting etc, it could be relatively simply to use paramerized names like cs-accent-1, cs-accent-darker-1 etc (cs =3D color-scheme), or something similar. It shouldn't be hard to write a manual/docs on how to use the framework either since it is pretty much trivial. I can try to refactor Bozhidar's code if it is interesting (I have been playing with it for my own purpose soem time ago), if Bozhidar himself is not reading this list and don't' have opinions on this by himself. > The hard question is what we WANT to do. Does someone want to > study the details and make a concrete proposal? Concrete proposal would be: 1. remove dark/light variant and some color blending code which is specific for Solarized theme itself to simplify the framework.=20 2. parametrize names, instead of yellow, magenta etc, use something like cs-accent-1, cs-accent-2, cs-base-1, cs-base-2 etc 3. create setter/getter api to manipulate base/accent color arrays 4. write nice docs/tips/guide how to use it