From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Re: Returning hex value from rgb combination (each from 0 to 255) Date: Sat, 31 Aug 2024 18:44:22 +0000 Message-ID: References: <867cbwbnb7.fsf@gnu.org> <8634mky3va.fsf@hotmail.com> <864j70blef.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="2104"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 31 20:45:18 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1skT64-0000IU-NY for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 31 Aug 2024 20:45:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1skT5O-0003LF-I5; Sat, 31 Aug 2024 14:44:34 -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 1skT5M-0003Kd-Az for help-gnu-emacs@gnu.org; Sat, 31 Aug 2024 14:44:32 -0400 Original-Received: from mail-4319.protonmail.ch ([185.70.43.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1skT5K-0003fH-IJ; Sat, 31 Aug 2024 14:44:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1725129867; x=1725389067; bh=RxspP87/wlpR2y+dbILqy8Bb2d02DXzrdJyTTpYkXrs=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=gny/7BiFOVGeSDQfeLvnKwTM6s8wYoIBcm3FYbfyewT8jP6N206ArxnPoMQgclEin M3QCvpnFEQznPNQF5Eeb+MJ8koK10K2HYrLCHbwdxvcbVYTr4OuHnxW7+stO2fpadw Qby3XyCv0OIn9JwF6H0Ijym9Ewj5HuyARgT01Pfg4eoa0koi15gBl9o3xdpq6gVTF4 Qm0IpvGrduDv9pvbR68Daf3WMckO1k1jv2N4NudhqZo6yQmAelBHTDb+p8MlbeB25C FScfmkkjkJepkhHW2XmzrDxONDRjhd24BOQeFIr87x+VhLYU60HF6CgzdZ9Ga1n0rB hoKwwnGqCXi1A== In-Reply-To: <864j70blef.fsf@gnu.org> Feedback-ID: 57735886:user:proton X-Pm-Message-ID: bb050851705adc2642b67ddb284afaef51fbc6ea Received-SPF: pass client-ip=185.70.43.19; envelope-from=heimeborgia@protonmail.com; helo=mail-4319.protonmail.ch X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147870 Archived-At: On Sunday, September 1st, 2024 at 6:24 AM, Eli Zaretskii wro= te: > > From: Vagn Johansen gonz808@hotmail.com > > Date: Sat, 31 Aug 2024 19:54:49 +0200 > >=20 > > Eli Zaretskii eliz@gnu.org writes: > >=20 > > > > Date: Sat, 31 Aug 2024 17:10:27 +0000 > > > > From: Heime heimeborgia@protonmail.com > > > >=20 > > > > How can I make a function that takes r g and b values (from 0 to 25= 5) and > > > > returns the corresponding hex value ? > > >=20 > > > What is "the corresponding hex value"? > >=20 > > Probably the format used by color-rgb-to-hex > >=20 > > (color-rgb-to-hex 1 0 0 2) =3D> "#ff0000" >=20 >=20 > Then he had better used (color-rgb-to-hex 1 0 0) instead, as 2 digits > per component will get him in trouble eventually. But this requires values from 0.0 to 1.0 rather than from 0 to 255.