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

Lab spaces (lab, lab-d65, and oklab) should accept Lightness in addition to L for first coordinate name. #345

Closed
jgerigmeyer opened this issue Nov 14, 2023 · 2 comments · Fixed by #348

Comments

@jgerigmeyer
Copy link
Member

Most spaces accept full spelled out versions of coordinate names as the coordId, but the three Lab spaces only accept L and not Lightness.

const color = new Color("red");
console.log(color.lch.lightness); // 54.3
console.log(color.lab.l); // 54.3
console.log(color.lab.lightness); // throws error

@LeaVerou Was this an intentional design decision? I can't find anything in the spec that would warrant this. If it wasn't intentional, I'm happy to submit a PR.

@LeaVerou
Copy link
Member

Hm. We did intentionally go with L for Lab, but now I'm not sure it was a good idea. @svgeesus, thoughts?

@svgeesus
Copy link
Member

If we allow it in the other spaces then we should here, too.

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

Successfully merging a pull request may close this issue.

3 participants