all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Returning hex value from rgb combination (each from 0 to 255)
Date: Sat, 31 Aug 2024 18:44:22 +0000	[thread overview]
Message-ID: <QmVG8v30MdvLs35alf5iXXbVxWw9MX1jcGxEp8OkWc_3vtNtjgdAvJ3aifJyI41kWgupDCGVkUMB73TtwtKifj7KG8Z30BHCs5n6q3tqTkA=@protonmail.com> (raw)
In-Reply-To: <864j70blef.fsf@gnu.org>

On Sunday, September 1st, 2024 at 6:24 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Vagn Johansen gonz808@hotmail.com
> > Date: Sat, 31 Aug 2024 19:54:49 +0200
> > 
> > Eli Zaretskii eliz@gnu.org writes:
> > 
> > > > Date: Sat, 31 Aug 2024 17:10:27 +0000
> > > > From: Heime heimeborgia@protonmail.com
> > > > 
> > > > How can I make a function that takes r g and b values (from 0 to 255) and
> > > > returns the corresponding hex value ?
> > > 
> > > What is "the corresponding hex value"?
> > 
> > Probably the format used by color-rgb-to-hex
> > 
> > (color-rgb-to-hex 1 0 0 2) => "#ff0000"
> 
> 
> 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.



  reply	other threads:[~2024-08-31 18:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-31 17:10 Returning hex value from rgb combination (each from 0 to 255) Heime
2024-08-31 17:43 ` Eli Zaretskii
2024-08-31 17:54   ` Vagn Johansen
2024-08-31 18:24     ` Eli Zaretskii
2024-08-31 18:44       ` Heime [this message]
2024-08-31 21:26         ` Stephen Berman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='QmVG8v30MdvLs35alf5iXXbVxWw9MX1jcGxEp8OkWc_3vtNtjgdAvJ3aifJyI41kWgupDCGVkUMB73TtwtKifj7KG8Z30BHCs5n6q3tqTkA=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.