From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] color-hsv-to-rgb Date: Thu, 19 Oct 2023 12:58:36 -0700 Message-ID: <4fdf4589-54ab-21a1-1687-cd52e85fc540@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31708"; mail-complaints-to="usenet@ciao.gmane.io" To: Stefan Kangas , Dov Grobgeld , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 19 21:59:35 2023 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 1qtZB6-0007yj-3j for ged-emacs-devel@m.gmane-mx.org; Thu, 19 Oct 2023 21:59:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtZAJ-0006Ts-Oq; Thu, 19 Oct 2023 15:58:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtZAI-0006MX-Am for emacs-devel@gnu.org; Thu, 19 Oct 2023 15:58:42 -0400 Original-Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtZAF-0001RN-Tw for emacs-devel@gnu.org; Thu, 19 Oct 2023 15:58:42 -0400 Original-Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1c9c5a1b87bso202125ad.3 for ; Thu, 19 Oct 2023 12:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697745517; x=1698350317; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=/u9BAnHySbRR7yK1E2byTHel/Bru8G1zCFItFwjA8G0=; b=coNs0/4MBFN38Berfjpn8W4HF3+dff6ROGWMnksT+/H7y6zXroFMeyHcHfOy9CcQtz catdbteZA5uCrKLl+Ox1r1xXi354oPMQhNpCrcPWUgzix4Tf120NweEOWmt1wPOdkDlf tchbbYUvkrEmLH7QwvdRbaD7OHEgk30vbbfT3d3anJTC3vHLw1+42Ohg2sG7vCHc5csA It5MbibnI1kOGUljienOeBO2E86i9GcH339CwgDmTbaTXkJ6m0lXggcNS2BSPCm6x7+M 0Zd6XempYTa+ufcEh/Sm5XGNBIPBzbl6DDshiMV0k420+OTbAlsEgtNqUSojgjsSX66H fsOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697745517; x=1698350317; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/u9BAnHySbRR7yK1E2byTHel/Bru8G1zCFItFwjA8G0=; b=omIEfLnPK3BiVvfi6ISuJwZHX7GrxojSYjT2WPtbBslU7QU71dWgpS5DNmFzjSW55Z pJQEYCmpv/OXoglRPPO/SM6ZaK7BsEPUaTuuO4W0+T5HIJcy1rdiP25BWRzvq867nOvn y3PZKN+Gw+pJEbhZEbBMrHrxZ4GjYFnceifSzdxml/8N2EnTQ5TxOeTng96DSvDS3wPE WvXsueNbanGIAKCsmDhuyylSE3AdZ8c6txdojxuaIDK3lrGlVN8SOWvNtNalF0vswZxA 3vbc0CwTDOpmFtuWg2uQ6+VphcHRyS8nHOKv0A4Vjs7vMisf4zfqM2X/wo33SBza9i7u /1Gg== X-Gm-Message-State: AOJu0YxGqpnyUUMzFvzZ+XtSiH7yKf2s88yZBgT/6CXtB3gh7m4Jd4C9 vLnC4pNH1AHDEVcFNqGP6cY= X-Google-Smtp-Source: AGHT+IENb+N1S3CvWgb8WjIjs18QqIrtFe//zsVkrEz7n3b5vzqv0Q4SQsEjzJ4ckkhSQWv2bdOq6A== X-Received: by 2002:a17:903:2450:b0:1c3:aa8d:4daa with SMTP id l16-20020a170903245000b001c3aa8d4daamr4071470pls.44.1697745517455; Thu, 19 Oct 2023 12:58:37 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id u15-20020a170902e80f00b001c9d2360b2asm102942plg.22.2023.10.19.12.58.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Oct 2023 12:58:37 -0700 (PDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=jporterbugs@gmail.com; helo=mail-pl1-x630.google.com 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.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311603 Archived-At: On 10/16/2023 12:59 AM, Stefan Kangas wrote: > Dov Grobgeld writes: > >> I would like to do my first(!) contribution to emacs with the attached >> patch. Is there interest, or is it too trivial? Do I need to do a copyright >> assignment? Is there a guide for dummies on how to do that? > > Welcome to Emacs! > > I don't see why we couldn't take a patch implementing the inverse of > `color-rgb-to-hsv', so I think there's interest. It would be > interesting to know what you need it for, though. For what it's worth, I thought about adding this function too. I would use it for a custom theme to choose colors for 'vc-annotate'. My hypothetical code would take a starting color (in RGB), convert to HSV, and then increment the value component to produce gradually lighter colors. After that, I'd need a way to convert back to RGB to make the hex string for the face attribute, hence this new function. (Even better would be conversions between RGB and LCh, but that's a bigger project.)