From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Thomas Frössman" <thomasf@jossystem.se>
Cc: emacs-devel@gnu.org
Subject: Re: color-rgb-to-hex rounding / color-srgb-to-xyz typos
Date: Tue, 19 Jan 2021 04:37:40 +0100 [thread overview]
Message-ID: <87wnw9r3zv.fsf@gnus.org> (raw)
In-Reply-To: <CANDWisAspK_C7vojOgNiWW88MZTbP8ZHdCH+z6nJqK0kKexFSQ@mail.gmail.com> ("Thomas Frössman"'s message of "Tue, 12 Jan 2021 12:23:53 +0100")
Thomas Frössman <thomasf@jossystem.se> writes:
> 1. color-rgb-to-hex rounding
>
> Hi. I was investigating why a simple color space conversion from rgb
> to lab and back via just multiplying a component with 1.0 caused
> colors to change when being converted back. The issue is that even
> tiny changes to a component float in LAB space can bring the color
> value down by 0.00000x or something in RGB and when it's converted
> back to hex it gets a surprising value.
>
> I think I propose this change making rounding optional so that it
> doesn't affect anyone who is depending on the current behaviour.
>
> (defun solarized-color-rgb-to-hex (red green blue &optional digits-per-component
> round)
Was this meant to be added to the solarized package, or to the in-tree
`color-rgb-to-hex' function?
> 2. typos (?) in color-srgb-to-xyz typos
>
> While looking at the issue and referencing the wikipedia sRGB page it
> seems like these values should be changed.. Doing this upset the tests
> a bit though so I didn't take it all the way because I started trying
> to understand how to actually produce test case data that is based on
> some verified numbers and not just the output of color.el's functions.
I don't know, either. Is this related to bug#41544, perhaps?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-01-19 3:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-12 11:23 color-rgb-to-hex rounding / color-srgb-to-xyz typos Thomas Frössman
2021-01-19 3:37 ` Lars Ingebrigtsen [this message]
2021-01-20 15:17 ` Thomas Frössman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wnw9r3zv.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=thomasf@jossystem.se \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).