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

Color conversion problem #442

Closed
tnkarno opened this issue Jul 8, 2022 · 1 comment
Closed

Color conversion problem #442

tnkarno opened this issue Jul 8, 2022 · 1 comment

Comments

@tnkarno
Copy link

tnkarno commented Jul 8, 2022

Version: 2.0.0,

Problem: Try to convert a hex to HSLA and back to hex. The expected result is the same hex. (Currently, it's different)
This comes from the hsla function. It uses toFixed() and it loses the correct value. I think it shouldn't round the values.

@tnkarno tnkarno changed the title Color connversion problem Color conversion problem Jul 8, 2022
@ricokahler
Copy link
Owner

Hi I believe this is a duplicate of #211.

I'll close in favor of that but if you have a suggestion on how to improve this, please do share over there 😄. Keep in mind that the output of these colors should be readable by CSS.
In particular, these specs: rgba and hsla

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