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

lightColor algorithm produces incorrect colors for specific sources #33

Closed
4 tasks done
arnemolland opened this issue May 27, 2023 · 0 comments · Fixed by #36
Closed
4 tasks done

lightColor algorithm produces incorrect colors for specific sources #33

arnemolland opened this issue May 27, 2023 · 0 comments · Fixed by #36
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@arnemolland
Copy link
Member

arnemolland commented May 27, 2023

While the algorithm produces palettes as expected for most source colors, but produces inaccurate light colors for some sources. This has been known for some time, but we haven't had any incentive as we're not producing colors in the error-prone color space in our own internal systems.

Some known error-prone source colors:

Source Expected Produced
#11aa11 #~adf1aa #373c74

Without having dug too deep, we have 3 possible sources of error:

Where my initial bet is my implementations of CIELAB or LCH conversions being incorrect.

What needs to be done:

  • Debug and find the source of error. The [chroma.js)[https://gka.github.io/chroma.js/] and our web-based preview might be helpful in the process, as they're proven to be correct. We don't need and we probably won't get a 100% match due to language details and float precision, but we want to get close.
  • Change the implementation where needed
  • Update tests
  • Possibly increase amount of test cases as we go, depends on investigations
@arnemolland arnemolland added the bug Something isn't working label May 27, 2023
@arnemolland arnemolland added this to the v1.0.0 milestone May 27, 2023
@arnemolland arnemolland added the help wanted Extra attention is needed label May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant