Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different color function outputs #40

Open
japorized opened this issue Aug 17, 2022 · 1 comment
Open

Different color function outputs #40

japorized opened this issue Aug 17, 2022 · 1 comment

Comments

@japorized
Copy link

Hello and thank you all for this amazing tool.

I was wondering if there's an interest in adding different color function outputs (particularly for HSL, for now). I was thinking of making a PR, but I wasn't certain if that fits within the vision of its maintainers.

In terms of implementation, I was thinking of performing a conversion from RGB, right before printing the output. However, and I'm not familiar with the problems in color conversions, conversions may be lossy (e.g. RGB to HSL). To make things worse, HSL, for example, uses decimals, i.e floating point math, which is

  1. difficult for accuracy
  2. adds complexity to testing

What do you all think? Is it worth pursuing?

@N-R-K
Copy link

N-R-K commented Sep 8, 2022

To make things worse, HSL, for example, uses decimals, i.e floating point math

Most HSL picker/wheel I see don't allow for decimals because no one really cares about 8.0 vs 8.4. It should be possible to use 32bit integers to convert rgb to HSL with a margin of error of 0.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants