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

"HCL" can refer to different things #49

Open
makew0rld opened this issue Jan 21, 2021 · 2 comments
Open

"HCL" can refer to different things #49

makew0rld opened this issue Jan 21, 2021 · 2 comments

Comments

@makew0rld
Copy link
Collaborator

makew0rld commented Jan 21, 2021

I'm writing code to bring HSLuv to go-colorful (see #41), and I noticed that term "HCL" is used to refer to the cylindrical transformation of CIELAB. But as Wikipedia notes, the term "HCL" is very ambiguous. Furthermore, the use of cylindical CIELUV is much more common, and go-colorful does not have support for this.

I am going to be implementing cylindrical CIELUV (aka CIE LCh(uv)) as it's required for HSLuv. But I'd like to recommend that all functions using the term "HCL" be deprecated, and new ones be created that use a more accurate term - perhaps LabLCh is good? Or LabCylinder?

@bowbahdoe
Copy link

@makew0rld Can I pick your brain about this for a little bit?

I'm interested in making something akin to https://github.com/charmbracelet/bubbletea for the Java/JVM ecosystem. As part of that I've more or less been working my way down that library's dependency tree and either finding equivalents or making my own.

Currently I'm in that process with https://github.com/bowbahdoe/color. I plagiarized most of the choices made in this library, including an HCL type. What should I be naming that instead? If I go for LabLCh are my components L, C, h or L, a, b, or are they still H, C, L?

(I don't want to a hack job but im very far from a domain expert. Gotta at least play one on tv to feel confident about stuff and write documentation)

@makew0rld
Copy link
Collaborator Author

HCL is bad name because it could refer to many underlying colour models. What name you should use instead depends on what colour model you want to use. If you just need one recommendation, I would go with Oklch.

If I go for LabLCh are my components L, C, h or L, a, b, or are they still H, C, L?

I would use L, C, h, and that seems to be what other places like CSS do. The most important thing is documenting the ranges and meaning of each of course.

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