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: [PATCH] New function: color-blend Date: Sat, 2 Nov 2024 18:26:57 +0700 Message-ID: References: <87wmhmgq4a.fsf@breatheoutbreathe.in> 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="14083"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Devel Mailing List To: Joseph Turner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 02 12:27:57 2024 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 1t7CIN-0003TY-Uk for ged-emacs-devel@m.gmane-mx.org; Sat, 02 Nov 2024 12:27:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7CHi-0000Wm-2E; Sat, 02 Nov 2024 07:27:14 -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 1t7CHg-0000Wc-Nk for emacs-devel@gnu.org; Sat, 02 Nov 2024 07:27:12 -0400 Original-Received: from mail-ua1-x930.google.com ([2607:f8b0:4864:20::930]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7CHf-0000tx-Bj for emacs-devel@gnu.org; Sat, 02 Nov 2024 07:27:12 -0400 Original-Received: by mail-ua1-x930.google.com with SMTP id a1e0cc1a2514c-84fcb020503so1250951241.0 for ; Sat, 02 Nov 2024 04:27:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730546829; x=1731151629; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YXLZ5KMLwmw8HX3sDjhVlOTZ+0/9sVsr/CSLlpXvP/g=; b=bjKAhbZ7APQUmPPeqPCJ/TOSapRvAG4i1E5fCMG8bbv5E9Q5IHTEre4hOK/JgDvDfs YZbgUWVEqeGZUX9jrC5RuVrA9CzVUubtdQAWOmdutqTUH5njG5Eqx/KbKD/c/3nwds6a kfXCZ3fgIgLuzP2baHfBkqB5XlQ6s0B5i0SwxGrZ0f+FMbSQ0u/ohmE/+JFENPL7bVI5 6vexHPX5vQ1fH7vmRV36Xp96T8NpeltjcYf33qfA61/BvhuNZyVIucmvAbUON1o8j0e0 cIZpKG4ePeudweN1l7aXbD/Q1GTdrMqKQwcBjNXE54RP8LQ2EpWzA4hDSsInOSaUJPAO JEPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730546829; x=1731151629; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YXLZ5KMLwmw8HX3sDjhVlOTZ+0/9sVsr/CSLlpXvP/g=; b=uVEn6krKrTq32jT+WisUwF1IOXnDWz87JFnx0LxP/N/R/RdzoLmUzaZuVqwdODHLJ7 QspYWlfZvwR7qCM7dICDrGw5b5ZDbHkbVVttJbhWhT7TCTA4F+6WpBFdNo13535irYX0 GOsEgXTbtTa88A7zhRAtvbqfLaLCBf9RN/MtmYR/MkaJgqZ2xqjxdbugnbMPIdpTtv+e 5TtLtBI1Wxz+QXLxLc313kTF41ERHOzyJpV//rNKFdgmLYQWDXaUAEkqtePR70LRjwCh PB2xP5mOjwFbl42vq0bJALSDMCJSuIi3kRz22hzg338fJVJmWplRLa6h1qKLcGEQRGLV XdHg== X-Gm-Message-State: AOJu0YxS+7ekY3hrdWD0QvESvLiZw5YPkJ9eVHSu1gtKMg98GwgVOn1e zeIF8INpYIXQFFVMXnNhf5mEQWOE+ihJNYm7yAWD5tT0LTQ74Y7rsHkttb3auOiYONaW5+/JCyp R4CR4HVxnP+k91b972AwjQmZYXSlbbOyN X-Google-Smtp-Source: AGHT+IEJ1i5LwAcilWMNLWhfcr2ymGwtl9EGRbTQciGUBIbE/U5y7eIXrudWFROAXn8pVxwdNZi9tRW0mmKpfLkm/18= X-Received: by 2002:a05:6102:14a1:b0:4a4:77c7:9471 with SMTP id ada2fe7eead31-4a961b0577amr6238194137.5.1730546829545; Sat, 02 Nov 2024 04:27:09 -0700 (PDT) In-Reply-To: <87wmhmgq4a.fsf@breatheoutbreathe.in> Received-SPF: pass client-ip=2607:f8b0:4864:20::930; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x930.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:325008 Archived-At: On Sat, 2 Nov 2024 at 14:03, Joseph Turner wr= ote: > Here's `color-blend', a function to blend two colors into one. It would be nice to explicitly mention linear RGB space. Most users[citation needed] these days are accustomed to colors specified in sRGB space and na=C3=AFve conversion dividing by 255 will not give the desired blends. As an example, linear mixing black (0 0 0) with white (1 1 1) yields (0.5 0.5 0.5). Na=C3=AFve scaling will yield #808080 whereas middle gray is somewhere around #bebebe in sRGB.